mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-31 02:35:46 +01:00
mouse drag in linux
This commit is contained in:
@@ -531,32 +531,6 @@ bool platform_file_delete(const utf8 *path)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void platform_hide_cursor()
|
||||
{
|
||||
STUB();
|
||||
}
|
||||
|
||||
void platform_show_cursor()
|
||||
{
|
||||
STUB();
|
||||
}
|
||||
|
||||
void platform_get_cursor_position(int *x, int *y)
|
||||
{
|
||||
STUB();
|
||||
}
|
||||
|
||||
void platform_set_cursor_position(int x, int y)
|
||||
{
|
||||
STUB();
|
||||
}
|
||||
|
||||
unsigned int platform_get_ticks()
|
||||
{
|
||||
STUB();
|
||||
return 100;
|
||||
}
|
||||
|
||||
wchar_t *regular_to_wchar(const char* src)
|
||||
{
|
||||
int len = strnlen(src, MAX_PATH);
|
||||
|
||||
@@ -907,3 +907,28 @@ static void platform_refresh_screenbuffer(int width, int height, int pitch)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_DIRTY_BLOCK_COLUMNS, uint32) = (width >> 6) + 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_DIRTY_BLOCK_ROWS, uint32) = (height >> 3) + 1;
|
||||
}
|
||||
|
||||
void platform_hide_cursor()
|
||||
{
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
}
|
||||
|
||||
void platform_show_cursor()
|
||||
{
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
}
|
||||
|
||||
void platform_get_cursor_position(int *x, int *y)
|
||||
{
|
||||
SDL_GetMouseState(x, y);
|
||||
}
|
||||
|
||||
void platform_set_cursor_position(int x, int y)
|
||||
{
|
||||
SDL_WarpMouseInWindow(NULL, x, y);
|
||||
}
|
||||
|
||||
unsigned int platform_get_ticks()
|
||||
{
|
||||
return SDL_GetTicks();
|
||||
}
|
||||
@@ -378,39 +378,6 @@ bool platform_file_delete(const utf8 *path)
|
||||
return success == TRUE;
|
||||
}
|
||||
|
||||
void platform_hide_cursor()
|
||||
{
|
||||
ShowCursor(FALSE);
|
||||
}
|
||||
|
||||
void platform_show_cursor()
|
||||
{
|
||||
ShowCursor(TRUE);
|
||||
}
|
||||
|
||||
void platform_get_cursor_position(int *x, int *y)
|
||||
{
|
||||
POINT point;
|
||||
|
||||
if (GetCursorPos(&point)) {
|
||||
*x = point.x;
|
||||
*y = point.y;
|
||||
} else {
|
||||
*x = INT32_MIN;
|
||||
*y = INT32_MIN;
|
||||
}
|
||||
}
|
||||
|
||||
void platform_set_cursor_position(int x, int y)
|
||||
{
|
||||
SetCursorPos(x, y);
|
||||
}
|
||||
|
||||
unsigned int platform_get_ticks()
|
||||
{
|
||||
return GetTickCount();
|
||||
}
|
||||
|
||||
void platform_get_user_directory(utf8 *outPath, const utf8 *subDirectory)
|
||||
{
|
||||
wchar_t wOutPath[MAX_PATH];
|
||||
|
||||
Reference in New Issue
Block a user