mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-04 06:11:17 +00:00
commit
7310950341
@ -36,7 +36,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef XMB_DELAY
|
||||
#define XMB_DELAY 0.02
|
||||
#define XMB_DELAY 10
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
@ -1135,7 +1135,7 @@ static void xmb_frame(void)
|
||||
if (!gl)
|
||||
return;
|
||||
|
||||
menu_animation_update(menu->animation, 0.002);
|
||||
menu_animation_update(menu->animation, menu->dt / IDEAL_DT);
|
||||
|
||||
glViewport(0, 0, gl->win_width, gl->win_height);
|
||||
|
||||
|
11
menu/menu.c
11
menu/menu.c
@ -21,6 +21,7 @@
|
||||
#include "../dynamic.h"
|
||||
#include "../frontend/frontend.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../performance.h"
|
||||
#include <file/file_path.h>
|
||||
|
||||
/**
|
||||
@ -377,6 +378,16 @@ int menu_iterate(retro_input_t input,
|
||||
int32_t ret = 0;
|
||||
unsigned action = menu_input_frame(input, trigger_input);
|
||||
|
||||
menu_handle_t *menu = menu_driver_resolve();
|
||||
|
||||
menu->cur_time = rarch_get_time_usec();
|
||||
menu->dt = menu->cur_time - menu->old_time;
|
||||
if (menu->dt >= IDEAL_DT * 4)
|
||||
menu->dt = IDEAL_DT * 4;
|
||||
if (menu->dt <= IDEAL_DT / 4)
|
||||
menu->dt = IDEAL_DT / 4;
|
||||
menu->old_time = menu->cur_time;
|
||||
|
||||
if (driver.menu_ctx)
|
||||
{
|
||||
if (driver.menu_ctx->set_texture)
|
||||
|
@ -42,6 +42,9 @@
|
||||
#define MENU_SETTINGS_CORE_OPTION_NONE 0xffff
|
||||
#define MENU_SETTINGS_CORE_OPTION_START 0x10000
|
||||
|
||||
#ifndef IDEAL_DT
|
||||
#define IDEAL_DT (1.0 / 60.0 * 1000000.0)
|
||||
#endif
|
||||
|
||||
#define MENU_KEYBOARD_BIND_TIMEOUT_SECONDS 5
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "menu_database.h"
|
||||
#include "../settings_list.h"
|
||||
#include "../playlist.h"
|
||||
#include "../../libretro.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -98,11 +99,16 @@ typedef struct
|
||||
{
|
||||
void *userdata;
|
||||
|
||||
/* Delta timing */
|
||||
float dt;
|
||||
retro_time_t cur_time;
|
||||
retro_time_t old_time;
|
||||
|
||||
/* Used for key repeat */
|
||||
struct
|
||||
{
|
||||
unsigned timer;
|
||||
unsigned count;
|
||||
float timer;
|
||||
float count;
|
||||
} delay;
|
||||
|
||||
size_t begin;
|
||||
|
@ -497,7 +497,7 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
|
||||
|
||||
menu->mouse.enable = g_settings.menu.mouse_enable;
|
||||
|
||||
menu->delay.count++;
|
||||
menu->delay.count += menu->dt / IDEAL_DT;
|
||||
|
||||
if (driver.block_input)
|
||||
trigger_input = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user