diff --git a/src/application/application.cpp b/src/application/application.cpp index 68d14bab..55589458 100644 --- a/src/application/application.cpp +++ b/src/application/application.cpp @@ -58,6 +58,11 @@ Application::Application(char const *name, ivec2 resolution, float framerate) data = new ApplicationData(name, resolution, framerate); } +void Application::ShowPointer(bool show) +{ + data->app.ShowPointer(show); +} + void Application::Run() { data->app.Run(); diff --git a/src/application/application.h b/src/application/application.h index 69b08b6e..7ef14a68 100644 --- a/src/application/application.h +++ b/src/application/application.h @@ -27,6 +27,7 @@ public: Application(char const *name, ivec2 resolution, float framerate); ~Application(); + void ShowPointer(bool show); void Run(); private: diff --git a/src/platform/ps3/ps3app.cpp b/src/platform/ps3/ps3app.cpp index e873ef34..0f6865cd 100644 --- a/src/platform/ps3/ps3app.cpp +++ b/src/platform/ps3/ps3app.cpp @@ -109,6 +109,11 @@ Ps3App::Ps3App(char const *title, ivec2 res, float fps) : #endif } +void Ps3App::ShowPointer(bool show) +{ + ; +} + void Ps3App::Run() { while (!Ticker::Finished()) diff --git a/src/platform/ps3/ps3app.h b/src/platform/ps3/ps3app.h index 2fbf1f3e..cd02d4b2 100644 --- a/src/platform/ps3/ps3app.h +++ b/src/platform/ps3/ps3app.h @@ -29,6 +29,7 @@ public: Ps3App(char const *title, ivec2 res, float fps); virtual ~Ps3App(); + void ShowPointer(bool show); void Run(); private: diff --git a/src/platform/sdl/sdlapp.cpp b/src/platform/sdl/sdlapp.cpp index 8c8afc09..02a6867b 100644 --- a/src/platform/sdl/sdlapp.cpp +++ b/src/platform/sdl/sdlapp.cpp @@ -62,7 +62,6 @@ SdlApp::SdlApp(char const *title, ivec2 res, float fps) : } SDL_WM_SetCaption(title, NULL); - SDL_ShowCursor(0); /* Initialise everything */ Ticker::Setup(fps); @@ -74,6 +73,11 @@ SdlApp::SdlApp(char const *title, ivec2 res, float fps) : #endif } +void SdlApp::ShowPointer(bool show) +{ + SDL_ShowCursor(show ? 1 : 0); +} + void SdlApp::Run() { while (!Ticker::Finished()) diff --git a/src/platform/sdl/sdlapp.h b/src/platform/sdl/sdlapp.h index f7ec1b39..d7195e62 100644 --- a/src/platform/sdl/sdlapp.h +++ b/src/platform/sdl/sdlapp.h @@ -29,6 +29,7 @@ public: SdlApp(char const *title, ivec2 res, float fps); virtual ~SdlApp(); + void ShowPointer(bool show); void Run(); private: