aboutsummaryrefslogtreecommitdiff
path: root/libretro.h
diff options
context:
space:
mode:
authorDwedit2018-03-30 22:35:35 -0500
committerDwedit2018-03-30 22:35:35 -0500
commitf453201fa149d3e2a85f0b466b1c67c6c90d54e0 (patch)
treed1c97fb8954fc210e09f35cbb2738720ea47aa1f /libretro.h
parent8ca47fd3e698aa0ccc63bb62784818d243cf3643 (diff)
downloadsnesemu-f453201fa149d3e2a85f0b466b1c67c6c90d54e0.tar.gz
snesemu-f453201fa149d3e2a85f0b466b1c67c6c90d54e0.tar.bz2
snesemu-f453201fa149d3e2a85f0b466b1c67c6c90d54e0.zip
Add support for Audio/Video Disable flags
Add support for Hard Disable Audio Fix frame discarding causing infinite loops Fix MSVC building
Diffstat (limited to 'libretro.h')
-rw-r--r--libretro.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/libretro.h b/libretro.h
index 469b86a..ed1902b 100644
--- a/libretro.h
+++ b/libretro.h
@@ -901,6 +901,47 @@ enum retro_mod
* writeable (and readable).
*/
+#define RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE (47 | RETRO_ENVIRONMENT_EXPERIMENTAL)
+ /* int * --
+ * Tells the core if the frontend wants audio or video.
+ * If disabled, the frontend will discard the audio or video,
+ * so the core may decide to skip generating a frame or generating audio.
+ * This is mainly used for increasing performance.
+ * Bit 0 (value 1): Enable Video
+ * Bit 1 (value 2): Enable Audio
+ * Bit 2 (value 4): Use Fast Savestates.
+ * Bit 3 (value 8): Hard Disable Audio
+ * Other bits are reserved for future use and will default to zero.
+ * If video is disabled:
+ * * The frontend wants the core to not generate any video,
+ * including presenting frames via hardware acceleration.
+ * * The frontend's video frame callback will do nothing.
+ * * After running the frame, the video output of the next frame should be
+ * no different than if video was enabled, and saving and loading state
+ * should have no issues.
+ * If audio is disabled:
+ * * The frontend wants the core to not generate any audio.
+ * * The frontend's audio callbacks will do nothing.
+ * * After running the frame, the audio output of the next frame should be
+ * no different than if audio was enabled, and saving and loading state
+ * should have no issues.
+ * Fast Savestates:
+ * * Guaranteed to be created by the same binary that will load them.
+ * * Will not be written to or read from the disk.
+ * * Suggest that the core assumes loading state will succeed.
+ * * Suggest that the core updates its memory buffers in-place if possible.
+ * * Suggest that the core skips clearing memory.
+ * * Suggest that the core skips resetting the system.
+ * * Suggest that the core may skip validation steps.
+ * Hard Disable Audio:
+ * * Used for a secondary core when running ahead.
+ * * Indicates that the frontend will never need audio from the core.
+ * * Suggests that the core may stop synthesizing audio, but this should not
+ * compromise emulation accuracy.
+ * * Audio output for the next frame does not matter, and the frontend will
+ * never need an accurate audio state in the future.
+ * * State will never be saved when using Hard Disable Audio.
+ */
enum retro_hw_render_interface_type
{
RETRO_HW_RENDER_INTERFACE_VULKAN = 0,