(360/PS3) Use PATH_MAX instead of MAX_PATH_LENGTH

This commit is contained in:
Twinaphex 2012-05-28 17:34:58 +02:00
parent c4e0e45722
commit 944ddc589b
8 changed files with 50 additions and 59 deletions

View File

@ -49,8 +49,8 @@ typedef struct _STRING {
char * Buffer;
} STRING;
char DEFAULT_SHADER_FILE[MAX_PATH_LENGTH];
char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
char DEFAULT_SHADER_FILE[PATH_MAX];
char SYS_CONFIG_FILE[PATH_MAX];
extern "C" int __stdcall ObCreateSymbolicLink( STRING*, STRING*);
@ -187,7 +187,7 @@ static void set_default_settings (void)
static void init_settings (bool load_libretro_path)
{
char fname_tmp[MAX_PATH_LENGTH];
char fname_tmp[PATH_MAX];
if(!path_file_exists(SYS_CONFIG_FILE))
rarch_create_default_config_file(SYS_CONFIG_FILE);

View File

@ -472,7 +472,7 @@ HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
HRESULT CRetroArchFileBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
{
char path[MAX_PATH_LENGTH];
char path[PATH_MAX];
if(hObjPressed == m_romlist)
{
@ -527,7 +527,7 @@ HRESULT CRetroArchFileBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle
HRESULT CRetroArchShaderBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
{
char path[MAX_PATH_LENGTH];
char path[PATH_MAX];
if(hObjPressed == m_shaderlist)
{
@ -567,7 +567,7 @@ HRESULT CRetroArchShaderBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHand
HRESULT CRetroArchCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
{
char path[MAX_PATH_LENGTH];
char path[PATH_MAX];
if(hObjPressed == m_romlist)
{

View File

@ -17,8 +17,6 @@
#ifndef _360_SHARED_H
#define _360_SHARED_H
#define MAX_PATH_LENGTH 1024
enum {
MENU_ITEM_LOAD_STATE = 0,
MENU_ITEM_SAVE_STATE,

View File

@ -18,7 +18,6 @@
#define FILEBROWSER_H_
#define MAXJOLIET 255
#define MAX_PATH_LENGTH 1024
#include <stdint.h>
#include <stdlib.h>

View File

@ -44,8 +44,6 @@
#define PATH_MAX 512
#endif
#define MAX_PATH_LENGTH 1024
#ifdef HAVE_LOGGER
#include "logger.h"
#define RARCH_LOG(...) logger_send("RetroArch Salamander: " __VA_ARGS__);
@ -72,16 +70,16 @@
#if defined(__CELLOS_LV2__)
static uint8_t np_pool[NP_POOL_SIZE];
char contentInfoPath[MAX_PATH_LENGTH];
char usrDirPath[MAX_PATH_LENGTH];
char contentInfoPath[PATH_MAX];
char usrDirPath[PATH_MAX];
SYS_PROCESS_PARAM(1001, 0x100000)
#elif defined(_XBOX)
DWORD volume_device_type;
#endif
char LIBRETRO_DIR_PATH[MAX_PATH_LENGTH];
char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
char libretro_path[MAX_PATH_LENGTH];
char LIBRETRO_DIR_PATH[PATH_MAX];
char SYS_CONFIG_FILE[PATH_MAX];
char libretro_path[PATH_MAX];
static void find_and_set_first_file(void)
{
@ -107,7 +105,7 @@ static void find_and_set_first_file(void)
#ifdef _XBOX
//Check if it's RetroArch Salamander itself - if so, first_executable needs to
//be overridden
char fname_tmp[MAX_PATH_LENGTH];
char fname_tmp[PATH_MAX];
fill_pathname_base(fname_tmp, first_executable, sizeof(fname_tmp));
@ -140,7 +138,7 @@ static void find_and_set_first_file(void)
static void init_settings(void)
{
char tmp_str[MAX_PATH_LENGTH];
char tmp_str[PATH_MAX];
bool config_file_exists;
if(!path_file_exists(SYS_CONFIG_FILE))

View File

@ -52,8 +52,6 @@
#include "menu.h"
#define MAX_PATH_LENGTH 1024
#define EMULATOR_CONTENT_DIR "SSNE10000"
#define EMULATOR_CORE_DIR "cores"
@ -61,21 +59,21 @@
#define NP_POOL_SIZE (128*1024)
static uint8_t np_pool[NP_POOL_SIZE];
char contentInfoPath[MAX_PATH_LENGTH];
char usrDirPath[MAX_PATH_LENGTH];
char DEFAULT_PRESET_FILE[MAX_PATH_LENGTH];
char DEFAULT_BORDER_FILE[MAX_PATH_LENGTH];
char DEFAULT_MENU_BORDER_FILE[MAX_PATH_LENGTH];
char PRESETS_DIR_PATH[MAX_PATH_LENGTH];
char INPUT_PRESETS_DIR_PATH[MAX_PATH_LENGTH];
char BORDERS_DIR_PATH[MAX_PATH_LENGTH];
char SHADERS_DIR_PATH[MAX_PATH_LENGTH];
char LIBRETRO_DIR_PATH[MAX_PATH_LENGTH];
char DEFAULT_SHADER_FILE[MAX_PATH_LENGTH];
char DEFAULT_MENU_SHADER_FILE[MAX_PATH_LENGTH];
char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
char EMULATOR_CORE_SELF[MAX_PATH_LENGTH];
char MULTIMAN_EXECUTABLE[MAX_PATH_LENGTH];
char contentInfoPath[PATH_MAX];
char usrDirPath[PATH_MAX];
char DEFAULT_PRESET_FILE[PATH_MAX];
char DEFAULT_BORDER_FILE[PATH_MAX];
char DEFAULT_MENU_BORDER_FILE[PATH_MAX];
char PRESETS_DIR_PATH[PATH_MAX];
char INPUT_PRESETS_DIR_PATH[PATH_MAX];
char BORDERS_DIR_PATH[PATH_MAX];
char SHADERS_DIR_PATH[PATH_MAX];
char LIBRETRO_DIR_PATH[PATH_MAX];
char DEFAULT_SHADER_FILE[PATH_MAX];
char DEFAULT_MENU_SHADER_FILE[PATH_MAX];
char SYS_CONFIG_FILE[PATH_MAX];
char EMULATOR_CORE_SELF[PATH_MAX];
char MULTIMAN_EXECUTABLE[PATH_MAX];
int rarch_main(int argc, char *argv[]);

View File

@ -362,7 +362,7 @@ static void set_setting_label(menu * menu_obj, uint64_t currentsetting)
break;
case SETTING_SHADER_PRESETS:
{
char fname[MAX_PATH_LENGTH];
char fname[PATH_MAX];
if(g_console.cgp_path == DEFAULT_PRESET_FILE)
menu_obj->items[currentsetting].text_color = GREEN;
else
@ -373,7 +373,7 @@ static void set_setting_label(menu * menu_obj, uint64_t currentsetting)
break;
case SETTING_SHADER:
{
char fname[MAX_PATH_LENGTH];
char fname[PATH_MAX];
fill_pathname_base(fname, g_settings.video.cg_shader_path, sizeof(fname));
snprintf(menu_obj->items[currentsetting].setting_text, sizeof(menu_obj->items[currentsetting].setting_text), "%s", fname);
@ -385,7 +385,7 @@ static void set_setting_label(menu * menu_obj, uint64_t currentsetting)
break;
case SETTING_SHADER_2:
{
char fname[MAX_PATH_LENGTH];
char fname[PATH_MAX];
fill_pathname_base(fname, g_settings.video.second_pass_shader, sizeof(fname));
snprintf(menu_obj->items[currentsetting].setting_text, sizeof(menu_obj->items[currentsetting].setting_text), "%s", fname);
@ -569,7 +569,7 @@ static void set_setting_label(menu * menu_obj, uint64_t currentsetting)
break;
case SETTING_RARCH_DEFAULT_EMU:
{
char fname[MAX_PATH_LENGTH];
char fname[PATH_MAX];
fill_pathname_base(fname, g_settings.libretro, sizeof(fname));
snprintf(menu_obj->items[currentsetting].setting_text, sizeof(menu_obj->items[currentsetting].setting_text), "%s", fname);
@ -803,8 +803,8 @@ static void apply_scaling (unsigned init_mode)
static void select_file(uint32_t menu_id)
{
char extensions[256], title[256], object[256], comment[256], dir_path[MAX_PATH_LENGTH],
path[MAX_PATH_LENGTH], *separatorslash;
char extensions[256], title[256], object[256], comment[256], dir_path[PATH_MAX],
path[PATH_MAX], *separatorslash;
uint64_t state, diff_state, button_was_pressed;
gl_t * gl = driver.video_data;
@ -1069,7 +1069,7 @@ static void set_keybind_digital(uint64_t state, uint64_t default_retro_joypad_id
static void rarch_filename_input_and_save (unsigned filename_type)
{
bool filename_entered = false;
char filename_tmp[256], filepath[MAX_PATH_LENGTH];
char filename_tmp[256], filepath[PATH_MAX];
oskutil_write_initial_message(&g_console.oskutil_handle, L"example");
oskutil_write_message(&g_console.oskutil_handle, L"Enter filename for preset (with no file extension)");
@ -1946,7 +1946,7 @@ static void select_rom(void)
}
else if (FILEBROWSER_IS_CURRENT_A_FILE(browser))
{
char rom_path_temp[MAX_PATH_LENGTH];
char rom_path_temp[PATH_MAX];
struct retro_system_info info;
retro_get_system_info(&info);
bool block_zip_extract = info.block_extract;

View File

@ -17,8 +17,6 @@
#ifndef _PS3_SHARED_H
#define _PS3_SHARED_H
#define MAX_PATH_LENGTH 1024
/* ABGR color format */
#define WHITE 0xffffffffu
@ -73,19 +71,19 @@ enum {
#define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_XMB+1
extern char contentInfoPath[MAX_PATH_LENGTH];
extern char usrDirPath[MAX_PATH_LENGTH];
extern char DEFAULT_PRESET_FILE[MAX_PATH_LENGTH];
extern char DEFAULT_BORDER_FILE[MAX_PATH_LENGTH];
extern char DEFAULT_MENU_BORDER_FILE[MAX_PATH_LENGTH];
extern char PRESETS_DIR_PATH[MAX_PATH_LENGTH];
extern char INPUT_PRESETS_DIR_PATH[MAX_PATH_LENGTH];
extern char BORDERS_DIR_PATH[MAX_PATH_LENGTH];
extern char SHADERS_DIR_PATH[MAX_PATH_LENGTH];
extern char DEFAULT_SHADER_FILE[MAX_PATH_LENGTH];
extern char DEFAULT_MENU_SHADER_FILE[MAX_PATH_LENGTH];
extern char LIBRETRO_DIR_PATH[MAX_PATH_LENGTH];
extern char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
extern char MULTIMAN_EXECUTABLE[MAX_PATH_LENGTH];
extern char contentInfoPath[PATH_MAX];
extern char usrDirPath[PATH_MAX];
extern char DEFAULT_PRESET_FILE[PATH_MAX];
extern char DEFAULT_BORDER_FILE[PATH_MAX];
extern char DEFAULT_MENU_BORDER_FILE[PATH_MAX];
extern char PRESETS_DIR_PATH[PATH_MAX];
extern char INPUT_PRESETS_DIR_PATH[PATH_MAX];
extern char BORDERS_DIR_PATH[PATH_MAX];
extern char SHADERS_DIR_PATH[PATH_MAX];
extern char DEFAULT_SHADER_FILE[PATH_MAX];
extern char DEFAULT_MENU_SHADER_FILE[PATH_MAX];
extern char LIBRETRO_DIR_PATH[PATH_MAX];
extern char SYS_CONFIG_FILE[PATH_MAX];
extern char MULTIMAN_EXECUTABLE[PATH_MAX];
#endif