diff --git a/Makefile.wii b/Makefile.wii
index 85c153a6c9..e38c192f7d 100644
--- a/Makefile.wii
+++ b/Makefile.wii
@@ -51,7 +51,7 @@ CFLAGS += -DHAVE_FILE_LOGGER
CFLAGS += -Iconsole/logger
endif
-CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_CONFIGFILE=1 -DGEKKO -DHW_RVL -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"0.9.7-rc2\" -Dmain=rarch_main -Wno-char-subscripts
+CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_CONFIGFILE=1 -DGEKKO -DHW_RVL -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"0.9.7-rc2\" -Dmain=rarch_main -Wno-char-subscripts
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c
index e1c83d4f2b..2cf6ff0504 100644
--- a/console/griffin/griffin.c
+++ b/console/griffin/griffin.c
@@ -291,6 +291,13 @@ NETPLAY
#include "../../netplay.c"
#endif
+/*============================================================
+SCREENSHOTS
+============================================================ */
+#ifdef HAVE_SCREENSHOTS
+#include "../../screenshot.c"
+#endif
+
/*============================================================
MENU
============================================================ */
@@ -304,7 +311,6 @@ MENU
#endif
#ifdef HAVE_RGUI
-#include "../../screenshot.c"
#include "../rgui/rgui.c"
#include "../rgui/list.c"
#endif
diff --git a/console/rarch_console.h b/console/rarch_console.h
index 6cdcc65c8d..974f57962d 100644
--- a/console/rarch_console.h
+++ b/console/rarch_console.h
@@ -73,7 +73,11 @@ enum
SOUND_MODE_LAST
};
+#ifdef _WIN32
+#define MAXIMUM_PATH 260
+#else
#define MAXIMUM_PATH 512
+#endif
typedef struct
{
@@ -90,6 +94,7 @@ typedef struct
char filebrowser_startup_dir[MAXIMUM_PATH];
char filesystem_root_dir[MAXIMUM_PATH];
char input_presets_dir[MAXIMUM_PATH];
+ char screenshots_dir[MAXIMUM_PATH];
#ifdef HAVE_MULTIMAN
char multiman_self_file[MAXIMUM_PATH];
#endif
diff --git a/console/rmenu/context/rmenu_ctx_xdk.c b/console/rmenu/context/rmenu_ctx_xdk.c
index cd74017386..21ece7457f 100644
--- a/console/rmenu/context/rmenu_ctx_xdk.c
+++ b/console/rmenu/context/rmenu_ctx_xdk.c
@@ -15,6 +15,7 @@
*/
#include "../rmenu.h"
+#include "../../screenshot.h"
#include "../../gfx/context/xdk_ctx.h"
#define ROM_PANEL_WIDTH 510
@@ -153,7 +154,19 @@ static void rmenu_ctx_xdk_screenshot_enable(bool enable)
static void rmenu_ctx_xdk_screenshot_dump(void *data)
{
- (void)data;
+ xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
+ char filename[PATH_MAX];
+ char shotname[PATH_MAX];
+
+ screenshot_generate_filename(shotname, sizeof(shotname));
+ snprintf(filename, sizeof(filename), "%s\\%s", default_paths.screenshots_dir, shotname);
+
+ D3DSurface *surf = NULL;
+ d3d->d3d_render_device->GetBackBuffer(-1, D3DBACKBUFFER_TYPE_MONO, &surf);
+ XGWriteSurfaceToFile(surf, filename);
+ surf->Release();
+
+ msg_queue_push(g_extern.msg_queue, "Screenshot saved.", 1, 30);
}
const rmenu_context_t rmenu_ctx_xdk = {
diff --git a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj
index 428ab85e68..87c114e7f9 100644
--- a/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj
+++ b/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj
@@ -22,7 +22,7 @@
Optimization="3"
OptimizeForProcessor="2"
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
- PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER"
+ PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS"
MinimalRebuild="TRUE"
BasicRuntimeChecks="0"
RuntimeLibrary="1"
@@ -72,7 +72,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
- PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER"
+ PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@@ -127,7 +127,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
- PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER"
+ PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@@ -188,7 +188,7 @@
EnableFiberSafeOptimizations="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
- PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER"
+ PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@@ -241,7 +241,7 @@
OmitFramePointers="TRUE"
OptimizeForProcessor="2"
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
- PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER"
+ PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.7-rc1\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_CONFIGFILE;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS"
StringPooling="TRUE"
RuntimeLibrary="0"
BufferSecurityCheck="TRUE"
@@ -275,7 +275,7 @@