Replace more ROM references

This commit is contained in:
twinaphex 2014-07-28 20:08:37 +02:00
parent 272002310d
commit f63f1f8520
7 changed files with 27 additions and 27 deletions

View File

@ -25,7 +25,7 @@
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas> <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div> </div>
<div class="emscripten emscripten_border" id="openrom"> <div class="emscripten emscripten_border" id="openrom">
<button id="fakerom" onclick="document.getElementById('rom').click()">Select a ROM</button> <button id="fakerom" onclick="document.getElementById('rom').click()">Select content</button>
<input style="display: none" type="file" id="rom" name="upload" onclick="document.getElementById('fakerom').click();" onchange="runEmulator(event.target.files);" multiple /> <input style="display: none" type="file" id="rom" name="upload" onclick="document.getElementById('fakerom').click();" onchange="runEmulator(event.target.files);" multiple />
</div> </div>
<hr/> <hr/>
@ -152,4 +152,4 @@
}; };
Module.setStatus('Downloading...'); Module.setStatus('Downloading...');
</script> </script>
<script type="text/javascript" src="retroarch.js"></script> <script type="text/javascript" src="retroarch.js"></script>

20
file.c
View File

@ -83,7 +83,7 @@ static void patch_rom(uint8_t **buf, ssize_t *size)
} }
else else
{ {
RARCH_LOG("Did not find a valid ROM patch.\n"); RARCH_LOG("Did not find a valid content patch.\n");
return; return;
} }
@ -93,14 +93,14 @@ static void patch_rom(uint8_t **buf, ssize_t *size)
uint8_t *patched_rom = (uint8_t*)malloc(target_size); uint8_t *patched_rom = (uint8_t*)malloc(target_size);
if (!patched_rom) if (!patched_rom)
{ {
RARCH_ERR("Failed to allocate memory for patched ROM ...\n"); RARCH_ERR("Failed to allocate memory for patched content ...\n");
goto error; goto error;
} }
err = func((const uint8_t*)patch_data, patch_size, ret_buf, ret_size, patched_rom, &target_size); err = func((const uint8_t*)patch_data, patch_size, ret_buf, ret_size, patched_rom, &target_size);
if (err == PATCH_SUCCESS) if (err == PATCH_SUCCESS)
{ {
RARCH_LOG("ROM patched successfully (%s).\n", patch_desc); RARCH_LOG("Content patched successfully (%s).\n", patch_desc);
success = true; success = true;
} }
else else
@ -340,21 +340,21 @@ static bool load_content(const struct retro_subsystem_info *special, const struc
if (require_rom && !*path) if (require_rom && !*path)
{ {
RARCH_LOG("libretro core requires a ROM, but none were provided.\n"); RARCH_LOG("libretro core requires content, but nothing was provided.\n");
ret = false; ret = false;
goto end; goto end;
} }
info[i].path = *path ? path : NULL; info[i].path = *path ? path : NULL;
if (!need_fullpath && *path) // Load the ROM into memory. if (!need_fullpath && *path) // Load the content into memory.
{ {
RARCH_LOG("Loading ROM file: %s.\n", path); RARCH_LOG("Loading content file: %s.\n", path);
// First ROM is significant, attempt to do patching, CRC checking, etc ... // First content file is significant, attempt to do patching, CRC checking, etc ...
long size = i == 0 ? read_rom_file(path, (void**)&info[i].data) : read_file(path, (void**)&info[i].data); long size = i == 0 ? read_rom_file(path, (void**)&info[i].data) : read_file(path, (void**)&info[i].data);
if (size < 0) if (size < 0)
{ {
RARCH_ERR("Could not read ROM file \"%s\".\n", path); RARCH_ERR("Could not read content file \"%s\".\n", path);
ret = false; ret = false;
goto end; goto end;
} }
@ -362,7 +362,7 @@ static bool load_content(const struct retro_subsystem_info *special, const struc
info[i].size = size; info[i].size = size;
} }
else else
RARCH_LOG("ROM loading skipped. Implementation will load it on its own.\n"); RARCH_LOG("Content loading skipped. Implementation will load it on its own.\n");
} }
if (special) if (special)
@ -467,7 +467,7 @@ bool init_rom_file(void)
if (!zlib_extract_first_rom(temporary_content, sizeof(temporary_content), valid_ext, if (!zlib_extract_first_rom(temporary_content, sizeof(temporary_content), valid_ext,
*g_settings.extraction_directory ? g_settings.extraction_directory : NULL)) *g_settings.extraction_directory ? g_settings.extraction_directory : NULL))
{ {
RARCH_ERR("Failed to extract ROM from zipped file: %s.\n", temporary_content); RARCH_ERR("Failed to extract content from zipped file: %s.\n", temporary_content);
string_list_free(content); string_list_free(content);
return false; return false;
} }

View File

