diff --git a/logger_override.h b/console/logger/logger_override.h similarity index 93% rename from logger_override.h rename to console/logger/logger_override.h index 7dd0940cd7..0cf84278ed 100644 --- a/logger_override.h +++ b/console/logger/logger_override.h @@ -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 diff --git a/general.h b/general.h index 0a1375971e..60e54f451e 100644 --- a/general.h +++ b/general.h @@ -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 #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) diff --git a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj index 1706d281cc..2d3dd5a9a9 100644 --- a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj +++ b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj @@ -19,7 +19,7 @@ . + */ + +#ifndef __MSVC_71_H +#define __MSVC_71_H + +#include + +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 diff --git a/msvc/msvc-71/logger_override.h~ b/msvc/msvc-71/logger_override.h~ new file mode 100644 index 0000000000..04cb5cce7e --- /dev/null +++ b/msvc/msvc-71/logger_override.h~ @@ -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 . + */ + +#ifndef __MSVC_71_H +#define __MSVC_71_H + +#include + +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