Address PR feedback.

This commit is contained in:
Brian Phlipot
2023-02-02 11:54:17 -08:00
committed by teejusb
parent 4a6b1a743c
commit d079940fea
44 changed files with 259 additions and 236 deletions
@@ -771,8 +771,8 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm
}
}
inline constexpr auto XINPUT_GAMEPAD_THUMB_MIN = std::numeric_limits<short>::min();
inline constexpr auto XINPUT_GAMEPAD_THUMB_MAX = std::numeric_limits<short>::max();
inline constexpr short XINPUT_GAMEPAD_THUMB_MIN = std::numeric_limits<short>::min();
inline constexpr short XINPUT_GAMEPAD_THUMB_MAX = std::numeric_limits<short>::max();
void InputHandler_DInput::UpdateXInput( XIDevice &device, const RageTimer &tm )
{
@@ -263,6 +263,9 @@ EventDevice::~EventDevice()
}
InputHandler_Linux_Event::InputHandler_Linux_Event()
: m_NextDevice(DEVICE_JOY10)
, m_bShutdown(true)
, m_bDevicesChanged(false)
{
if(LINUXINPUT == nullptr) LINUXINPUT = new LinuxInputManager;
LINUXINPUT->InitDriver(this);
@@ -23,8 +23,8 @@ private:
void InputThread();
RageThread m_InputThread;
InputDevice m_NextDevice{DEVICE_JOY10};
bool m_bShutdown{true}, m_bDevicesChanged{false};
InputDevice m_NextDevice;
bool m_bShutdown, m_bDevicesChanged;
};
#define USE_INPUT_HANDLER_LINUX_JOYSTICK
@@ -388,8 +388,8 @@ RString LowLevelWindow_X11::TryVideoMode( const VideoModeParams &p, bool &bNewDe
// with as close to our desired refresh rate as possible.
for (int i = 0; i < scrRes->nmode; i++) {
const XRRModeInfo &thisMI = scrRes->modes[i];
const auto modeWidth = bPortrait ? thisMI.height : thisMI.width;
const auto modeHeight = bPortrait ? thisMI.width : thisMI.height;
const unsigned int modeWidth = bPortrait ? thisMI.height : thisMI.width;
const unsigned int modeHeight = bPortrait ? thisMI.width : thisMI.height;
if (p.width >= 0 && p.height >= 0 && modeWidth == static_cast<uint32_t>(p.width) && modeHeight == static_cast<uint32_t>(p.height)) {
float fTempRefresh = calcRandRRefresh(thisMI.dotClock, thisMI.hTotal, thisMI.vTotal);
float fTempDiff = std::abs(p.rate - fTempRefresh);