From 5241d3e5d64ea453bba840b03ccfb8d25ed17774 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 20 Jan 2022 06:09:21 +0100 Subject: [PATCH] Cleanups --- input/input_driver.c | 16 +++++++--------- libretro-common/vfs/vfs_implementation_uwp.cpp | 5 +---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 8a206801f5..b81c1f4918 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -3521,9 +3521,8 @@ void input_keys_pressed( unsigned i; input_driver_state_t *input_st = &input_driver_st; - if(!binds || !binds[port]) { + if(!binds || !binds[port]) return; - } if (CHECK_INPUT_DRIVER_BLOCK_HOTKEY(binds_norm, binds_auto)) { @@ -3785,18 +3784,17 @@ int16_t input_state_device( input_st->turbo_btns.enable[port] = enable_new; } } - else if (turbo_mode == INPUT_TURBO_MODE_SINGLEBUTTON_HOLD && - input_st->turbo_btns.enable[port] && - input_st->turbo_btns.mode1_enable[port]) - { - /* Hold mode stops turbo on release */ + /* Hold mode stops turbo on release */ + else if ( + turbo_mode == INPUT_TURBO_MODE_SINGLEBUTTON_HOLD + && input_st->turbo_btns.enable[port] + && input_st->turbo_btns.mode1_enable[port]) input_st->turbo_btns.mode1_enable[port] = 0; - } if (!res && input_st->turbo_btns.mode1_enable[port] && input_st->turbo_btns.enable[port] & (1 << id)) { - /* if turbo button is enabled for this key ID */ + /* If turbo button is enabled for this key ID */ res = (( input_st->turbo_btns.count % settings->uints.input_turbo_period) < settings->uints.input_turbo_duty_cycle); diff --git a/libretro-common/vfs/vfs_implementation_uwp.cpp b/libretro-common/vfs/vfs_implementation_uwp.cpp index 969f454fb1..6b797f7ed8 100644 --- a/libretro-common/vfs/vfs_implementation_uwp.cpp +++ b/libretro-common/vfs/vfs_implementation_uwp.cpp @@ -225,10 +225,7 @@ int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file* stream, } if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0) - { - return fread(s, 1, (size_t)len, stream->fp); - } - DWORD BytesRead; + return fread(s, 1, (size_t)len, stream->fp); return read(stream->fd, s, (size_t)len); }