mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-04 01:17:28 +00:00
(Android) Another Xperia Play hack
(Context) Context file changes to do with FPS reporting
This commit is contained in:
parent
73bfae9602
commit
ef2406e8f6
@ -310,7 +310,7 @@ static void *android_input_init(void)
|
|||||||
|
|
||||||
int zeus_id = -1;
|
int zeus_id = -1;
|
||||||
int zeus_second_id = -1;
|
int zeus_second_id = -1;
|
||||||
static unsigned zeus_port;
|
unsigned zeus_port;
|
||||||
|
|
||||||
static void android_input_set_keybinds(void *data, unsigned device,
|
static void android_input_set_keybinds(void *data, unsigned device,
|
||||||
unsigned port, unsigned id, unsigned keybind_action)
|
unsigned port, unsigned id, unsigned keybind_action)
|
||||||
@ -1141,16 +1141,8 @@ static void android_input_set_keybinds(void *data, unsigned device,
|
|||||||
strlcpy(g_settings.input.device_names[port], "Xperia Play",
|
strlcpy(g_settings.input.device_names[port], "Xperia Play",
|
||||||
sizeof(g_settings.input.device_names[port]));
|
sizeof(g_settings.input.device_names[port]));
|
||||||
|
|
||||||
if (zeus_id < 0)
|
if ((zeus_second_id != -1 && (zeus_second_id == id)))
|
||||||
{
|
{
|
||||||
RARCH_LOG("zeus_pad 1 detected: %d\n", id);
|
|
||||||
zeus_id = id;
|
|
||||||
zeus_port = port;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RARCH_LOG("zeus_pad 2 detected: %d\n", id);
|
|
||||||
zeus_second_id = id;
|
|
||||||
port = zeus_port;
|
port = zeus_port;
|
||||||
shift = 8 + (port * 8);
|
shift = 8 + (port * 8);
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,22 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
|
|||||||
input_autodetect_get_device_name(android_app, name_buf, sizeof(name_buf), id);
|
input_autodetect_get_device_name(android_app, name_buf, sizeof(name_buf), id);
|
||||||
RARCH_LOG("device name: %s\n", name_buf);
|
RARCH_LOG("device name: %s\n", name_buf);
|
||||||
|
|
||||||
|
/* Shitty hack put back in again */
|
||||||
|
if (strstr(name_buf, "keypad-game-zeus") || strstr(name_buf, "keypad-zeus"))
|
||||||
|
{
|
||||||
|
if (zeus_id < 0)
|
||||||
|
{
|
||||||
|
RARCH_LOG("zeus_pad 1 detected: %d\n", id);
|
||||||
|
zeus_id = id;
|
||||||
|
zeus_port = port;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RARCH_LOG("zeus_pad 2 detected: %d\n", id);
|
||||||
|
zeus_second_id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (g_settings.input.autodetect_enable)
|
if (g_settings.input.autodetect_enable)
|
||||||
{
|
{
|
||||||
device = 0;
|
device = 0;
|
||||||
|
@ -83,4 +83,9 @@ enum {
|
|||||||
|
|
||||||
void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned port, unsigned id, int source);
|
void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned port, unsigned id, int source);
|
||||||
|
|
||||||
|
/* Xperia Play externs */
|
||||||
|
extern unsigned zeus_port;
|
||||||
|
extern int zeus_id;
|
||||||
|
extern int zeus_second_id;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -191,9 +191,8 @@ static void gfx_ctx_update_window_title(void)
|
|||||||
gl_t *gl = (gl_t*)driver.video_data;
|
gl_t *gl = (gl_t*)driver.video_data;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
gfx_get_fps(buf, sizeof(buf), false);
|
if (gfx_get_fps(buf, sizeof(buf), false) &&
|
||||||
|
(g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) &&
|
||||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW) &&
|
|
||||||
gl->font_ctx)
|
gl->font_ctx)
|
||||||
{
|
{
|
||||||
font_params_t params = {0};
|
font_params_t params = {0};
|
||||||
|
@ -110,8 +110,7 @@ static void gfx_ctx_set_resize(unsigned width, unsigned height)
|
|||||||
static void gfx_ctx_update_window_title(void)
|
static void gfx_ctx_update_window_title(void)
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
if (gfx_get_fps(buf, sizeof(buf), false))
|
gfx_get_fps(buf, sizeof(buf), false);
|
||||||
RARCH_LOG("%s.\n", buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_ctx_get_video_size(unsigned *width, unsigned *height)
|
static void gfx_ctx_get_video_size(unsigned *width, unsigned *height)
|
||||||
|
@ -82,9 +82,8 @@ static void gfx_ctx_xdk_update_window_title(void)
|
|||||||
char buf[128];
|
char buf[128];
|
||||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||||
|
|
||||||
gfx_get_fps(buf, sizeof(buf), false);
|
if (gfx_get_fps(buf, sizeof(buf), false) &&
|
||||||
|
g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
||||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
|
||||||
{
|
{
|
||||||
#if defined(_XBOX1)
|
#if defined(_XBOX1)
|
||||||
float mem_width = font_x + 30;
|
float mem_width = font_x + 30;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user