From bc254071b9c90be2c993240d48dddaaaf92c1b45 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 21 Oct 2014 08:13:50 +0200 Subject: [PATCH] (360) Build fixes --- frontend/platform/platform_xdk.c | 11 +- libretro-sdk/compat/compat.c | 30 +- .../RetroArch-Salamander.vcxproj | 571 +++++++++--------- .../RetroArch-Salamander.vcxproj.filters | 99 +-- 4 files changed, 361 insertions(+), 350 deletions(-) diff --git a/frontend/platform/platform_xdk.c b/frontend/platform/platform_xdk.c index e04fee8fd6..b7a35f5156 100644 --- a/frontend/platform/platform_xdk.c +++ b/frontend/platform/platform_xdk.c @@ -26,10 +26,7 @@ #include "../../conf/config_file.h" #include "../../conf/config_file_macros.h" #include "../../file.h" - -#ifndef IS_SALAMANDER #include "../../general.h" -#endif static bool exit_spawn; static bool exitspawn_start_game; @@ -239,8 +236,8 @@ static void frontend_xdk_get_environment_settings(int *argc, char *argv[], } #endif -exit: #ifndef IS_SALAMANDER +exit: g_extern.verbosity = original_verbose; #endif } @@ -280,12 +277,6 @@ static void frontend_xdk_exitspawn(char *core_path, frontend_xdk_exec(core_path, should_load_game); } -#include - -#include - -#include "../../retroarch_logger.h" - static void frontend_xdk_exec(const char *path, bool should_load_game) { #ifndef IS_SALAMANDER diff --git a/libretro-sdk/compat/compat.c b/libretro-sdk/compat/compat.c index 10f3bf78b3..995142f681 100644 --- a/libretro-sdk/compat/compat.c +++ b/libretro-sdk/compat/compat.c @@ -75,20 +75,22 @@ static int find_long_index(char * const *argv) static int parse_short(const char *optstring, char * const *argv) { + bool extra_opt, takes_arg, embedded_arg; + const char *opt = NULL; char arg = argv[0][1]; if (arg == ':') return '?'; - const char *opt = strchr(optstring, arg); + opt = strchr(optstring, arg); if (!opt) return '?'; - bool extra_opt = argv[0][2]; - bool takes_arg = opt[1] == ':'; + extra_opt = argv[0][2]; + takes_arg = opt[1] == ':'; /* If we take an argument, and we see additional characters, * this is in fact the argument (i.e. -cfoo is same as -c foo). */ - bool embedded_arg = extra_opt && takes_arg; + embedded_arg = extra_opt && takes_arg; if (takes_arg) { @@ -173,6 +175,7 @@ static void shuffle_block(char **begin, char **last, char **end) int getopt_long(int argc, char *argv[], const char *optstring, const struct option *longopts, int *longindex) { + int short_index, long_index; (void)longindex; if (optind == 0) @@ -181,8 +184,8 @@ int getopt_long(int argc, char *argv[], if (argc == 1) return -1; - int short_index = find_short_index(&argv[optind]); - int long_index = find_long_index(&argv[optind]); + short_index = find_short_index(&argv[optind]); + long_index = find_long_index(&argv[optind]); /* We're done here. */ if (short_index == -1 && long_index == -1) @@ -232,13 +235,14 @@ static int casencmp(const char *a, const char *b, size_t n) char *strcasestr_rarch__(const char *haystack, const char *needle) { - size_t i; - size_t hay_len = strlen(haystack); - size_t needle_len = strlen(needle); + size_t i, hay_len, needle_len, search_off; + + hay_len = strlen(haystack); + needle_len = strlen(needle); if (needle_len > hay_len) return NULL; - size_t search_off = hay_len - needle_len; + search_off = hay_len - needle_len; for (i = 0; i <= search_off; i++) if (!casencmp(haystack + i, needle, needle_len)) return (char*)haystack + i; @@ -330,16 +334,16 @@ int rarch_isblank__(int c) char *rarch_strtok_r__(char *str, const char *delim, char **saveptr) { + char *first = NULL; if (!saveptr || !delim) return NULL; if (str) *saveptr = str; - char *first = NULL; - do { + char *ptr = NULL; first = *saveptr; while (*first && strchr(delim, *first)) *first++ = '\0'; @@ -347,7 +351,7 @@ char *rarch_strtok_r__(char *str, const char *delim, char **saveptr) if (*first == '\0') return NULL; - char *ptr = first + 1; + ptr = first + 1; while (*ptr && !strchr(delim, *ptr)) ptr++; diff --git a/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj b/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj index 74a76bbe82..e18d891320 100644 --- a/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj +++ b/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj @@ -1,279 +1,292 @@ - - - - - CodeAnalysis - Xbox 360 - - - Debug - Xbox 360 - - - Profile - Xbox 360 - - - Profile_FastCap - Xbox 360 - - - Release - Xbox 360 - - - Release_LTCG - Xbox 360 - - - - {29D5B973-F267-4039-84E7-8D34E9D00800} - Xbox360Proj - RetroArch-Salamander - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - true - $(OutDir)default.xex - - - true - $(OutDir)default.xex - - - false - $(OutDir)default.xex - - - false - $(OutDir)default.xex - - - false - $(OutDir)default.xex - - - false - $(OutDir)default.xex - - - - NotUsing - Level3 - ProgramDatabase - Disabled - false - true - false - MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC - Callcap - - - true - $(OutDir)$(ProjectName).pdb - xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;%(AdditionalDependencies) - - - CopyToHardDrive - - - - - NotUsing - Level4 - ProgramDatabase - Disabled - false - true - AnalyzeOnly - false - MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC - Callcap - - - true - $(OutDir)$(ProjectName).pdb - xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;%(AdditionalDependencies) - - - CopyToHardDrive - - - - - Level3 - NotUsing - Full - true - false - true - ProgramDatabase - Size - false - MultiThreaded - NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC - Callcap - - - true - false - xapilib.lib;%(IgnoreSpecificDefaultLibraries) - true - $(OutDir)$(ProjectName).pdb - true - xapilibi.lib;d3d9i.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3i.lib;x3daudioi.lib;xmcorei.lib;xbdm.lib;vcomp.lib;%(AdditionalDependencies) - - - CopyToHardDrive - - - - - Level3 - NotUsing - Full - true - false - true - ProgramDatabase - Fastcap - Size - false - MultiThreaded - NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC - - - true - false - true - $(OutDir)$(ProjectName).pdb - true - xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;xbdm.lib;%(AdditionalDependencies) - - - CopyToHardDrive - - - - - Level3 - NotUsing - Full - true - true - ProgramDatabase - Size - false - false - MultiThreaded - NDEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC - - - true - true - true - $(OutDir)$(ProjectName).pdb - true - xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;%(AdditionalDependencies) - - - CopyToHardDrive - - - - - Level3 - NotUsing - Full - true - true - ProgramDatabase - Size - false - false - MultiThreaded - NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC - - - true - true - true - $(OutDir)$(ProjectName).pdb - true - xapilib.lib;d3d9ltcg.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3ltcg.lib;x3daudioltcg.lib;xmcoreltcg.lib;vcomp.lib;%(AdditionalDependencies) - - - CopyToHardDrive - - - - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - - - - - - - - - - - + + + + + CodeAnalysis + Xbox 360 + + + Debug + Xbox 360 + + + Profile + Xbox 360 + + + Profile_FastCap + Xbox 360 + + + Release + Xbox 360 + + + Release_LTCG + Xbox 360 + + + + {29D5B973-F267-4039-84E7-8D34E9D00800} + Xbox360Proj + RetroArch-Salamander + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + true + $(OutDir)default.xex + + + true + $(OutDir)default.xex + + + false + $(OutDir)default.xex + + + false + $(OutDir)default.xex + + + false + $(OutDir)default.xex + + + false + $(OutDir)default.xex + + + + NotUsing + Level3 + ProgramDatabase + Disabled + false + true + false + MultiThreadedDebug + _DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC + Callcap + $(SolutionDir)\..\libretro-sdk\include;%(AdditionalIncludeDirectories) + + + true + $(OutDir)$(ProjectName).pdb + xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;%(AdditionalDependencies) + + + CopyToHardDrive + + + + + NotUsing + Level4 + ProgramDatabase + Disabled + false + true + AnalyzeOnly + false + MultiThreadedDebug + _DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC + Callcap + $(SolutionDir)\..\libretro-sdk\include;%(AdditionalIncludeDirectories) + + + true + $(OutDir)$(ProjectName).pdb + xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;%(AdditionalDependencies) + + + CopyToHardDrive + + + + + Level3 + NotUsing + Full + true + false + true + ProgramDatabase + Size + false + MultiThreaded + NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC + Callcap + $(SolutionDir)\..\libretro-sdk\include;%(AdditionalIncludeDirectories) + + + true + false + xapilib.lib;%(IgnoreSpecificDefaultLibraries) + true + $(OutDir)$(ProjectName).pdb + true + xapilibi.lib;d3d9i.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3i.lib;x3daudioi.lib;xmcorei.lib;xbdm.lib;vcomp.lib;%(AdditionalDependencies) + + + CopyToHardDrive + + + + + Level3 + NotUsing + Full + true + false + true + ProgramDatabase + Fastcap + Size + false + MultiThreaded + NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC + $(SolutionDir)\..\libretro-sdk\include;%(AdditionalIncludeDirectories) + + + true + false + true + $(OutDir)$(ProjectName).pdb + true + xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;xbdm.lib;%(AdditionalDependencies) + + + CopyToHardDrive + + + + + Level3 + NotUsing + Full + true + true + ProgramDatabase + Size + false + false + MultiThreaded + NDEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC + $(SolutionDir)\..\libretro-sdk\include;%(AdditionalIncludeDirectories) + + + true + true + true + $(OutDir)$(ProjectName).pdb + true + xapilib.lib;d3d9.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3.lib;x3daudio.lib;xmcore.lib;vcomp.lib;%(AdditionalDependencies) + + + CopyToHardDrive + + + + + Level3 + NotUsing + Full + true + true + ProgramDatabase + Size + false + false + MultiThreaded + NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC + $(SolutionDir)\..\libretro-sdk\include;%(AdditionalIncludeDirectories) + + + true + true + true + $(OutDir)$(ProjectName).pdb + true + xapilib.lib;d3d9ltcg.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3ltcg.lib;x3daudioltcg.lib;xmcoreltcg.lib;vcomp.lib;%(AdditionalDependencies) + + + CopyToHardDrive + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + CompileAsC + CompileAsC + CompileAsC + CompileAsC + CompileAsC + CompileAsC + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj.filters b/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj.filters index abe33340e7..ecae5e01c4 100644 --- a/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj.filters +++ b/msvc/RetroArch-360-Salamander/RetroArch-Salamander.vcxproj.filters @@ -1,48 +1,51 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {442ff913-d338-430f-8b84-57bd7d4117db} - - - {7ffc19c2-b69a-4272-b986-4fafee630f77} - - - - - Source Files\conf - - - Source Files\compat - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {7ffc19c2-b69a-4272-b986-4fafee630f77} + + + {f4a792cf-e151-4c18-90e8-937df3d3562a} + + + {442ff913-d338-430f-8b84-57bd7d4117db} + + + + + Source Files\conf + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\libretro-sdk\compat + + + \ No newline at end of file