mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 21:40:02 +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, "rewind_enable");
|
||||||
readbackBool(config, edit, "savestate_auto_load");
|
readbackBool(config, edit, "savestate_auto_load");
|
||||||
readbackBool(config, edit, "savestate_auto_save");
|
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_rate_control");
|
||||||
readbackBool(config, edit, "audio_enable");
|
readbackBool(config, edit, "audio_enable");
|
||||||
@ -325,7 +325,7 @@ public class MainMenuActivity extends PreferenceActivity {
|
|||||||
|
|
||||||
readbackDouble(config, edit, "input_overlay_opacity");
|
readbackDouble(config, edit, "input_overlay_opacity");
|
||||||
readbackBool(config, edit, "input_autodetect_enable");
|
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_allow_rotate");
|
||||||
readbackBool(config, edit, "video_font_enable");
|
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");
|
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
|
// Run RGUI if needed
|
||||||
if (!_wantReload)
|
if (!_wantReload || apple_argv)
|
||||||
apple_run_core(nil, 0);
|
apple_run_core(nil, 0);
|
||||||
else
|
else
|
||||||
[self chooseCore];
|
[self chooseCore];
|
||||||
@ -270,6 +270,23 @@
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
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);
|
return NSApplicationMain(argc, (const char **) argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,6 +312,31 @@ void *apple_get_proc_address(const char *symbol_name)
|
|||||||
#endif
|
#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
|
#ifdef IOS
|
||||||
void apple_bind_game_view_fbo(void)
|
void apple_bind_game_view_fbo(void)
|
||||||
{
|
{
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#import "../OSX/platform.h"
|
#import "../OSX/platform.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern char** apple_argv;
|
||||||
extern bool apple_is_paused;
|
extern bool apple_is_paused;
|
||||||
extern bool apple_is_running;
|
extern bool apple_is_running;
|
||||||
extern bool apple_use_tv_mode;
|
extern bool apple_use_tv_mode;
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
|
||||||
|
char** apple_argv;
|
||||||
|
|
||||||
//#define HAVE_DEBUG_FILELOG
|
//#define HAVE_DEBUG_FILELOG
|
||||||
|
|
||||||
id<RetroArch_Platform> apple_platform;
|
id<RetroArch_Platform> apple_platform;
|
||||||
@ -125,37 +127,46 @@ void apple_run_core(RAModuleInfo* core, const char* file)
|
|||||||
|
|
||||||
apple_core = core;
|
apple_core = core;
|
||||||
apple_is_running = true;
|
apple_is_running = true;
|
||||||
|
|
||||||
static char config_path[PATH_MAX];
|
static char config_path[PATH_MAX];
|
||||||
static char core_path[PATH_MAX];
|
static char core_path[PATH_MAX];
|
||||||
static char file_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)
|
if (!apple_argv)
|
||||||
strlcpy(config_path, apple_core.configPath.UTF8String, sizeof(config_path));
|
{
|
||||||
else
|
static const char* argv[] = { "retroarch", "-c", config_path, "-L", core_path, file_path, 0 };
|
||||||
strlcpy(config_path, RAModuleInfo.globalConfigPath.UTF8String, sizeof(config_path));
|
|
||||||
|
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)
|
if (file && core)
|
||||||
{
|
{
|
||||||
argv[3] = "-L";
|
argv[3] = "-L";
|
||||||
argv[4] = core_path;
|
argv[4] = core_path;
|
||||||
strlcpy(core_path, apple_core.path.UTF8String, sizeof(core_path));
|
strlcpy(core_path, apple_core.path.UTF8String, sizeof(core_path));
|
||||||
strlcpy(file_path, file, sizeof(file_path));
|
strlcpy(file_path, file, sizeof(file_path));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
argv[3] = "--menu";
|
argv[3] = "--menu";
|
||||||
argv[4] = 0;
|
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);
|
apple_rarch_exited((void*)1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apple_argv = 0;
|
||||||
|
|
||||||
pthread_detach(apple_retro_thread);
|
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
|
// These functions must only be called in gfx/context/ioseagl_ctx.c
|
||||||
bool apple_init_game_view(void);
|
bool apple_init_game_view(void);
|
||||||
void apple_destroy_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_flip_game_view(void);
|
||||||
void apple_set_game_view_sync(unsigned interval);
|
void apple_set_game_view_sync(unsigned interval);
|
||||||
void apple_get_game_view_size(unsigned *width, unsigned *height);
|
void apple_get_game_view_size(unsigned *width, unsigned *height);
|
||||||
|
@ -352,22 +352,22 @@
|
|||||||
"-DHAVE_RARCH_MAIN_WRAP",
|
"-DHAVE_RARCH_MAIN_WRAP",
|
||||||
"-DHAVE_GRIFFIN",
|
"-DHAVE_GRIFFIN",
|
||||||
"-DHAVE_RGUI",
|
"-DHAVE_RGUI",
|
||||||
"-DIOS",
|
"-DOSX",
|
||||||
"-DHAVE_OPENGL",
|
"-DHAVE_OPENGL",
|
||||||
"-DHAVE_FBO",
|
"-DHAVE_FBO",
|
||||||
"-DHAVE_VID_CONTEXT",
|
"-DHAVE_VID_CONTEXT",
|
||||||
"-DHAVE_OPENGLES2",
|
|
||||||
"-DHAVE_GLSL",
|
"-DHAVE_GLSL",
|
||||||
"-DINLINE=inline",
|
"-DINLINE=inline",
|
||||||
"-DLSB_FIRST",
|
"-DLSB_FIRST",
|
||||||
"-D__LIBRETRO__",
|
"-D__LIBRETRO__",
|
||||||
"-DRARCH_MOBILE",
|
"-DWANT_RPNG",
|
||||||
"-DHAVE_COREAUDIO",
|
"-DHAVE_COREAUDIO",
|
||||||
"-DHAVE_DYNAMIC",
|
"-DHAVE_DYNAMIC",
|
||||||
"-DHAVE_OVERLAY",
|
"-DHAVE_OVERLAY",
|
||||||
"-DHAVE_ZLIB",
|
"-DHAVE_ZLIB",
|
||||||
"-DWANT_MINIZ",
|
"-DWANT_MINIZ",
|
||||||
"-DSINC_LOWER_QUALITY",
|
"-DSINC_LOWER_QUALITY",
|
||||||
|
"-DHAVE_NETPLAY",
|
||||||
);
|
);
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SDKROOT = "";
|
SDKROOT = "";
|
||||||
|
@ -42,10 +42,7 @@ static bool gfx_ctx_set_video_mode(
|
|||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
bool fullscreen)
|
bool fullscreen)
|
||||||
{
|
{
|
||||||
(void)width;
|
return apple_set_video_mode(width, height, fullscreen);
|
||||||
(void)height;
|
|
||||||
(void)fullscreen;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_ctx_update_window_title(void)
|
static void gfx_ctx_update_window_title(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user