Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeralChild64 <unknown>2022-11-03 02:03:25 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2022-11-04 06:11:22 +0300
commit7c14affc646665d1907ce32b334a15f8c384e818 (patch)
tree688c0b1008fcb0c8e10bc1793969fb2d6f82ea83 /include
parentd1d8f515df0ca0bfbc031cfdc2853bb2daf83aa9 (diff)
Add mouse related hints to title bar
Diffstat (limited to 'include')
-rw-r--r--include/sdlmain.h6
-rw-r--r--include/video.h13
2 files changed, 19 insertions, 0 deletions
diff --git a/include/sdlmain.h b/include/sdlmain.h
index 5dbc4e4be..05c70eeaf 100644
--- a/include/sdlmain.h
+++ b/include/sdlmain.h
@@ -165,6 +165,12 @@ struct SDL_Block {
SCREEN_TYPES want_type = SCREEN_SURFACE;
} desktop = {};
struct {
+ int num_cycles = 0;
+ std::string hint_mouse_str = {};
+ std::string hint_paused_str = {};
+ std::string cycles_ms_str = {};
+ } title_bar = {};
+ struct {
VsyncPreference when_windowed = {};
VsyncPreference when_fullscreen = {};
VSYNC_STATE current = VSYNC_STATE::ON;
diff --git a/include/video.h b/include/video.h
index 1b3b741dd..77539600e 100644
--- a/include/video.h
+++ b/include/video.h
@@ -82,6 +82,19 @@ void GFX_GetSize(int &width, int &height, bool &fullscreen);
void GFX_LosingFocus();
void GFX_RegenerateWindow(Section *sec);
+enum class MouseHint {
+ None, // no hint to display
+ NoMouse, // no mouse mode
+ CapturedHotkey, // mouse captured, use hotkey to release
+ CapturedHotkeyMiddle, // mouse captured, use hotkey or middle-click to release
+ ReleasedHotkey, // mouse released, use hotkey to capture
+ ReleasedHotkeyMiddle, // mouse released, use hotkey or middle-click to capture
+ ReleasedHotkeyAnyButton, // mouse released, use hotkey or any click to capture
+ SeamlessHotkey, // seamless mouse, use hotkey to capture
+ SeamlessHotkeyMiddle, // seamless mouse, use hotkey or middle-click to capture
+};
+
+void GFX_SetMouseHint(const MouseHint requested_hint_id);
void GFX_SetMouseCapture(const bool requested_capture);
void GFX_SetMouseVisibility(const bool requested_visible);
void GFX_SetMouseRawInput(const bool requested_raw_input);