[turbine,studio] Fix confirm app close pop up to work with Ctrl-Q
All checks were successful
Build / build (push) Successful in 2m1s
All checks were successful
Build / build (push) Successful in 2m1s
This commit is contained in:
parent
136f422401
commit
cd43fb7f38
@ -588,7 +588,7 @@ ox::Error StudioUI::makeCopyDlg(ox::StringViewCR path) noexcept {
|
||||
|
||||
ox::Error StudioUI::handleCloseAppResponse(ig::PopupResponse const response) noexcept {
|
||||
if (response == ig::PopupResponse::OK && m_activeEditor) {
|
||||
turbine::requestShutdown(m_tctx);
|
||||
turbine::requestShutdown(m_tctx, true);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ ox::Error run(Context &ctx) noexcept;
|
||||
[[nodiscard]]
|
||||
TimeMs ticksMs(Context const&ctx) noexcept;
|
||||
|
||||
void requestShutdown(Context &ctx) noexcept;
|
||||
void requestShutdown(Context &ctx, bool force = false) noexcept;
|
||||
|
||||
using ShutdownHandler = bool (*)(Context&);
|
||||
|
||||
|
@ -82,7 +82,7 @@ bool buttonDown(Context const&, Key k) noexcept {
|
||||
return k <= Key::GamePad_L && !(REG_GAMEPAD & (1 << static_cast<int>(k)));
|
||||
}
|
||||
|
||||
void requestShutdown(Context &ctx) noexcept {
|
||||
void requestShutdown(Context &ctx, bool) noexcept {
|
||||
ctx.running = false;
|
||||
}
|
||||
|
||||
|
@ -125,8 +125,11 @@ bool buttonDown(Context const&ctx, Key const key) noexcept {
|
||||
return (ctx.keysDown >> static_cast<int>(key)) & 1;
|
||||
}
|
||||
|
||||
void requestShutdown(Context &ctx) noexcept {
|
||||
ctx.running = false;
|
||||
void requestShutdown(Context &ctx, bool const force) noexcept {
|
||||
glfwSetWindowShouldClose(ctx.window, true);
|
||||
if (force) {
|
||||
ctx.running = false;
|
||||
}
|
||||
}
|
||||
|
||||
void setShutdownHandler(Context &ctx, ShutdownHandler const handler) noexcept {
|
||||
|
Loading…
x
Reference in New Issue
Block a user