From: Toni Wilen Date: Sat, 8 Oct 2016 13:59:56 +0000 (+0300) Subject: Generic pause/unpause functions. X-Git-Tag: 3400~62 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=468ee0ddadc7984ccd62c3acee093456d3222d01;p=francis%2Fwinuae.git Generic pause/unpause functions. --- diff --git a/devices.cpp b/devices.cpp index 5a948096..16b42ef2 100644 --- a/devices.cpp +++ b/devices.cpp @@ -59,6 +59,7 @@ #include "x86.h" #include "ethernet.h" #include "drawing.h" +#include "videograb.h" #ifdef RETROPLATFORM #include "rp.h" #endif @@ -450,4 +451,28 @@ void devices_restore_start(void) void devices_syncchange(void) { x86_bridge_sync_change(); -} \ No newline at end of file +} + +void devices_pause(void) +{ +#ifdef WITH_PPC + uae_ppc_pause(1); +#endif + blkdev_entergui(); +#ifdef RETROPLATFORM + rp_pause(pause_emulation); +#endif + pausevideograb(true); +} + +void devices_unpause(void) +{ + blkdev_exitgui(); +#ifdef RETROPLATFORM + rp_pause(pause_emulation); +#endif +#ifdef WITH_PPC + uae_ppc_pause(0); +#endif + pausevideograb(false); +} diff --git a/include/devices.h b/include/devices.h index 1cc6e2d2..d0dba4b3 100644 --- a/include/devices.h +++ b/include/devices.h @@ -14,5 +14,8 @@ void do_leave_program(void); void virtualdevice_init(void); void devices_restore_start(void); void device_check_config(void); +void devices_pause(void); +void devices_unpause(void); + #endif /* UAE_DEVICES_H */