mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 06:18:34 +00:00
(Xbox 1/XDK) Screenshot code implemented
This commit is contained in:
parent
fda2dff40c
commit
6d5ed820e0
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 = {
|
||||
|
@ -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 @@
|
||||
<Tool
|
||||
Name="XboxDeploymentTool"
|
||||
RemotePath="xe:\$(SolutionName)\CORE.xbe"
|
||||
AdditionalFiles="..\..\xbox1\Media;roms;system"
|
||||
AdditionalFiles="..\..\xbox1\Media;roms;system;screenshots"
|
||||
ForceCopy="TRUE"/>
|
||||
<Tool
|
||||
Name="XboxImageTool"
|
||||
|
0
msvc/RetroArch-Xbox1/screenshots/.empty
Normal file
0
msvc/RetroArch-Xbox1/screenshots/.empty
Normal file
@ -88,7 +88,7 @@ static void set_fast_forward_button(bool new_button_state, bool new_hold_button_
|
||||
old_hold_button_state = new_hold_button_state;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
#if defined(HAVE_SCREENSHOTS) && !defined(_XBOX)
|
||||
static bool take_screenshot_viewport(void)
|
||||
{
|
||||
unsigned width = 0, height = 0;
|
||||
@ -2237,7 +2237,7 @@ static void check_cheats(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
#if defined(HAVE_SCREENSHOTS) && !defined(_XBOX)
|
||||
static void check_screenshot(void)
|
||||
{
|
||||
static bool old_pressed = false;
|
||||
@ -2301,7 +2301,7 @@ static void check_netplay_flip(void)
|
||||
|
||||
static void do_state_checks(void)
|
||||
{
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
#if defined(HAVE_SCREENSHOTS) && !defined(_XBOX)
|
||||
check_screenshot();
|
||||
#endif
|
||||
#ifndef RARCH_CONSOLE
|
||||
|
@ -112,6 +112,7 @@ static void get_environment_settings (void)
|
||||
strlcpy(default_paths.filesystem_root_dir, "D:", sizeof(default_paths.filesystem_root_dir));
|
||||
strlcpy(default_paths.executable_extension, ".xbe", sizeof(default_paths.executable_extension));
|
||||
strlcpy(default_paths.filebrowser_startup_dir, "D:", sizeof(default_paths.filebrowser_startup_dir));
|
||||
strlcpy(default_paths.screenshots_dir, "D:\\screenshots", sizeof(default_paths.screenshots_dir));
|
||||
#elif defined(_XBOX360)
|
||||
#ifdef HAVE_HDD_CACHE_PARTITION
|
||||
strlcpy(default_paths.cache_dir, "cache:\\", sizeof(default_paths.cache_dir));
|
||||
|
Loading…
Reference in New Issue
Block a user