@ -320,7 +320,7 @@ static bool zip_extract_cb(const char *name, const uint8_t *cdata, unsigned cmod
{ {
struct zip_extract_userdata *data = (struct zip_extract_userdata*)userdata; struct zip_extract_userdata *data = (struct zip_extract_userdata*)userdata;
// Extract first ROM that matches our list. // Extract first content that matches our list.
const char *ext = path_get_extension(name); const char *ext = path_get_extension(name);
if (ext && string_list_find_elem(data->ext, ext)) if (ext && string_list_find_elem(data->ext, ext))
{ {
@ -388,7 +388,7 @@ bool zlib_extract_first_rom(char *zip_path, size_t zip_path_size, const char *va
if (!userdata.found_rom) if (!userdata.found_rom)
{ {
RARCH_ERR("Didn't find any ROMS that matched valid extensions for libretro implementation.\n"); RARCH_ERR("Didn't find any content that matched valid extensions for libretro implementation.\n");
GOTO_END_ERROR(); GOTO_END_ERROR();
} }

View File

@ -13,8 +13,8 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef ROM_HISTORY_H__ #ifndef CONTENT_HISTORY_H__
#define ROM_HISTORY_H__ #define CONTENT_HISTORY_H__
#include <stddef.h> #include <stddef.h>

View File

@ -784,11 +784,11 @@ struct retro_subsystem_memory_info
struct retro_subsystem_rom_info struct retro_subsystem_rom_info
{ {
const char *desc; // Describes what the ROM is (SGB bios, GB rom, etc). const char *desc; // Describes what the content is (SGB bios, GB rom, etc).
const char *valid_extensions; // Same definition as retro_get_system_info(). const char *valid_extensions; // Same definition as retro_get_system_info().
bool need_fullpath; // Same definition as retro_get_system_info(). bool need_fullpath; // Same definition as retro_get_system_info().
bool block_extract; // Same definition as retro_get_system_info(). bool block_extract; // Same definition as retro_get_system_info().
bool required; // This is set if the ROM is required to load a game. If this is set to false, a zeroed-out retro_game_info can be passed. bool required; // This is set if the content is required to load a game. If this is set to false, a zeroed-out retro_game_info can be passed.
// Content can have multiple associated persistent memory types (retro_get_memory()). // Content can have multiple associated persistent memory types (retro_get_memory()).
const struct retro_subsystem_memory_info *memory; const struct retro_subsystem_memory_info *memory;
@ -804,9 +804,9 @@ struct retro_subsystem_info
// This identifier can be used for command-line interfaces, etc. // This identifier can be used for command-line interfaces, etc.
const char *ident; const char *ident;
// Infos for each ROM. The first entry is assumed to be the "most significant" ROM for frontend purposes. // Infos for each content file. The first entry is assumed to be the "most significant" content for frontend purposes.
// E.g. with Super GameBoy, the first ROM should be the GameBoy ROM, as it is the most "significant" ROM to a user. // E.g. with Super GameBoy, the first content should be the GameBoy ROM, as it is the most "significant" content to a user.
// If a frontend creates new file paths based on the ROM used (e.g. savestates), it should use the path for the first ROM to do so. // If a frontend creates new file paths based on the content used (e.g. savestates), it should use the path for the first ROM to do so.
const struct retro_subsystem_rom_info *roms; const struct retro_subsystem_rom_info *roms;
unsigned num_roms; // Number of content files associated with a subsystem. unsigned num_roms; // Number of content files associated with a subsystem.
@ -1290,7 +1290,7 @@ struct retro_system_info
// This is typically set to true for libretro implementations that must load from file. // This is typically set to true for libretro implementations that must load from file.
// Implementations should strive for setting this to false, as it allows the frontend to perform patching, etc. // Implementations should strive for setting this to false, as it allows the frontend to perform patching, etc.
bool block_extract; // If true, the frontend is not allowed to extract any archives before loading the real ROM. bool block_extract; // If true, the frontend is not allowed to extract any archives before loading the real content.
// Necessary for certain libretro implementations that load games from zipped archives. // Necessary for certain libretro implementations that load games from zipped archives.
}; };

View File

@ -771,7 +771,7 @@ static void print_help(void)
puts("\t-L/--libretro: Path to libretro implementation. Overrides any config setting."); puts("\t-L/--libretro: Path to libretro implementation. Overrides any config setting.");
#endif #endif
puts("\t--subsystem: Use a subsystem of the libretro core. Multiple content files are loaded as multiple arguments."); puts("\t--subsystem: Use a subsystem of the libretro core. Multiple content files are loaded as multiple arguments.");
puts("\t\tIf a ROM is skipped, use a blank (\"\") command line argument"); puts("\t\tIf a content file is skipped, use a blank (\"\") command line argument");
puts("\t\tContent must be loaded in an order which depends on the particular subsystem used."); puts("\t\tContent must be loaded in an order which depends on the particular subsystem used.");
puts("\t\tSee verbose log output to learn how a particular subsystem wants content to be loaded."); puts("\t\tSee verbose log output to learn how a particular subsystem wants content to be loaded.");
@ -809,9 +809,9 @@ static void print_help(void)
puts("\t--size: Overrides output video size when recording with FFmpeg (format: WIDTHxHEIGHT)."); puts("\t--size: Overrides output video size when recording with FFmpeg (format: WIDTHxHEIGHT).");
#endif #endif
puts("\t-v/--verbose: Verbose logging."); puts("\t-v/--verbose: Verbose logging.");
puts("\t-U/--ups: Specifies path for UPS patch that will be applied to ROM."); puts("\t-U/--ups: Specifies path for UPS patch that will be applied to content.");
puts("\t--bps: Specifies path for BPS patch that will be applied to ROM."); puts("\t--bps: Specifies path for BPS patch that will be applied to content.");
puts("\t--ips: Specifies path for IPS patch that will be applied to ROM."); puts("\t--ips: Specifies path for IPS patch that will be applied to content.");
puts("\t--no-patch: Disables all forms of content patching."); puts("\t--no-patch: Disables all forms of content patching.");
puts("\t-D/--detach: Detach RetroArch from the running console. Not relevant for all platforms.\n"); puts("\t-D/--detach: Detach RetroArch from the running console. Not relevant for all platforms.\n");
} }

View File

@ -512,7 +512,7 @@ void config_set_defaults(void)
g_extern.config_save_on_exit = config_save_on_exit; g_extern.config_save_on_exit = config_save_on_exit;
/* Avoid reloading config on every ROM load */ /* Avoid reloading config on every content load */
g_extern.block_config_read = default_block_config_read; g_extern.block_config_read = default_block_config_read;
} }