diff options
author | notaz | 2012-07-30 15:49:21 +0300 |
---|---|---|
committer | notaz | 2012-07-31 01:31:34 +0300 |
commit | 36dfb7876314f16d401e2016e55d126fb264d1df (patch) | |
tree | a6e2df99b92d887bee2fa31fa5a4363ee06aefd1 | |
parent | d8a2f79b8743b44a0728902293acf101c9b2d882 (diff) | |
download | pcsx_rearmed-36dfb7876314f16d401e2016e55d126fb264d1df.tar.gz pcsx_rearmed-36dfb7876314f16d401e2016e55d126fb264d1df.tar.bz2 pcsx_rearmed-36dfb7876314f16d401e2016e55d126fb264d1df.zip |
frontend: improve minimize handling
-rw-r--r-- | frontend/main.c | 9 | ||||
-rw-r--r-- | frontend/plat_omap.c | 13 |
2 files changed, 20 insertions, 2 deletions
diff --git a/frontend/main.c b/frontend/main.c index 59fa24a..19e8319 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -255,7 +255,16 @@ do_state_slot: plat_step_volume(emu_action == SACTION_VOLUME_UP); return; case SACTION_MINIMIZE: + if (GPU_close != NULL) + GPU_close(); + plat_minimize(); + + if (GPU_open != NULL) { + ret = GPU_open(&gpuDisp, "PCSX", NULL); + if (ret) + fprintf(stderr, "GPU_open returned %d\n", ret); + } return; #endif default: diff --git a/frontend/plat_omap.c b/frontend/plat_omap.c index 89a59a6..b8ab19b 100644 --- a/frontend/plat_omap.c +++ b/frontend/plat_omap.c @@ -147,10 +147,19 @@ void plat_video_menu_leave(void) void plat_minimize(void) { - omap_enable_layer(0); + int ret; + + ret = vout_fbdev_save(layer_fb); + if (ret != 0) { + printf("minimize: layer/fb handling failed\n"); + return; + } + xenv_minimize(); + in_set_config_int(0, IN_CFG_BLOCKING, 0); /* flush event queue */ - omap_enable_layer(1); + omap_enable_layer(0); /* restore layer mem */ + vout_fbdev_restore(layer_fb); } void *plat_prepare_screenshot(int *w, int *h, int *bpp) |