mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
Separate ForceDisable from LastCheckCrashed.
This commit is contained in:
@@ -383,7 +383,7 @@ void Application::run() {
|
||||
}
|
||||
|
||||
SetCrashAnnotationsGL();
|
||||
if (!Platform::IsMac() && Ui::GL::LastCrashCheckFailed()) {
|
||||
if (Ui::GL::LastCrashCheckFailed()) {
|
||||
showOpenGLCrashNotification();
|
||||
}
|
||||
|
||||
@@ -427,14 +427,12 @@ void Application::checkWindowAccount(not_null<Window::Controller*> window) {
|
||||
|
||||
void Application::showOpenGLCrashNotification() {
|
||||
const auto enable = [=] {
|
||||
Ui::GL::ForceDisable(false);
|
||||
Ui::GL::CrashCheckFinish();
|
||||
settings().setDisableOpenGL(false);
|
||||
Local::writeSettings();
|
||||
Restart();
|
||||
};
|
||||
const auto keepDisabled = [=](Fn<void()> close) {
|
||||
Ui::GL::ForceDisable(true);
|
||||
Ui::GL::CrashCheckFinish();
|
||||
settings().setDisableOpenGL(true);
|
||||
Local::writeSettings();
|
||||
@@ -792,6 +790,7 @@ void Application::badMtprotoConfigurationError() {
|
||||
}
|
||||
|
||||
void Application::startLocalStorage() {
|
||||
Ui::GL::DetectLastCheckCrash();
|
||||
Local::start();
|
||||
_saveSettingsTimer.emplace([=] { saveSettings(); });
|
||||
settings().saveDelayedRequests() | rpl::start_with_next([=] {
|
||||
|
Reference in New Issue
Block a user