mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 11:43:00 +00:00
Merge branch 'master' of git://github.com/Themaister/RetroArch
This commit is contained in:
commit
0d4c14c6d6
@ -19,7 +19,9 @@
|
||||
|
||||
enum
|
||||
{
|
||||
S_DELAY_0 = 1, // display for one frame
|
||||
S_DELAY_0 = 0,
|
||||
S_DELAY_1 = 1,
|
||||
S_DELAY_45 = 45,
|
||||
S_DELAY_90 = 90,
|
||||
S_DELAY_180 = 180,
|
||||
S_DELAY_270 = 270
|
||||
|
@ -18,70 +18,72 @@
|
||||
|
||||
#include "retroarch_console.h"
|
||||
|
||||
static void rarch_manage_libretro_install(char *libretro_core_installed, size_t sizeof_libretro_core, const char *full_path, const char *path, const char *exe_ext)
|
||||
// if a CORE executable exists (full_path), this means we have just installed
|
||||
// a new libretro port and therefore we need to change it to a more
|
||||
// sane name.
|
||||
|
||||
static bool rarch_manage_libretro_install(char *libretro_core_installed, size_t sizeof_libretro_core, const char *full_path, const char *path, const char *exe_ext)
|
||||
{
|
||||
int ret;
|
||||
char tmp_path2[1024], tmp_pathnewfile[1024];
|
||||
|
||||
RARCH_LOG("Assumed path of CORE executable: [%s]\n", full_path);
|
||||
rarch_console_name_from_id(tmp_path2, sizeof(tmp_path2));
|
||||
strlcat(tmp_path2, exe_ext, sizeof(tmp_path2));
|
||||
snprintf(tmp_pathnewfile, sizeof(tmp_pathnewfile), "%s%s", path, tmp_path2);
|
||||
|
||||
if (path_file_exists(full_path))
|
||||
if (path_file_exists(tmp_pathnewfile))
|
||||
{
|
||||
// if CORE executable exists, this means we have just installed
|
||||
// a new libretro port and therefore we need to change it to a more
|
||||
// sane name.
|
||||
// if libretro core already exists, this means we are
|
||||
// upgrading the libretro core - so delete pre-existing
|
||||
// file first.
|
||||
|
||||
rarch_console_name_from_id(tmp_path2, sizeof(tmp_path2));
|
||||
strlcat(tmp_path2, exe_ext, sizeof(tmp_path2));
|
||||
snprintf(tmp_pathnewfile, sizeof(tmp_pathnewfile), "%s%s", path, tmp_path2);
|
||||
|
||||
if (path_file_exists(tmp_pathnewfile))
|
||||
{
|
||||
// if libretro core already exists, this means we are
|
||||
// upgrading the libretro core - so delete pre-existing
|
||||
// file first.
|
||||
|
||||
RARCH_LOG("Upgrading emulator core...\n");
|
||||
|
||||
ret = remove(tmp_pathnewfile);
|
||||
|
||||
if (ret == 0)
|
||||
{
|
||||
RARCH_LOG("Succeeded in removing pre-existing libretro core: [%s].\n", tmp_pathnewfile);
|
||||
}
|
||||
else
|
||||
RARCH_ERR("Failed to remove pre-existing libretro core: [%s].\n", tmp_pathnewfile);
|
||||
}
|
||||
|
||||
//now attempt the renaming.
|
||||
ret = rename(full_path, tmp_pathnewfile);
|
||||
RARCH_LOG("Upgrading emulator core...\n");
|
||||
ret = remove(tmp_pathnewfile);
|
||||
|
||||
if (ret == 0)
|
||||
{
|
||||
RARCH_LOG("Libsnes core [%s] renamed to: [%s].\n", full_path, tmp_pathnewfile);
|
||||
strlcpy(libretro_core_installed, tmp_pathnewfile, sizeof_libretro_core);
|
||||
}
|
||||
RARCH_LOG("Succeeded in removing pre-existing libretro core: [%s].\n", tmp_pathnewfile);
|
||||
else
|
||||
{
|
||||
RARCH_ERR("Failed to rename CORE executable.\n");
|
||||
RARCH_WARN("CORE executable was not found, or some other errors occurred. Will attempt to load libretro core path from config file.\n");
|
||||
}
|
||||
RARCH_ERR("Failed to remove pre-existing libretro core: [%s].\n", tmp_pathnewfile);
|
||||
}
|
||||
|
||||
//now attempt the renaming.
|
||||
ret = rename(full_path, tmp_pathnewfile);
|
||||
|
||||
if (ret == 0)
|
||||
{
|
||||
RARCH_LOG("Libsnes core [%s] renamed to: [%s].\n", full_path, tmp_pathnewfile);
|
||||
strlcpy(libretro_core_installed, tmp_pathnewfile, sizeof_libretro_core);
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_ERR("Failed to rename CORE executable.\n");
|
||||
RARCH_WARN("CORE executable was not found, or some other errors occurred. Will attempt to load libretro core path from config file.\n");
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool rarch_configure_libretro_core(const char *full_path, const char *tmp_path,
|
||||
const char *libretro_path, const char *config_path, const char *extension)
|
||||
{
|
||||
bool libretro_core_was_installed = false;
|
||||
bool find_libretro_file = false;
|
||||
char libretro_core_installed[1024];
|
||||
|
||||
g_extern.verbose = true;
|
||||
|
||||
rarch_manage_libretro_install(libretro_core_installed, sizeof(libretro_core_installed), full_path, tmp_path, extension);
|
||||
//install and rename libretro core first if 'CORE' executable exists
|
||||
if (path_file_exists(full_path))
|
||||
libretro_core_was_installed = rarch_manage_libretro_install(
|
||||
libretro_core_installed, sizeof(libretro_core_installed), full_path, tmp_path, extension);
|
||||
|
||||
g_extern.verbose = false;
|
||||
|
||||
bool find_libretro_file = false;
|
||||
//if we have just installed a libretro core, set libretro path in settings to newly installed libretro core
|
||||
|
||||
if(libretro_core_installed != NULL)
|
||||
if(libretro_core_was_installed)
|
||||
strlcpy(g_settings.libretro, libretro_core_installed, sizeof(g_settings.libretro));
|
||||
else
|
||||
find_libretro_file = true;
|
||||
|
@ -818,7 +818,7 @@ void rarch_config_load(const char * conf_name, const char * libretro_dir_path, c
|
||||
{
|
||||
CONFIG_GET_STRING(libretro, "libretro_path");
|
||||
|
||||
if(!strcmp(g_settings.libretro, ""))
|
||||
if(strcmp(g_settings.libretro, "") == 0)
|
||||
{
|
||||
char first_file[PATH_MAX];
|
||||
rarch_manage_libretro_set_first_file(first_file, sizeof(first_file), libretro_dir_path, exe_ext);
|
||||
|
@ -263,7 +263,8 @@ bool gfx_ctx_key_pressed(int key)
|
||||
|
||||
// 1.2 specific workaround for tiling WMs. In 1.3 we call GetSize directly, so we don't need to rely on
|
||||
// proper event handling (I hope).
|
||||
#if !SDL_MODERN && defined(SDL_VIDEO_DRIVER_X11)
|
||||
#if !SDL_MODERN && !defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_X11)
|
||||
// This X11 is set on OSX for some reason.
|
||||
static bool gfx_ctx_get_window_size(unsigned *width, unsigned *height)
|
||||
{
|
||||
SDL_SysWMinfo info;
|
||||
@ -348,7 +349,7 @@ static void check_window_legacy(bool *quit,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SDL_VIDEO_DRIVER_X11
|
||||
#if defined(SDL_VIDEO_DRIVER_X11) && !defined(__APPLE__)
|
||||
if (!*resize && !g_fullscreen)
|
||||
{
|
||||
unsigned new_width, new_height;
|
||||
|
@ -38,8 +38,8 @@ void gl_deinit_font(gl_t *gl)
|
||||
|
||||
void gl_render_msg(gl_t *gl, const char *msg)
|
||||
{
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, g_settings.video.msg_pos_y, 1.11f, BLUE, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, g_settings.video.msg_pos_y, 1.10f, WHITE, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, 0.75f, 1.06f, SILVER, msg);
|
||||
cellDbgFontPrintf(g_settings.video.msg_pos_x, 0.75f, 1.05f, WHITE, msg);
|
||||
}
|
||||
|
||||
void gl_render_msg_post(gl_t *gl)
|
||||
|
@ -14,7 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
{
|
||||
{
|
||||
SETTING_CHANGE_RESOLUTION, /* enum ID of item */
|
||||
@ -634,3 +634,172 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
|
||||
0.83f,
|
||||
}
|
||||
};
|
||||
|
||||
item ingame_menu_settings[MENU_ITEM_LAST] =
|
||||
{
|
||||
{
|
||||
MENU_ITEM_LOAD_STATE, /* enum ID of item */
|
||||
"Load State", /* item label */
|
||||
"", /* setting label */
|
||||
0.0f, /* text X position */
|
||||
0.0f, /* text Y position */
|
||||
YELLOW, /* text color */
|
||||
"INFO - Press LEFT or RIGHT to change the current save state slot.\nPress CROSS to load the state from the currently selected save state slot.",
|
||||
WHITE, /* color of item comment */
|
||||
0.83f, /* comment Y position */
|
||||
},
|
||||
{
|
||||
MENU_ITEM_SAVE_STATE,
|
||||
"Save State",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press LEFT or RIGHT to change the current save state slot.\nPress CROSS to save the state to the currently selected save state slot.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_KEEP_ASPECT_RATIO,
|
||||
"Aspect Ratio",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press LEFT or RIGHT to change the [Aspect Ratio].\nPress START to reset back to default values.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_OVERSCAN_AMOUNT,
|
||||
"Overscan",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press LEFT or RIGHT to change the [Overscan] settings.\nPress START to reset back to default values.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_ORIENTATION,
|
||||
"Rotation",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press LEFT or RIGHT to change the [Rotation] settings.\nPress START to reset back to default values.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_SCALE_FACTOR,
|
||||
"Scale Factor",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press LEFT or RIGHT to change the [Scaling] settings.\nPress START to reset back to default values.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_RESIZE_MODE,
|
||||
"Resize Mode",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Allows you to resize the scree by moving the two analog sticks.\nPress TRIANGLE to reset to default values, and CIRCLE to go back.",
|
||||
GREEN,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_FRAME_ADVANCE,
|
||||
"Frame Advance",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS', 'L2' or 'R2' button to step one frame.",
|
||||
GREEN,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_SCREENSHOT_MODE,
|
||||
"Screenshot Mode",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Allows you to take a clean screenshot.\nPress 'CIRCLE' to go back to the in-game menu while in 'Screenshot Mode'.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_RESET,
|
||||
"Reset",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS' to reset the game.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_RETURN_TO_GAME,
|
||||
"Return to Game",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS' to return back to the game.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_RETURN_TO_MENU,
|
||||
"Return to Menu",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS' to return back to the ROM Browser menu.",
|
||||
WHITE,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_CHANGE_LIBRETRO,
|
||||
"Change libretro core",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS' to choose a different emulator core.",
|
||||
GREEN,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_RETURN_TO_MULTIMAN,
|
||||
"Return to multiMAN",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS' to quit the emulator/game and return to multiMAN.",
|
||||
GREEN,
|
||||
0.83f,
|
||||
},
|
||||
{
|
||||
MENU_ITEM_RETURN_TO_DASHBOARD,
|
||||
"Return to XMB",
|
||||
"",
|
||||
0.0f,
|
||||
0.0f,
|
||||
YELLOW,
|
||||
"INFO - Press 'CROSS' to quit the emulator/game and return to the XMB.",
|
||||
GREEN,
|
||||
0.83f,
|
||||
},
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 176 KiB |
@ -145,6 +145,10 @@ int main(void)
|
||||
|
||||
config_set_defaults();
|
||||
|
||||
g_settings.audio.rate_control = true;
|
||||
g_settings.audio.rate_control_delta = 0.004;
|
||||
g_console.block_config_read = true;
|
||||
|
||||
wii_video_init();
|
||||
input_wii.init();
|
||||
|
||||
|
@ -293,7 +293,7 @@ const char *rgui_iterate(rgui_handle_t *rgui, rgui_action_t action)
|
||||
snprintf(rgui->path_buf, sizeof(rgui->path_buf), "%s/%s",
|
||||
strcmp(dir, "/") == 0 ? "" : dir, path);
|
||||
strlcpy(g_console.rom_path, rgui->path_buf, sizeof(g_console.rom_path));
|
||||
rarch_settings_msg(S_MSG_LOADING_ROM, S_DELAY_0);
|
||||
rarch_settings_msg(S_MSG_LOADING_ROM, S_DELAY_1);
|
||||
const char * message = msg_queue_pull(g_extern.msg_queue);
|
||||
render_messagebox(rgui, message);
|
||||
return rgui->path_buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user