You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add support for the WinTab API for pen input. (3.2)
This commit is contained in:
@@ -134,6 +134,7 @@ static bool init_always_on_top = false;
|
||||
static bool init_use_custom_pos = false;
|
||||
static Vector2 init_custom_pos;
|
||||
static bool force_lowdpi = false;
|
||||
static bool disable_wintab = false;
|
||||
|
||||
// Debug
|
||||
|
||||
@@ -262,6 +263,7 @@ void Main::print_help(const char *p_binary) {
|
||||
OS::get_singleton()->print(" --no-window Disable window creation (Windows only). Useful together with --script.\n");
|
||||
OS::get_singleton()->print(" --enable-vsync-via-compositor When vsync is enabled, vsync via the OS' window compositor (Windows only).\n");
|
||||
OS::get_singleton()->print(" --disable-vsync-via-compositor Disable vsync via the OS' window compositor (Windows only).\n");
|
||||
OS::get_singleton()->print(" --disable-wintab Disable WinTab API and always use Windows Ink API for the pen input (Windows only).\n");
|
||||
OS::get_singleton()->print("\n");
|
||||
#endif
|
||||
|
||||
@@ -604,6 +606,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
} else if (I->get() == "--no-window") { // disable window creation (Windows only)
|
||||
|
||||
OS::get_singleton()->set_no_window_mode(true);
|
||||
} else if (I->get() == "--disable-wintab") {
|
||||
|
||||
disable_wintab = true;
|
||||
} else if (I->get() == "--enable-vsync-via-compositor") {
|
||||
|
||||
video_mode.vsync_via_compositor = true;
|
||||
@@ -1048,6 +1053,13 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
|
||||
OS::get_singleton()->_vsync_via_compositor = video_mode.vsync_via_compositor;
|
||||
|
||||
if (!disable_wintab) {
|
||||
// No "--disable_wintab" option
|
||||
disable_wintab = GLOBAL_DEF("display/window/disable_wintab_api", false);
|
||||
}
|
||||
|
||||
OS::get_singleton()->_disable_wintab = disable_wintab;
|
||||
|
||||
OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false);
|
||||
video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user