mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 06:55:58 +00:00
Separate ForceDisable from LastCheckCrashed.
This commit is contained in:
@@ -383,7 +383,7 @@ void Application::run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetCrashAnnotationsGL();
|
SetCrashAnnotationsGL();
|
||||||
if (!Platform::IsMac() && Ui::GL::LastCrashCheckFailed()) {
|
if (Ui::GL::LastCrashCheckFailed()) {
|
||||||
showOpenGLCrashNotification();
|
showOpenGLCrashNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,14 +427,12 @@ void Application::checkWindowAccount(not_null<Window::Controller*> window) {
|
|||||||
|
|
||||||
void Application::showOpenGLCrashNotification() {
|
void Application::showOpenGLCrashNotification() {
|
||||||
const auto enable = [=] {
|
const auto enable = [=] {
|
||||||
Ui::GL::ForceDisable(false);
|
|
||||||
Ui::GL::CrashCheckFinish();
|
Ui::GL::CrashCheckFinish();
|
||||||
settings().setDisableOpenGL(false);
|
settings().setDisableOpenGL(false);
|
||||||
Local::writeSettings();
|
Local::writeSettings();
|
||||||
Restart();
|
Restart();
|
||||||
};
|
};
|
||||||
const auto keepDisabled = [=](Fn<void()> close) {
|
const auto keepDisabled = [=](Fn<void()> close) {
|
||||||
Ui::GL::ForceDisable(true);
|
|
||||||
Ui::GL::CrashCheckFinish();
|
Ui::GL::CrashCheckFinish();
|
||||||
settings().setDisableOpenGL(true);
|
settings().setDisableOpenGL(true);
|
||||||
Local::writeSettings();
|
Local::writeSettings();
|
||||||
@@ -792,6 +790,7 @@ void Application::badMtprotoConfigurationError() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Application::startLocalStorage() {
|
void Application::startLocalStorage() {
|
||||||
|
Ui::GL::DetectLastCheckCrash();
|
||||||
Local::start();
|
Local::start();
|
||||||
_saveSettingsTimer.emplace([=] { saveSettings(); });
|
_saveSettingsTimer.emplace([=] { saveSettings(); });
|
||||||
settings().saveDelayedRequests() | rpl::start_with_next([=] {
|
settings().saveDelayedRequests() | rpl::start_with_next([=] {
|
||||||
|
@@ -910,10 +910,7 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
|
|||||||
_recentEmojiPreload = std::move(recentEmojiPreload);
|
_recentEmojiPreload = std::move(recentEmojiPreload);
|
||||||
_emojiVariants = std::move(emojiVariants);
|
_emojiVariants = std::move(emojiVariants);
|
||||||
_disableOpenGL = (disableOpenGL == 1);
|
_disableOpenGL = (disableOpenGL == 1);
|
||||||
if (!Platform::IsMac()) {
|
Ui::GL::ForceDisable(_disableOpenGL);
|
||||||
Ui::GL::ForceDisable(_disableOpenGL
|
|
||||||
|| Ui::GL::LastCrashCheckFailed());
|
|
||||||
}
|
|
||||||
_groupCallNoiseSuppression = (groupCallNoiseSuppression == 1);
|
_groupCallNoiseSuppression = (groupCallNoiseSuppression == 1);
|
||||||
const auto uncheckedWorkMode = static_cast<WorkMode>(workMode);
|
const auto uncheckedWorkMode = static_cast<WorkMode>(workMode);
|
||||||
switch (uncheckedWorkMode) {
|
switch (uncheckedWorkMode) {
|
||||||
|
Submodule Telegram/lib_ui updated: 037ceb272c...b21a93f3ba
Reference in New Issue
Block a user