Browse Source
Merge pull request #6795 from sankasan/cmd-remove-cursor-fullscreen
yuzu-cmd: hide mouse cursor when started fullscreen
pull/15/merge
bunnei
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
9 additions and
0 deletions
-
src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
-
src/yuzu_cmd/emu_window/emu_window_sdl2.h
-
src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp
-
src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp
|
|
|
@ -122,6 +122,10 @@ void EmuWindow_SDL2::OnResize() { |
|
|
|
UpdateCurrentFramebufferLayout(width, height); |
|
|
|
} |
|
|
|
|
|
|
|
void EmuWindow_SDL2::ShowCursor(bool show_cursor) { |
|
|
|
SDL_ShowCursor(show_cursor ? SDL_ENABLE : SDL_DISABLE); |
|
|
|
} |
|
|
|
|
|
|
|
void EmuWindow_SDL2::Fullscreen() { |
|
|
|
switch (Settings::values.fullscreen_mode.GetValue()) { |
|
|
|
case Settings::FullscreenMode::Exclusive: |
|
|
|
|
|
|
|
@ -67,6 +67,9 @@ protected: |
|
|
|
/// Called by WaitEvent when any event that may cause the window to be resized occurs |
|
|
|
void OnResize(); |
|
|
|
|
|
|
|
/// Called when users want to hide the mouse cursor |
|
|
|
void ShowCursor(bool show_cursor); |
|
|
|
|
|
|
|
/// Called when user passes the fullscreen parameter flag |
|
|
|
void Fullscreen(); |
|
|
|
|
|
|
|
|
|
|
|
@ -111,6 +111,7 @@ EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsyste |
|
|
|
|
|
|
|
if (fullscreen) { |
|
|
|
Fullscreen(); |
|
|
|
ShowCursor(false); |
|
|
|
} |
|
|
|
|
|
|
|
window_context = SDL_GL_CreateContext(render_window); |
|
|
|
|
|
|
|
@ -45,6 +45,7 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste |
|
|
|
|
|
|
|
if (fullscreen) { |
|
|
|
Fullscreen(); |
|
|
|
ShowCursor(false); |
|
|
|
} |
|
|
|
|
|
|
|
switch (wm.subsystem) { |
|
|
|
|