Enable "Allow Hidpi" by default
This fixes window management issues across platforms on hiDPI monitors. The `--low-dpi` command line argument has been removed as similar functionality (forcing low-DPI mode on DPI-aware programs) is already provided by Windows and macOS itself.
This commit is contained in:
parent
be665ddff9
commit
0a86dd4718
|
@ -480,8 +480,9 @@
|
||||||
<member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2(10, 10)">
|
<member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2(10, 10)">
|
||||||
Position offset for tooltips, relative to the mouse cursor's hotspot.
|
Position offset for tooltips, relative to the mouse cursor's hotspot.
|
||||||
</member>
|
</member>
|
||||||
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
|
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="true">
|
||||||
If [code]true[/code], allows HiDPI display on Windows, macOS, and the HTML5 platform. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
|
If [code]true[/code], allows HiDPI display on Windows, macOS, Android, iOS and HTML5. If [code]false[/code], the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]multiple resolutions[/url] instead of disabling this setting.
|
||||||
|
[b]Note:[/b] This setting has no effect on Linux as DPI-awareness fallbacks are not supported there.
|
||||||
</member>
|
</member>
|
||||||
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
|
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
|
||||||
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
|
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
|
||||||
|
|
|
@ -164,7 +164,6 @@ static bool init_windowed = false;
|
||||||
static bool init_always_on_top = false;
|
static bool init_always_on_top = false;
|
||||||
static bool init_use_custom_pos = false;
|
static bool init_use_custom_pos = false;
|
||||||
static Vector2 init_custom_pos;
|
static Vector2 init_custom_pos;
|
||||||
static bool force_lowdpi = false;
|
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
|
|
||||||
|
@ -340,7 +339,6 @@ void Main::print_help(const char *p_binary) {
|
||||||
OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n");
|
OS::get_singleton()->print(" -t, --always-on-top Request an always-on-top window.\n");
|
||||||
OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
|
OS::get_singleton()->print(" --resolution <W>x<H> Request window resolution.\n");
|
||||||
OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
|
OS::get_singleton()->print(" --position <X>,<Y> Request window position.\n");
|
||||||
OS::get_singleton()->print(" --low-dpi Force low-DPI mode (macOS and Windows only).\n");
|
|
||||||
OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
|
OS::get_singleton()->print(" --single-window Use a single window (no separate subwindows).\n");
|
||||||
OS::get_singleton()->print(" --tablet-driver Pen tablet input driver.\n");
|
OS::get_singleton()->print(" --tablet-driver Pen tablet input driver.\n");
|
||||||
OS::get_singleton()->print("\n");
|
OS::get_singleton()->print("\n");
|
||||||
|
@ -870,9 +868,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (I->get() == "--low-dpi") { // force low DPI (macOS only)
|
|
||||||
|
|
||||||
force_lowdpi = true;
|
|
||||||
} else if (I->get() == "--headless") { // enable headless mode (no audio, no rendering).
|
} else if (I->get() == "--headless") { // enable headless mode (no audio, no rendering).
|
||||||
|
|
||||||
audio_driver = "Dummy";
|
audio_driver = "Dummy";
|
||||||
|
@ -1365,9 +1360,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
GLOBAL_DEF("internationalization/rendering/force_right_to_left_layout_direction", false);
|
GLOBAL_DEF("internationalization/rendering/force_right_to_left_layout_direction", false);
|
||||||
GLOBAL_DEF("internationalization/locale/include_text_server_data", false);
|
GLOBAL_DEF("internationalization/locale/include_text_server_data", false);
|
||||||
|
|
||||||
if (!force_lowdpi) {
|
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", true);
|
||||||
OS::get_singleton()->_allow_hidpi = GLOBAL_DEF("display/window/dpi/allow_hidpi", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: Restore support.
|
// FIXME: Restore support.
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -49,7 +49,6 @@ _arguments \
|
||||||
'(-t --always-on-top)'{-t,--always-on-top}'[request an always-on-top window]' \
|
'(-t --always-on-top)'{-t,--always-on-top}'[request an always-on-top window]' \
|
||||||
'--resolution[request window resolution]:resolution in WxH format' \
|
'--resolution[request window resolution]:resolution in WxH format' \
|
||||||
'--position[request window position]:position in X,Y format' \
|
'--position[request window position]:position in X,Y format' \
|
||||||
'--low-dpi[force low-DPI mode (macOS and Windows only)]' \
|
|
||||||
'--headless[enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script]' \
|
'--headless[enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script]' \
|
||||||
'(-d --debug)'{-d,--debug}'[debug (local stdout debugger)]' \
|
'(-d --debug)'{-d,--debug}'[debug (local stdout debugger)]' \
|
||||||
'(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \
|
'(-b --breakpoints)'{-b,--breakpoints}'[specify the breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead)]:breakpoint list' \
|
||||||
|
|
|
@ -52,7 +52,6 @@ _complete_godot_options() {
|
||||||
--always-on-top
|
--always-on-top
|
||||||
--resolution
|
--resolution
|
||||||
--position
|
--position
|
||||||
--low-dpi
|
|
||||||
--headless
|
--headless
|
||||||
--debug
|
--debug
|
||||||
--breakpoints
|
--breakpoints
|
||||||
|
|
|
@ -59,7 +59,6 @@ complete -c godot -s w -l windowed -d "Request windowed mode"
|
||||||
complete -c godot -s t -l always-on-top -d "Request an always-on-top window"
|
complete -c godot -s t -l always-on-top -d "Request an always-on-top window"
|
||||||
complete -c godot -l resolution -d "Request window resolution" -x
|
complete -c godot -l resolution -d "Request window resolution" -x
|
||||||
complete -c godot -l position -d "Request window position" -x
|
complete -c godot -l position -d "Request window position" -x
|
||||||
complete -c godot -l low-dpi -d "Force low-DPI mode (macOS and Windows only)"
|
|
||||||
complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script"
|
complete -c godot -l headless -d "Enable headless mode (--display-driver headless --audio-driver Dummy). Useful for servers and with --script"
|
||||||
|
|
||||||
# Debug options:
|
# Debug options:
|
||||||
|
|
Loading…
Reference in New Issue