Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43cd93bbd7 | ||
|
|
92ba9f39fb | ||
|
|
400c6a782b |
+10
-5
@@ -7,6 +7,7 @@
|
||||
#include "logical_size.h"
|
||||
#include "logger/logger.h"
|
||||
#include "provisioning.h"
|
||||
#include "scroller_page.h"
|
||||
|
||||
namespace {
|
||||
// How long audio fades out before the app tears down on quit. Only applied
|
||||
@@ -201,11 +202,15 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) {
|
||||
std::to_string(event->window.data1) + "x" +
|
||||
std::to_string(event->window.data2));
|
||||
// Logical presentation persists across resizes; re-apply defensively
|
||||
// in case backend state was reset underneath us.
|
||||
SDL_SetRenderLogicalPresentation(state.renderer,
|
||||
radiantwave::kDesignWidth,
|
||||
radiantwave::kDesignHeight,
|
||||
SDL_LOGICAL_PRESENTATION_LETTERBOX);
|
||||
// in case backend state was reset underneath us. Skip while the
|
||||
// scroller is active — it owns its own presentation (NONE, full
|
||||
// window) and restores LETTERBOX in onPop.
|
||||
if (!dynamic_cast<ScrollerPage *>(state.pages.current())) {
|
||||
SDL_SetRenderLogicalPresentation(state.renderer,
|
||||
radiantwave::kDesignWidth,
|
||||
radiantwave::kDesignHeight,
|
||||
SDL_LOGICAL_PRESENTATION_LETTERBOX);
|
||||
}
|
||||
}
|
||||
|
||||
if (!state.keybinds.handleEvent(*event)) {
|
||||
|
||||
+624
-691
File diff suppressed because it is too large
Load Diff
@@ -115,4 +115,8 @@ private:
|
||||
float velocityDelay_ = 2.5f;
|
||||
int velocityState_ = 0;
|
||||
float velocityTimer_ = 0.0f;
|
||||
|
||||
int savedLogicalW_ = 0;
|
||||
int savedLogicalH_ = 0;
|
||||
SDL_RendererLogicalPresentation savedMode_ = SDL_LOGICAL_PRESENTATION_DISABLED;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user