mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
Hide Cursor
Hiding Cursor implemented
This commit is contained in:
parent
5602debb22
commit
1435962bed
@ -11,9 +11,18 @@
|
|||||||
#include "core/libraries/pad/pad.h"
|
#include "core/libraries/pad/pad.h"
|
||||||
#include "input/controller.h"
|
#include "input/controller.h"
|
||||||
#include "sdl_window.h"
|
#include "sdl_window.h"
|
||||||
|
#include <SDL3/SDL_mouse.h>
|
||||||
|
|
||||||
namespace Frontend {
|
namespace Frontend {
|
||||||
|
|
||||||
|
void WindowSDL::CursorVisibility(bool cursor_visibility) {
|
||||||
|
if (cursor_visibility) {
|
||||||
|
SDL_HideCursor();
|
||||||
|
} else {
|
||||||
|
SDL_ShowCursor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_)
|
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_)
|
||||||
: width{width_}, height{height_}, controller{controller_} {
|
: width{width_}, height{height_}, controller{controller_} {
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||||
@ -36,6 +45,7 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDL_SetWindowFullscreen(window, Config::isFullscreenMode());
|
SDL_SetWindowFullscreen(window, Config::isFullscreenMode());
|
||||||
|
CursorVisibility(true);
|
||||||
|
|
||||||
#if defined(SDL_PLATFORM_WIN32)
|
#if defined(SDL_PLATFORM_WIN32)
|
||||||
window_info.type = WindowSystemType::Windows;
|
window_info.type = WindowSystemType::Windows;
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
void onResize();
|
void onResize();
|
||||||
void onKeyPress(const SDL_Event* event);
|
void onKeyPress(const SDL_Event* event);
|
||||||
|
void CursorVisibility(bool cursor_visibility);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
s32 width;
|
s32 width;
|
||||||
|
Loading…
Reference in New Issue
Block a user