Skip to content

Commit

Permalink
fix: ifdef macro that doesn't exist on switch (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai authored Apr 22, 2024
1 parent 11af758 commit 8a079ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,13 @@ void Gui::Update(WindowEvent event) {
case WindowBackend::SDL_METAL:
ImGui_ImplSDL2_ProcessEvent(static_cast<const SDL_Event*>(event.Sdl.Event));

#ifdef __SWITCH__
// Switch doesn't support SDL_WINDOWEVENT_DISPLAY_CHANGED
if (mDpiInit) {
#else
if (static_cast<const SDL_Event*>(event.Sdl.Event)->window.event == SDL_WINDOWEVENT_DISPLAY_CHANGED ||
mDpiInit) {
#endif
int display = 0;
if (Context::GetInstance()->GetWindow()->GetWindowBackend() == WindowBackend::SDL_OPENGL) {
display = SDL_GetWindowDisplayIndex(static_cast<SDL_Window*>(mImpl.Opengl.Window));
Expand Down

0 comments on commit 8a079ed

Please sign in to comment.