more window vis fixes
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
This commit is contained in:
parent
a417f9059e
commit
859ad7df81
@ -266,7 +266,7 @@ bool MainScreen::handleEvent(SDL_Event& e) {
|
|||||||
if (_window_hidden_ts < e.window.timestamp) {
|
if (_window_hidden_ts < e.window.timestamp) {
|
||||||
_window_hidden_ts = e.window.timestamp;
|
_window_hidden_ts = e.window.timestamp;
|
||||||
_window_hidden = true;
|
_window_hidden = true;
|
||||||
//std::cout << "TOMAT: window hidden " << e.window.timestamp << "\n";
|
//std::cout << "TOMAT: window hidden " << e.type << " " << e.window.timestamp << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true; // forward?
|
return true; // forward?
|
||||||
@ -274,7 +274,7 @@ bool MainScreen::handleEvent(SDL_Event& e) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
e.type == SDL_EVENT_WINDOW_SHOWN ||
|
e.type == SDL_EVENT_WINDOW_SHOWN ||
|
||||||
e.type == SDL_EVENT_WINDOW_RESTORED ||
|
//e.type == SDL_EVENT_WINDOW_RESTORED || // triggers on hide
|
||||||
e.type == SDL_EVENT_WINDOW_EXPOSED
|
e.type == SDL_EVENT_WINDOW_EXPOSED
|
||||||
) {
|
) {
|
||||||
auto* window = SDL_GetWindowFromID(e.window.windowID);
|
auto* window = SDL_GetWindowFromID(e.window.windowID);
|
||||||
@ -283,13 +283,15 @@ bool MainScreen::handleEvent(SDL_Event& e) {
|
|||||||
if (_window_hidden_ts <= e.window.timestamp) {
|
if (_window_hidden_ts <= e.window.timestamp) {
|
||||||
_window_hidden_ts = e.window.timestamp;
|
_window_hidden_ts = e.window.timestamp;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (_window_hidden) {
|
if (_window_hidden) {
|
||||||
// if window was previously hidden, we shorten the wait for the next frame
|
// if window was previously hidden, we shorten the wait for the next frame
|
||||||
_render_interval = 1.f/60.f;
|
_render_interval = 1.f/60.f;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_window_hidden = false;
|
_window_hidden = false;
|
||||||
//std::cout << "TOMAT: window shown " << e.window.timestamp << "\n";
|
//std::cout << "TOMAT: window shown " << e.type << " " << e.window.timestamp << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_render_interval = 1.f/60.f; // TODO: magic
|
_render_interval = 1.f/60.f; // TODO: magic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user