Skip to content

Commit

Permalink
Client: Options: Enable WindowsCursor only on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Aug 24, 2024
1 parent 8e26c22 commit 1280ee9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/game/client/gameui/options/options_general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "hud.h"
#include "cl_util.h"
#include "engine_patches.h"
#include "sdl_rt.h"

extern ConVar m_input;

Expand Down Expand Up @@ -51,11 +52,9 @@ CGeneralSubOptions::CGeneralSubOptions(vgui2::Panel *parent)
LoadControlSettings(VGUI2_ROOT_DIR "resource/options/GeneralSubOptions.res");

// Disable unsupported input methods
if (!IsWindows())
m_pInputMethodBox->SetItemEnabled(m_InputMethodItems[1], false);

if (!CEnginePatches::Get().IsSDLEngine())
m_pInputMethodBox->SetItemEnabled(m_InputMethodItems[2], false);
m_pInputMethodBox->SetItemEnabled(m_InputMethodItems[0], IsWindows()); // WindowsCursor
m_pInputMethodBox->SetItemEnabled(m_InputMethodItems[1], IsWindows()); // DirectInput
m_pInputMethodBox->SetItemEnabled(m_InputMethodItems[2], GetSDL()->IsGood()); // RawInput

// Disable HTML MOTD if SteamAPI not available
if (!SteamAPI_IsAvailable())
Expand Down

0 comments on commit 1280ee9

Please sign in to comment.