mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
Merge branch 'master' into xinput-autoconf
This commit is contained in:
commit
bcb48caa16
@ -317,7 +317,7 @@ public class MainMenuActivity extends PreferenceActivity {
|
||||
readbackBool(config, edit, "rewind_enable");
|
||||
readbackBool(config, edit, "savestate_auto_load");
|
||||
readbackBool(config, edit, "savestate_auto_save");
|
||||
readbackDouble(config, edit, "video_refresh_rate");
|
||||
//readbackDouble(config, edit, "video_refresh_rate");
|
||||
|
||||
readbackBool(config, edit, "audio_rate_control");
|
||||
readbackBool(config, edit, "audio_enable");
|
||||
@ -325,7 +325,7 @@ public class MainMenuActivity extends PreferenceActivity {
|
||||
|
||||
readbackDouble(config, edit, "input_overlay_opacity");
|
||||
readbackBool(config, edit, "input_autodetect_enable");
|
||||
readbackInt(config, edit, "input_back_behavior");
|
||||
//readbackInt(config, edit, "input_back_behavior");
|
||||
|
||||
readbackBool(config, edit, "video_allow_rotate");
|
||||
readbackBool(config, edit, "video_font_enable");
|
||||
|
@ -85,7 +85,7 @@
|
||||
apple_display_alert(@"No libretro cores were found.\nSelect \"Go->Cores Directory\" from the menu and place libretro dylib files there.", @"RetroArch");
|
||||
|
||||
// Run RGUI if needed
|
||||
if (!_wantReload)
|
||||
if (!_wantReload || apple_argv)
|
||||
apple_run_core(nil, 0);
|
||||
else
|
||||
[self chooseCore];
|
||||
@ -270,6 +270,23 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
uint32_t current_argc = 0;
|
||||
|
||||
for (int i = 0; i != argc; i ++)
|
||||
{
|
||||
if (strcmp(argv[i], "--") == 0)
|
||||
{
|
||||
current_argc = 1;
|
||||
apple_argv = malloc(sizeof(char*) * (argc + 1));
|
||||
memset(apple_argv, 0, sizeof(char*) * (argc + 1));
|
||||
apple_argv[0] = argv[0];
|
||||
}
|
||||
else if (current_argc)
|
||||
{
|
||||
apple_argv[current_argc ++] = argv[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
||||
|
||||
|
@ -312,6 +312,31 @@ void *apple_get_proc_address(const char *symbol_name)
|
||||
#endif
|
||||
}
|
||||
|
||||
bool apple_set_video_mode(unsigned width, unsigned height, bool fullscreen)
|
||||
{
|
||||
__block bool result = true;
|
||||
|
||||
#ifdef OSX
|
||||
dispatch_sync(dispatch_get_main_queue(),
|
||||
^{
|
||||
// TODO: Multi-monitor support
|
||||
// TODO: Sceen mode support
|
||||
|
||||
if (fullscreen)
|
||||
result = [g_view enterFullScreenMode:[NSScreen mainScreen] withOptions:nil];
|
||||
else
|
||||
{
|
||||
[g_view exitFullScreenModeWithOptions:nil];
|
||||
[g_view.window makeFirstResponder:g_view];
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
// TODO: Maybe iOS users should be apple to show/hide the status bar here?
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef IOS
|
||||
void apple_bind_game_view_fbo(void)
|
||||
{
|
||||
|
@ -38,6 +38,7 @@
|
||||
#import "../OSX/platform.h"
|
||||
#endif
|
||||
|
||||
extern char** apple_argv;
|
||||
extern bool apple_is_paused;
|
||||
extern bool apple_is_running;
|
||||
extern bool apple_use_tv_mode;
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include "file.h"
|
||||
|
||||
char** apple_argv;
|
||||
|
||||
//#define HAVE_DEBUG_FILELOG
|
||||
|
||||
id<RetroArch_Platform> apple_platform;
|
||||
@ -125,37 +127,46 @@ void apple_run_core(RAModuleInfo* core, const char* file)
|
||||
|
||||
apple_core = core;
|
||||
apple_is_running = true;
|
||||
|
||||
|
||||
static char config_path[PATH_MAX];
|
||||
static char core_path[PATH_MAX];
|
||||
static char file_path[PATH_MAX];
|
||||
|
||||
static const char* argv[] = { "retroarch", "-c", config_path, "-L", core_path, file_path, 0 };
|
||||
|
||||
if (apple_core)
|
||||
strlcpy(config_path, apple_core.configPath.UTF8String, sizeof(config_path));
|
||||
else
|
||||
strlcpy(config_path, RAModuleInfo.globalConfigPath.UTF8String, sizeof(config_path));
|
||||
if (!apple_argv)
|
||||
{
|
||||
static const char* argv[] = { "retroarch", "-c", config_path, "-L", core_path, file_path, 0 };
|
||||
|
||||
if (apple_core)
|
||||
strlcpy(config_path, apple_core.configPath.UTF8String, sizeof(config_path));
|
||||
else
|
||||
strlcpy(config_path, RAModuleInfo.globalConfigPath.UTF8String, sizeof(config_path));
|
||||
|
||||
if (file && core)
|
||||
{
|
||||
argv[3] = "-L";
|
||||
argv[4] = core_path;
|
||||
strlcpy(core_path, apple_core.path.UTF8String, sizeof(core_path));
|
||||
strlcpy(file_path, file, sizeof(file_path));
|
||||
}
|
||||
else
|
||||
{
|
||||
argv[3] = "--menu";
|
||||
argv[4] = 0;
|
||||
if (file && core)
|
||||
{
|
||||
argv[3] = "-L";
|
||||
argv[4] = core_path;
|
||||
strlcpy(core_path, apple_core.path.UTF8String, sizeof(core_path));
|
||||
strlcpy(file_path, file, sizeof(file_path));
|
||||
}
|
||||
else
|
||||
{
|
||||
argv[3] = "--menu";
|
||||
argv[4] = 0;
|
||||
}
|
||||
|
||||
apple_argv = (char**)argv;
|
||||
}
|
||||
|
||||
if (pthread_create(&apple_retro_thread, 0, rarch_main_spring, argv))
|
||||
if (pthread_create(&apple_retro_thread, 0, rarch_main_spring, apple_argv))
|
||||
{
|
||||
apple_argv = 0;
|
||||
|
||||
apple_rarch_exited((void*)1);
|
||||
return;
|
||||
}
|
||||
|
||||
apple_argv = 0;
|
||||
|
||||
pthread_detach(apple_retro_thread);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ void apple_rarch_exited (void* result);
|
||||
// These functions must only be called in gfx/context/ioseagl_ctx.c
|
||||
bool apple_init_game_view(void);
|
||||
void apple_destroy_game_view(void);
|
||||
bool apple_set_video_mode(unsigned width, unsigned height, bool fullscreen);
|
||||
void apple_flip_game_view(void);
|
||||
void apple_set_game_view_sync(unsigned interval);
|
||||
void apple_get_game_view_size(unsigned *width, unsigned *height);
|
||||
|
@ -352,22 +352,22 @@
|
||||
"-DHAVE_RARCH_MAIN_WRAP",
|
||||
"-DHAVE_GRIFFIN",
|
||||
"-DHAVE_RGUI",
|
||||
"-DIOS",
|
||||
"-DOSX",
|
||||
"-DHAVE_OPENGL",
|
||||
"-DHAVE_FBO",
|
||||
"-DHAVE_VID_CONTEXT",
|
||||
"-DHAVE_OPENGLES2",
|
||||
"-DHAVE_GLSL",
|
||||
"-DINLINE=inline",
|
||||
"-DLSB_FIRST",
|
||||
"-D__LIBRETRO__",
|
||||
"-DRARCH_MOBILE",
|
||||
"-DWANT_RPNG",
|
||||
"-DHAVE_COREAUDIO",
|
||||
"-DHAVE_DYNAMIC",
|
||||
"-DHAVE_OVERLAY",
|
||||
"-DHAVE_ZLIB",
|
||||
"-DWANT_MINIZ",
|
||||
"-DSINC_LOWER_QUALITY",
|
||||
"-DHAVE_NETPLAY",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = "";
|
||||
|
@ -42,10 +42,7 @@ static bool gfx_ctx_set_video_mode(
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
{
|
||||
(void)width;
|
||||
(void)height;
|
||||
(void)fullscreen;
|
||||
return true;
|
||||
return apple_set_video_mode(width, height, fullscreen);
|
||||
}
|
||||
|
||||
static void gfx_ctx_update_window_title(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user