mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
Get the game working
Mostly just needed to resolve screen size which is now retrieved via ui context.
This commit is contained in:
@@ -22,7 +22,17 @@
|
||||
|
||||
using namespace OpenRCT2::Ui;
|
||||
|
||||
CursorRepository::CursorRepository()
|
||||
CursorRepository::~CursorRepository()
|
||||
{
|
||||
for (size_t i = 0; i < CURSOR_COUNT; i++)
|
||||
{
|
||||
SDL_FreeCursor(_loadedCursors[i]);
|
||||
_loadedCursors[i] = nullptr;
|
||||
}
|
||||
_currentCursor = CURSOR_UNDEFINED;
|
||||
}
|
||||
|
||||
void CursorRepository::LoadCursors()
|
||||
{
|
||||
// Using system cursors
|
||||
_loadedCursors[CURSOR_ARROW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
|
||||
@@ -42,16 +52,6 @@ CursorRepository::CursorRepository()
|
||||
SetCurrentCursor(CURSOR_ARROW);
|
||||
}
|
||||
|
||||
CursorRepository::~CursorRepository()
|
||||
{
|
||||
for (size_t i = 0; i < CURSOR_COUNT; i++)
|
||||
{
|
||||
SDL_FreeCursor(_loadedCursors[i]);
|
||||
_loadedCursors[i] = nullptr;
|
||||
}
|
||||
_currentCursor = CURSOR_UNDEFINED;
|
||||
}
|
||||
|
||||
CURSOR_ID CursorRepository::GetCurrentCursor()
|
||||
{
|
||||
return _currentCursor;
|
||||
|
||||
Reference in New Issue
Block a user