projects
/
drnoksnes
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
png screenshot support
[drnoksnes]
/
platform
/
sdl.cpp
diff --git
a/platform/sdl.cpp
b/platform/sdl.cpp
index
0cb077e
..
cd540c7
100644
(file)
--- a/
platform/sdl.cpp
+++ b/
platform/sdl.cpp
@@
-9,15
+9,18
@@
#include "cpuexec.h"
#include "gfx.h"
#include "ppu.h"
#include "cpuexec.h"
#include "gfx.h"
#include "ppu.h"
-#include "display.h"
#include "memmap.h"
#include "soundux.h"
#include "hacks.h"
#include "snapshot.h"
#include "memmap.h"
#include "soundux.h"
#include "hacks.h"
#include "snapshot.h"
-#include "osso.h"
+#include "screenshot.h"
+
+#define kPollEveryNFrames 2 //Poll input only every this many frames
-#define kPollEveryNFrames 5 //Poll input only every this many frames
+#if CONF_GUI
+#include "osso.h"
#define kPollOssoEveryNFrames 10 //Poll dbus only every this many frames
#define kPollOssoEveryNFrames 10 //Poll dbus only every this many frames
+#endif
#define TRACE printf("trace: %s:%s\n", __FILE__, __func__);
#define DIE(format, ...) do { \
#define TRACE printf("trace: %s:%s\n", __FILE__, __func__);
#define DIE(format, ...) do { \
@@
-298,6
+301,13
@@
void S9xDoAction(unsigned char action)
S9xVideoToggleFullscreen();
}
S9xVideoToggleFullscreen();
}
+#if CONF_PNG
+ if (action & kActionScreenshot) {
+ S9xSaveScreenshot(S9xGetFilename(FILE_SCREENSHOT));
+ S9xSetInfoString("Screenshot taken");
+ }
+#endif
+
if (action & kActionQuickLoad1) {
const char * file = S9xGetQuickSaveFilename(1);
int result = S9xUnfreezeGame(file);
if (action & kActionQuickLoad1) {
const char * file = S9xGetQuickSaveFilename(1);
int result = S9xUnfreezeGame(file);