mirror of
https://github.com/libretro/RetroArch
synced 2025-02-22 03:40:43 +00:00
(Android) Buildfixes
This commit is contained in:
parent
9b79d150b4
commit
7131b969d8
@ -198,8 +198,7 @@ static struct sockaddr_storage lastcmd_net_source;
|
|||||||
static socklen_t lastcmd_net_source_len;
|
static socklen_t lastcmd_net_source_len;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CHEEVOS
|
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||||
#if defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)
|
|
||||||
static bool command_reply(const char * data, size_t len)
|
static bool command_reply(const char * data, size_t len)
|
||||||
{
|
{
|
||||||
switch (lastcmd_source)
|
switch (lastcmd_source)
|
||||||
@ -226,7 +225,6 @@ static bool command_reply(const char * data, size_t len)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
bool command_set_shader(const char *arg)
|
bool command_set_shader(const char *arg)
|
||||||
{
|
{
|
||||||
@ -254,7 +252,9 @@ static bool command_version(const char* arg)
|
|||||||
char reply[256] = {0};
|
char reply[256] = {0};
|
||||||
|
|
||||||
sprintf(reply, "%s\n", PACKAGE_VERSION);
|
sprintf(reply, "%s\n", PACKAGE_VERSION);
|
||||||
|
#if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING))
|
||||||
command_reply(reply, strlen(reply));
|
command_reply(reply, strlen(reply));
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1317,7 +1317,7 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig
|
|||||||
unsigned char *prev = cheat_manager_state.prev_memory_buf ;
|
unsigned char *prev = cheat_manager_state.prev_memory_buf ;
|
||||||
unsigned int curr_match_idx = 0;
|
unsigned int curr_match_idx = 0;
|
||||||
|
|
||||||
if ( target_match_idx < 0 || target_match_idx > cheat_manager_state.num_matches-1)
|
if ( target_match_idx > cheat_manager_state.num_matches-1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits);
|
cheat_manager_setup_search_meta(cheat_manager_state.search_bit_size, &bytes_per_item, &mask, &bits);
|
||||||
|
@ -2674,13 +2674,14 @@ static int action_ok_cheat_add_top(const char *path,
|
|||||||
|
|
||||||
for (i = cheat_manager_state.size-2 ; i >=0 ; i--)
|
for (i = cheat_manager_state.size-2 ; i >=0 ; i--)
|
||||||
{
|
{
|
||||||
memcpy(&cheat_manager_state.cheats[i+1], &cheat_manager_state.cheats[i], sizeof(struct item_cheat )) ;
|
memcpy(&cheat_manager_state.cheats[i+1],
|
||||||
|
&cheat_manager_state.cheats[i], sizeof(struct item_cheat )) ;
|
||||||
cheat_manager_state.cheats[i+1].idx++ ;
|
cheat_manager_state.cheats[i+1].idx++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&cheat_manager_state.cheats[0], &tmp, sizeof(struct item_cheat )) ;
|
memcpy(&cheat_manager_state.cheats[0], &tmp, sizeof(struct item_cheat )) ;
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_ADD_TOP_SUCCESS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_ADD_TOP_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
@ -2693,13 +2694,15 @@ static int action_ok_cheat_add_bottom(const char *path,
|
|||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
bool refresh = false ;
|
bool refresh = false ;
|
||||||
|
|
||||||
unsigned int new_size = cheat_manager_get_size() + 1;
|
unsigned int new_size = cheat_manager_get_size() + 1;
|
||||||
|
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO);
|
cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_ADD_BOTTOM_SUCCESS)) ;
|
msg[0] = '\0';
|
||||||
|
strlcpy(msg,
|
||||||
|
msg_hash_to_str(MSG_CHEAT_ADD_BOTTOM_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
@ -2711,7 +2714,7 @@ static int action_ok_cheat_delete_all(const char *path,
|
|||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
char msg[256] ;
|
char msg[256] ;
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_DELETE_ALL_INSTRUCTIONS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_DELETE_ALL_INSTRUCTIONS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 240, true);
|
runloop_msg_queue_push(msg, 1, 240, true);
|
||||||
@ -2743,7 +2746,7 @@ static int action_ok_cheat_add_new_after(const char *path,
|
|||||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_ADD_AFTER_SUCCESS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_ADD_AFTER_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
@ -2771,13 +2774,15 @@ static int action_ok_cheat_add_new_before(const char *path,
|
|||||||
cheat_manager_state.cheats[i+1].idx++ ;
|
cheat_manager_state.cheats[i+1].idx++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&cheat_manager_state.cheats[tmp.idx], &tmp, sizeof(struct item_cheat )) ;
|
memcpy(&cheat_manager_state.cheats[tmp.idx],
|
||||||
memcpy(&cheat_manager_state.working_cheat, &tmp, sizeof(struct item_cheat )) ;
|
&tmp, sizeof(struct item_cheat )) ;
|
||||||
|
memcpy(&cheat_manager_state.working_cheat,
|
||||||
|
&tmp, sizeof(struct item_cheat )) ;
|
||||||
|
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_ADD_BEFORE_SUCCESS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_ADD_BEFORE_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
@ -2810,7 +2815,7 @@ static int action_ok_cheat_copy_before(const char *path,
|
|||||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_COPY_BEFORE_SUCCESS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_COPY_BEFORE_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
@ -2844,7 +2849,7 @@ static int action_ok_cheat_copy_after(const char *path,
|
|||||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_COPY_AFTER_SUCCESS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_COPY_AFTER_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
@ -2872,7 +2877,7 @@ static int action_ok_cheat_delete(const char *path,
|
|||||||
|
|
||||||
cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO);
|
cheat_manager_realloc(new_size, CHEAT_HANDLER_TYPE_RETRO);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_DELETE_SUCCESS)) ;
|
strlcpy(msg, msg_hash_to_str(MSG_CHEAT_DELETE_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
|
@ -280,12 +280,14 @@ static int action_right_cheat_delete_all(unsigned type, const char *label,
|
|||||||
|
|
||||||
if ( ++cheat_manager_state.delete_state >= 5 )
|
if ( ++cheat_manager_state.delete_state >= 5 )
|
||||||
{
|
{
|
||||||
|
msg[0] = '\0';
|
||||||
cheat_manager_state.delete_state = 0 ;
|
cheat_manager_state.delete_state = 0 ;
|
||||||
cheat_manager_realloc(0, CHEAT_HANDLER_TYPE_EMU) ;
|
cheat_manager_realloc(0, CHEAT_HANDLER_TYPE_EMU) ;
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_SET_PREVENT_POPULATE, NULL);
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_CHEAT_DELETE_ALL_SUCCESS)) ;
|
strlcpy(msg,
|
||||||
|
msg_hash_to_str(MSG_CHEAT_DELETE_ALL_SUCCESS), sizeof(msg));
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
|
|
||||||
runloop_msg_queue_push(msg, 1, 180, true);
|
runloop_msg_queue_push(msg, 1, 180, true);
|
||||||
|
@ -443,20 +443,16 @@ static void setting_get_string_representation_uint_cheat_exact(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL),
|
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL),
|
||||||
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_lt(void *data,
|
static void setting_get_string_representation_uint_cheat_lt(void *data,
|
||||||
char *s, size_t len)
|
char *s, size_t len)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL), len);
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_gt(void *data,
|
static void setting_get_string_representation_uint_cheat_gt(void *data,
|
||||||
@ -464,9 +460,7 @@ static void setting_get_string_representation_uint_cheat_gt(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_GT_VAL), len);
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_GT_VAL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_lte(void *data,
|
static void setting_get_string_representation_uint_cheat_lte(void *data,
|
||||||
@ -474,9 +468,7 @@ static void setting_get_string_representation_uint_cheat_lte(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_LTE_VAL), len);
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_LTE_VAL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_gte(void *data,
|
static void setting_get_string_representation_uint_cheat_gte(void *data,
|
||||||
@ -484,9 +476,7 @@ static void setting_get_string_representation_uint_cheat_gte(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_GTE_VAL), len);
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_GTE_VAL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_eq(void *data,
|
static void setting_get_string_representation_uint_cheat_eq(void *data,
|
||||||
@ -494,9 +484,7 @@ static void setting_get_string_representation_uint_cheat_eq(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQ_VAL), len);
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQ_VAL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_neq(void *data,
|
static void setting_get_string_representation_uint_cheat_neq(void *data,
|
||||||
@ -504,9 +492,7 @@ static void setting_get_string_representation_uint_cheat_neq(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_NEQ_VAL), len);
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_NEQ_VAL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_eqplus(void *data,
|
static void setting_get_string_representation_uint_cheat_eqplus(void *data,
|
||||||
@ -514,22 +500,18 @@ static void setting_get_string_representation_uint_cheat_eqplus(void *data,
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS_VAL),
|
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS_VAL),
|
||||||
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_cheat_eqminus(void *data,
|
static void setting_get_string_representation_uint_cheat_eqminus(void *data,
|
||||||
char *s, size_t len)
|
char *s, size_t len)
|
||||||
{
|
{
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS_VAL),
|
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS_VAL),
|
||||||
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void setting_get_string_representation_uint_video_rotation(void *data,
|
static void setting_get_string_representation_uint_video_rotation(void *data,
|
||||||
char *s, size_t len)
|
char *s, size_t len)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user