diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2019-10-28 11:36:02 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2019-10-28 11:36:02 +0000 |
commit | 016965961768585a254779860c43c4d4a273787e (patch) | |
tree | d6a0fd7e2e0aaf2101b8b14eaf87709580663a43 /graphics/milton/files | |
parent | 29de0f1c0554c5c2ee8b5d78e05b5ba5e47b0048 (diff) | |
download | ports-016965961768585a254779860c43c4d4a273787e.tar.gz ports-016965961768585a254779860c43c4d4a273787e.zip |
Notes
Diffstat (limited to 'graphics/milton/files')
-rw-r--r-- | graphics/milton/files/patch-src_platform__linux.cc | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/graphics/milton/files/patch-src_platform__linux.cc b/graphics/milton/files/patch-src_platform__linux.cc index 81071792e359..c820293a151c 100644 --- a/graphics/milton/files/patch-src_platform__linux.cc +++ b/graphics/milton/files/patch-src_platform__linux.cc @@ -18,16 +18,7 @@ } void -@@ -148,7 +150,7 @@ platform_dialog_yesno(char* info, char* title) - } - - YesNoCancelAnswer --platform_dialog_yesnocancel(char* info, char* title); -+platform_dialog_yesnocancel(char* info, char* title) - { - // NOTE: As of 2019-09-23, this function hasn't been tested on Linux. - -@@ -342,5 +344,32 @@ platform_deinit(PlatformState* platform) +@@ -357,7 +359,14 @@ platform_deinit(PlatformState* platform) void platform_setup_cursor(Arena* arena, PlatformState* platform) { @@ -39,24 +30,6 @@ + + SDL_SetWindowIcon(platform->window, surface); + SDL_FreeSurface(surface); -+} -+ -+v2i -+platform_cursor_get_position(PlatformState* platform) -+{ -+ v2i pos; -+ -+ SDL_GetMouseState(&pos.x, &pos.y); -+ return pos; -+} -+ -+void -+platform_cursor_set_position(PlatformState* platform, v2i pos) -+{ -+ SDL_WarpMouseInWindow(platform->window, pos.x, pos.y); -+ -+ // Pending mouse move events will have the cursor close -+ // to where it was before we set it. -+ SDL_FlushEvent(SDL_MOUSEMOTION); -+ SDL_FlushEvent(SDL_SYSWMEVENT); } + + v2i |