Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add no font scaling option
  • Loading branch information
crosire committed Jun 5, 2018
1 parent 8c467e3 commit 36a0206
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/runtime.cpp
Expand Up @@ -753,6 +753,7 @@ namespace reshade
config.get("GENERAL", "ShowClock", _show_clock);
config.get("GENERAL", "ShowFPS", _show_framerate);
config.get("GENERAL", "FontGlobalScale", _imgui_context->IO.FontGlobalScale);
config.get("GENERAL", "NoFontScaling", _no_font_scaling);
config.get("GENERAL", "NoReloadOnInit", _no_reload_on_init);
config.get("GENERAL", "SaveWindowState", _save_imgui_window_state);

Expand Down Expand Up @@ -1138,7 +1139,7 @@ namespace reshade
imgui_io.MouseDown[i] = _input->is_mouse_button_down(i);
}

if (imgui_io.KeyCtrl)
if (imgui_io.KeyCtrl && !_no_font_scaling)
{
// Change global font scale if user presses the control key and moves the mouse wheel
imgui_io.FontGlobalScale = ImClamp(imgui_io.FontGlobalScale + imgui_io.MouseWheel * 0.10f, 0.2f, 2.50f);
Expand Down
1 change: 1 addition & 0 deletions source/runtime.hpp
Expand Up @@ -286,6 +286,7 @@ namespace reshade
bool _show_framerate = false;
bool _effects_enabled = true;
bool _is_fast_loading = false;
bool _no_font_scaling = false;
bool _no_reload_on_init = false;
bool _performance_mode = false;
bool _save_imgui_window_state = false;
Expand Down

0 comments on commit 36a0206

Please sign in to comment.