diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 28a9cb196c..9cfcda634b 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -519,7 +519,7 @@ static bool thread_frame(void *data, const void *frame_, settings_t *settings = config_get_ptr(); retro_time_t target_frame_time = (retro_time_t) - roundf(1000000LL / settings->video.refresh_rate); + roundf(1000000 / settings->video.refresh_rate); retro_time_t target = thr->last_time + target_frame_time; /* Ideally, use absolute time, but that is only a good idea on POSIX. */ diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c index ca534a769b..cd16299297 100644 --- a/input/drivers_joypad/udev_joypad.c +++ b/input/drivers_joypad/udev_joypad.c @@ -81,7 +81,7 @@ static struct udev_joypad udev_pads[MAX_USERS]; static INLINE int16_t udev_compute_axis(const struct input_absinfo *info, int value) { int range = info->maximum - info->minimum; - int axis = (value - info->minimum) * 0xffffll / range - 0x7fffll; + int axis = (value - info->minimum) * 0xffff / range - 0x7fff; if (axis > 0x7fff) return 0x7fff; diff --git a/input/input_driver.h b/input/input_driver.h index 44f9ae1adb..9d0414529b 100644 --- a/input/input_driver.h +++ b/input/input_driver.h @@ -33,7 +33,7 @@ extern "C" { #endif -typedef uint64_t retro_input_t ; +typedef uint64_t retro_input_t; struct retro_keybind { diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c index 2ae41df5e5..632da982aa 100644 --- a/libretro-common/rthreads/rthreads.c +++ b/libretro-common/rthreads/rthreads.c @@ -412,11 +412,11 @@ bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us) clock_gettime(CLOCK_REALTIME, &now); #endif - now.tv_sec += timeout_us / 1000000LL; - now.tv_nsec += timeout_us * 1000LL; + now.tv_sec += timeout_us / 1000000; + now.tv_nsec += timeout_us * 1000; - now.tv_sec += now.tv_nsec / 1000000000LL; - now.tv_nsec = now.tv_nsec % 1000000000LL; + now.tv_sec += now.tv_nsec / 1000000000; + now.tv_nsec = now.tv_nsec % 1000000000; ret = pthread_cond_timedwait(&cond->cond, &lock->lock, &now); return (ret == 0); diff --git a/libretro-db/rmsgpack.c b/libretro-db/rmsgpack.c index 97acaaf837..df1941643f 100644 --- a/libretro-db/rmsgpack.c +++ b/libretro-db/rmsgpack.c @@ -540,7 +540,7 @@ int rmsgpack_read(FILE *fp, case 0xcd: case 0xce: case 0xcf: - tmp_len = 1ULL << (type - 0xcc); + tmp_len = 1UL << (type - 0xcc); tmp_uint = 0; if (read_uint(fp, &tmp_uint, tmp_len) == -1) return -errno; @@ -552,7 +552,7 @@ int rmsgpack_read(FILE *fp, case 0xd1: case 0xd2: case 0xd3: - tmp_len = 1ULL << (type - 0xd0); + tmp_len = 1UL << (type - 0xd0); tmp_int = 0; if (read_int(fp, &tmp_int, tmp_len) == -1) return -errno; diff --git a/libretro_version_1.c b/libretro_version_1.c index a8dd8df8a6..5c24e47875 100644 --- a/libretro_version_1.c +++ b/libretro_version_1.c @@ -336,9 +336,9 @@ static INLINE void input_poll_overlay(input_overlay_t *overlay_device, float opa if (driver->overlay_state.analog[j]) continue; - if (driver->overlay_state.buttons & (1ULL << bind_plus)) + if (driver->overlay_state.buttons & (1UL << bind_plus)) driver->overlay_state.analog[j] += 0x7fff; - if (driver->overlay_state.buttons & (1ULL << bind_minus)) + if (driver->overlay_state.buttons & (1UL << bind_minus)) driver->overlay_state.analog[j] -= 0x7fff; } @@ -359,13 +359,13 @@ static INLINE void input_poll_overlay(input_overlay_t *overlay_device, float opa analog_y = (float)driver->overlay_state.analog[analog_base + 1] / 0x7fff; if (analog_x <= -settings->input.axis_threshold) - driver->overlay_state.buttons |= (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT); + driver->overlay_state.buttons |= (1UL << RETRO_DEVICE_ID_JOYPAD_LEFT); if (analog_x >= settings->input.axis_threshold) - driver->overlay_state.buttons |= (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT); + driver->overlay_state.buttons |= (1UL << RETRO_DEVICE_ID_JOYPAD_RIGHT); if (analog_y <= -settings->input.axis_threshold) - driver->overlay_state.buttons |= (1ULL << RETRO_DEVICE_ID_JOYPAD_UP); + driver->overlay_state.buttons |= (1UL << RETRO_DEVICE_ID_JOYPAD_UP); if (analog_y >= settings->input.axis_threshold) - driver->overlay_state.buttons |= (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN); + driver->overlay_state.buttons |= (1UL << RETRO_DEVICE_ID_JOYPAD_DOWN); break; } diff --git a/menu/menu_input.c b/menu/menu_input.c index 1da347198a..d800bb6af0 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -969,12 +969,12 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input) static bool initial_held = true; static bool first_held = false; static const retro_input_t input_repeat = - (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) - | (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) - | (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) - | (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) - | (1ULL << RETRO_DEVICE_ID_JOYPAD_L) - | (1ULL << RETRO_DEVICE_ID_JOYPAD_R); + (1UL << RETRO_DEVICE_ID_JOYPAD_UP) + | (1UL << RETRO_DEVICE_ID_JOYPAD_DOWN) + | (1UL << RETRO_DEVICE_ID_JOYPAD_LEFT) + | (1UL << RETRO_DEVICE_ID_JOYPAD_RIGHT) + | (1UL << RETRO_DEVICE_ID_JOYPAD_L) + | (1UL << RETRO_DEVICE_ID_JOYPAD_R); menu_navigation_t *nav = menu_navigation_get_ptr(); menu_handle_t *menu = menu_driver_get_ptr(); menu_display_t *disp = menu_display_get_ptr();