mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Build fixes
This commit is contained in:
parent
a8c8e04e73
commit
2f3af72501
@ -268,8 +268,6 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
|
|||||||
{
|
{
|
||||||
SharedPreferences prefs = UserPreferences.getPreferences(ctx);
|
SharedPreferences prefs = UserPreferences.getPreferences(ctx);
|
||||||
SharedPreferences.Editor edit = prefs.edit();
|
SharedPreferences.Editor edit = prefs.edit();
|
||||||
edit.putBoolean("input_overlay_enable", false);
|
|
||||||
edit.putBoolean("input_autodetect_enable", true);
|
|
||||||
edit.putBoolean("audio_latency_auto", true);
|
edit.putBoolean("audio_latency_auto", true);
|
||||||
edit.commit();
|
edit.commit();
|
||||||
UserPreferences.updateConfigFile(ctx);
|
UserPreferences.updateConfigFile(ctx);
|
||||||
@ -291,8 +289,6 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
|
|||||||
SharedPreferences prefs = UserPreferences.getPreferences(ctx);
|
SharedPreferences prefs = UserPreferences.getPreferences(ctx);
|
||||||
SharedPreferences.Editor edit = prefs.edit();
|
SharedPreferences.Editor edit = prefs.edit();
|
||||||
edit.putBoolean("video_threaded", false);
|
edit.putBoolean("video_threaded", false);
|
||||||
edit.putBoolean("input_overlay_enable", false);
|
|
||||||
edit.putBoolean("input_autodetect_enable", true);
|
|
||||||
edit.putString("video_refresh_rate", Double.toString(59.19132938771038));
|
edit.putString("video_refresh_rate", Double.toString(59.19132938771038));
|
||||||
edit.putBoolean("audio_latency_auto", false);
|
edit.putBoolean("audio_latency_auto", false);
|
||||||
edit.commit();
|
edit.commit();
|
||||||
|
@ -230,19 +230,8 @@ public final class UserPreferences
|
|||||||
config.setString("video_shader", shaderPath);
|
config.setString("video_shader", shaderPath);
|
||||||
config.setBoolean("video_shader_enable", prefs.getBoolean("video_shader_enable", false) && new File(shaderPath).exists());
|
config.setBoolean("video_shader_enable", prefs.getBoolean("video_shader_enable", false) && new File(shaderPath).exists());
|
||||||
|
|
||||||
// Set whether or not custom overlays are being used.
|
config.setBoolean("input_overlay_enable", prefs.getBoolean("input_overlay_enable", true));
|
||||||
final boolean useOverlay = prefs.getBoolean("input_overlay_enable", true);
|
config.setString("input_overlay", prefs.getString("input_overlay", ""));
|
||||||
config.setBoolean("input_overlay_enable", useOverlay); // Not used by RetroArch directly.
|
|
||||||
if (useOverlay)
|
|
||||||
{
|
|
||||||
String overlayPath = prefs.getString("input_overlay", dataDir + "/overlays/snes/snes.cfg");
|
|
||||||
config.setString("input_overlay", overlayPath);
|
|
||||||
config.setDouble("input_overlay_opacity", prefs.getFloat("input_overlay_opacity", 0.7f));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
config.setString("input_overlay", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set whether or not custom directories are being used.
|
// Set whether or not custom directories are being used.
|
||||||
final boolean usingCustomSaveFileDir = prefs.getBoolean("savefile_directory_enable", false);
|
final boolean usingCustomSaveFileDir = prefs.getBoolean("savefile_directory_enable", false);
|
||||||
|
@ -41,7 +41,7 @@ typedef struct frontend_ctx_driver
|
|||||||
int (*process_events)(void *data);
|
int (*process_events)(void *data);
|
||||||
void (*exec)(const char *, bool);
|
void (*exec)(const char *, bool);
|
||||||
void (*shutdown)(bool);
|
void (*shutdown)(bool);
|
||||||
int (*get_name)(char *, size_t);
|
void (*get_name)(char *, size_t);
|
||||||
int (*get_rating)(void);
|
int (*get_rating)(void);
|
||||||
|
|
||||||
// Human readable string.
|
// Human readable string.
|
||||||
|
@ -407,6 +407,12 @@ static bool android_run_events (void *data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void frontend_android_get_name(char *name, size_t sizeof_name)
|
||||||
|
{
|
||||||
|
int len = __system_property_get("ro.product.model", name);
|
||||||
|
(void)len;
|
||||||
|
}
|
||||||
|
|
||||||
static void frontend_android_get_environment_settings(int *argc, char *argv[],
|
static void frontend_android_get_environment_settings(int *argc, char *argv[],
|
||||||
void *data, void *params_data)
|
void *data, void *params_data)
|
||||||
{
|
{
|
||||||
@ -514,12 +520,25 @@ static void frontend_android_get_environment_settings(int *argc, char *argv[],
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frontend_android_get_name(&model_id, sizeof(model_id));
|
frontend_android_get_name(model_id, sizeof(model_id));
|
||||||
|
|
||||||
|
// Set audio latency hint values per device (in case we need >64ms latency for good sound)
|
||||||
|
|
||||||
if (!strcmp(model_id, "R800x"))
|
if (!strcmp(model_id, "R800x"))
|
||||||
g_defaults.settings.out_latency = 128;
|
g_defaults.settings.out_latency = 128;
|
||||||
else if (!strcmp(model_id, "GAMEMID_BT"))
|
else if (!strcmp(model_id, "GAMEMID_BT"))
|
||||||
g_defaults.settings.out_latency = 160;
|
g_defaults.settings.out_latency = 160;
|
||||||
|
|
||||||
|
// Explicitly disable input overlay by default for gamepad-like/console devices
|
||||||
|
if (
|
||||||
|
!strcmp(model_id, "OUYA Console") ||
|
||||||
|
!strcmp(model_id, "R800x") ||
|
||||||
|
!strcmp(model_id, "GAMEMID_BT") ||
|
||||||
|
!strcmp(model_id, "SHIELD")
|
||||||
|
)
|
||||||
|
g_defaults.settings.input_overlay_enable = false;
|
||||||
|
else
|
||||||
|
g_defaults.settings.input_overlay_enable = true; // Enable input overlay by default
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -709,16 +728,11 @@ static void frontend_android_shutdown(bool unused)
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void frontend_android_get_name(char *name, size_t sizeof_name)
|
|
||||||
{
|
|
||||||
int len = __system_property_get("ro.product.model", name);
|
|
||||||
(void)len;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int frontend_android_get_rating(void)
|
static int frontend_android_get_rating(void)
|
||||||
{
|
{
|
||||||
char model_id[PROP_VALUE_MAX];
|
char model_id[PROP_VALUE_MAX];
|
||||||
frontend_android_get_name(&model_id, sizeof(model_id));
|
frontend_android_get_name(model_id, sizeof(model_id));
|
||||||
|
|
||||||
RARCH_LOG("ro.product.model: (%s).\n", model_id);
|
RARCH_LOG("ro.product.model: (%s).\n", model_id);
|
||||||
|
|
||||||
|
@ -315,6 +315,7 @@ void config_set_defaults(void)
|
|||||||
if (!g_defaults.settings.out_latency)
|
if (!g_defaults.settings.out_latency)
|
||||||
g_defaults.settings.out_latency = out_latency;
|
g_defaults.settings.out_latency = out_latency;
|
||||||
|
|
||||||
|
|
||||||
g_settings.audio.latency = g_defaults.settings.out_latency;
|
g_settings.audio.latency = g_defaults.settings.out_latency;
|
||||||
g_settings.audio.sync = audio_sync;
|
g_settings.audio.sync = audio_sync;
|
||||||
g_settings.audio.rate_control = rate_control;
|
g_settings.audio.rate_control = rate_control;
|
||||||
@ -380,7 +381,12 @@ void config_set_defaults(void)
|
|||||||
g_settings.input.netplay_client_swap_input = netplay_client_swap_input;
|
g_settings.input.netplay_client_swap_input = netplay_client_swap_input;
|
||||||
g_settings.input.turbo_period = turbo_period;
|
g_settings.input.turbo_period = turbo_period;
|
||||||
g_settings.input.turbo_duty_cycle = turbo_duty_cycle;
|
g_settings.input.turbo_duty_cycle = turbo_duty_cycle;
|
||||||
|
|
||||||
g_settings.input.overlay_enable = false;
|
g_settings.input.overlay_enable = false;
|
||||||
|
|
||||||
|
if (g_defaults.settings.input_overlay_enable)
|
||||||
|
g_settings.input.overlay_enable = g_defaults.settings.input_overlay_enable;
|
||||||
|
|
||||||
g_settings.input.overlay_opacity = 0.7f;
|
g_settings.input.overlay_opacity = 0.7f;
|
||||||
g_settings.input.overlay_scale = 1.0f;
|
g_settings.input.overlay_scale = 1.0f;
|
||||||
g_settings.input.debug_enable = input_debug_enable;
|
g_settings.input.debug_enable = input_debug_enable;
|
||||||
@ -451,7 +457,7 @@ void config_set_defaults(void)
|
|||||||
if (default_overlay_dir)
|
if (default_overlay_dir)
|
||||||
{
|
{
|
||||||
fill_pathname_expand_special(g_extern.overlay_dir, default_overlay_dir, sizeof(g_extern.overlay_dir));
|
fill_pathname_expand_special(g_extern.overlay_dir, default_overlay_dir, sizeof(g_extern.overlay_dir));
|
||||||
if (g_settings.input.overlay[0] == '\0\)
|
if (g_settings.input.overlay[0] == '\0')
|
||||||
fill_pathname_join(g_settings.input.overlay, g_extern.overlay_dir, "gamepads/retropad/retropad.cfg", sizeof(g_settings.input.overlay));
|
fill_pathname_join(g_settings.input.overlay, g_extern.overlay_dir, "gamepads/retropad/retropad.cfg", sizeof(g_settings.input.overlay));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user