mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-11 03:55:45 +00:00
(Xbox 1) Variadic macros workaround for VC 7.1
This commit is contained in:
parent
31bab3015a
commit
b5acc3863e
@ -21,7 +21,7 @@
|
||||
#include "console/logger/logger.h"
|
||||
|
||||
#define RARCH_LOG(...) do { \
|
||||
if (g_extern.verbose) logger_send("SSNES: " __VA_ARGS__); \
|
||||
if (g_extern.verbose) logger_send("RetroArch: " __VA_ARGS__); \
|
||||
} while(0)
|
||||
|
||||
#define RARCH_ERR(...) do { \
|
||||
@ -36,7 +36,7 @@ extern FILE * log_fp;
|
||||
#ifndef RARCH_LOG
|
||||
#define RARCH_LOG(...) do { \
|
||||
if (g_extern.verbose) \
|
||||
fprintf(log_fp, "SSNES: " __VA_ARGS__); \
|
||||
fprintf(log_fp, "RetroArch: " __VA_ARGS__); \
|
||||
fflush(log_fp); \
|
||||
} while (0)
|
||||
#endif
|
@ -501,8 +501,8 @@ extern struct console_settings g_console;
|
||||
#endif
|
||||
/////////
|
||||
|
||||
#if defined(RARCH_CONSOLE) && (defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER))
|
||||
#include "logger_override.h"
|
||||
#if defined(RARCH_CONSOLE) && (defined(HAVE_LOGGER) || defined(HAVE_FILE_LOGGER) || defined(_XBOX1))
|
||||
#include <logger_override.h>
|
||||
#else
|
||||
|
||||
#ifndef RARCH_LOG
|
||||
@ -602,8 +602,10 @@ static inline void rarch_sleep(unsigned msec)
|
||||
{
|
||||
#ifdef __CELLOS_LV2__
|
||||
sys_timer_usleep(1000 * msec);
|
||||
#elif defined(_WIN32)
|
||||
#elif defined(_WIN32) && !defined(_XBOX1)
|
||||
Sleep(msec);
|
||||
#elif defined(_XBOX1)
|
||||
//stub
|
||||
#elif defined(XENON)
|
||||
udelay(1000 * msec);
|
||||
#elif defined(GEKKO)
|
||||
|
@ -19,7 +19,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_XBOX;_XBOX1;RARCH_CONSOLE;PACKAGE_VERSION="0.9.6""
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -65,7 +65,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_XBOX;_XBOX1;RARCH_CONSOLE;PACKAGE_VERSION="0.9.6""
|
||||
StringPooling="TRUE"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -114,7 +114,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_XBOX;_XBOX1;RARCH_CONSOLE;PACKAGE_VERSION="0.9.6""
|
||||
StringPooling="TRUE"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@ -155,7 +155,7 @@
|
||||
ConfigurationType="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_XBOX;_XBOX1;RARCH_CONSOLE;PACKAGE_VERSION="0.9.6""
|
||||
UsePrecompiledHeader="0"/>
|
||||
<Tool
|
||||
@ -190,7 +190,7 @@
|
||||
ConfigurationType="1">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint""
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_XBOX;_XBOX1;RARCH_CONSOLE;PACKAGE_VERSION="0.9.6""
|
||||
UsePrecompiledHeader="0"/>
|
||||
<Tool
|
||||
|
46
msvc/msvc-71/logger_override.h
Normal file
46
msvc/msvc-71/logger_override.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MSVC_71_H
|
||||
#define __MSVC_71_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
static inline void RARCH_LOG(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
static inline void RARCH_WARN(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
static inline void RARCH_ERR(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#endif
|
46
msvc/msvc-71/logger_override.h~
Normal file
46
msvc/msvc-71/logger_override.h~
Normal file
@ -0,0 +1,46 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MSVC_71_H
|
||||
#define __MSVC_71_H
|
||||
|
||||
#include <stdargs.h>
|
||||
|
||||
static inline void RARCH_LOG(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
static inline void RARCH_WARN(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
static inline void RARCH_ERR(const char *msg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, msg);
|
||||
vfprintf(stderr, msg, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user