mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 09:55:45 +00:00
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
This commit is contained in:
parent
5f5a6e4b2e
commit
45e13b03f3
101 changed files with 309 additions and 303 deletions
|
@ -129,7 +129,7 @@ void JoyconDriver::InputThread(std::stop_token stop_token) {
|
|||
input_thread_running = true;
|
||||
|
||||
// Max update rate is 5ms, ensure we are always able to read a bit faster
|
||||
constexpr int ThreadDelay = 2;
|
||||
constexpr static int ThreadDelay = 2;
|
||||
std::vector<u8> buffer(MaxBufferSize);
|
||||
|
||||
while (!stop_token.stop_requested()) {
|
||||
|
@ -548,7 +548,7 @@ DriverResult JoyconDriver::GetDeviceType(SDL_hid_device_info* device_info,
|
|||
{0x2007, ControllerType::Right},
|
||||
{0x2009, ControllerType::Pro},
|
||||
};
|
||||
constexpr u16 nintendo_vendor_id = 0x057e;
|
||||
constexpr static u16 nintendo_vendor_id = 0x057e;
|
||||
|
||||
controller_type = ControllerType::None;
|
||||
if (device_info->vendor_id != nintendo_vendor_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue