aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliaspider2014-10-31 09:12:09 +0100
committeraliaspider2014-10-31 09:12:09 +0100
commit2e12730a7c94a57e9fe1ecd16c84cafeb8a80d88 (patch)
tree1f959989c4350c9445d6fc53514cb7ba8bd7db98
parent532f3cf63ff1c12eebbc2c2c69cbf886a7e73bf7 (diff)
downloadsnesemu-2e12730a7c94a57e9fe1ecd16c84cafeb8a80d88.tar.gz
snesemu-2e12730a7c94a57e9fe1ecd16c84cafeb8a80d88.tar.bz2
snesemu-2e12730a7c94a57e9fe1ecd16c84cafeb8a80d88.zip
remove S9xDeinitUpdate.
-rw-r--r--libretro.c69
-rw-r--r--source/gfx.c1
-rw-r--r--source/gfx.h1
3 files changed, 32 insertions, 39 deletions
diff --git a/libretro.c b/libretro.c
index f8baac8..0cb6c1c 100644
--- a/libretro.c
+++ b/libretro.c
@@ -12,8 +12,14 @@
#include "spc7110.h"
#include "srtc.h"
+#ifdef PSP
+#include <pspkernel.h>
+#include <pspgu.h>
+#endif
+
#include <libretro.h>
+
static retro_log_printf_t log_cb = NULL;
static retro_video_refresh_t video_cb = NULL;
static retro_input_poll_t poll_cb = NULL;
@@ -179,43 +185,6 @@ bool8 S9xInitUpdate()
return (TRUE);
}
-#ifdef PSP
-#include <pspkernel.h>
-#include <pspgu.h>
-void S9xDeinitUpdate(int width, int height)
-{
- static unsigned int __attribute__((aligned(16))) d_list[32];
- void* const texture_vram_p = (void*)(0x44200000 - (512 *
- 512)); // max VRAM address - frame size
-
- sceKernelDcacheWritebackRange(GFX.Screen, GFX.Pitch * height);
-
- sceGuStart(GU_DIRECT, d_list);
-
- sceGuCopyImage(GU_PSM_4444, 0, 0, width, height, GFX.Pitch >> 1, GFX.Screen, 0,
- 0,
- 512, texture_vram_p);
-
- sceGuTexSync();
- sceGuTexImage(0, 512, 512, 512, texture_vram_p);
- sceGuTexMode(GU_PSM_5551, 0, 0, GU_FALSE);
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
- sceGuDisable(GU_BLEND);
-
- sceGuFinish();
-
-
- video_cb(texture_vram_p, width, height, GFX.Pitch);
-}
-
-#else
-void S9xDeinitUpdate(int width, int height)
-{
- video_cb(GFX.Screen, width, height, GFX.Pitch);
-}
-
-#endif
-
void _makepath(char* path, const char* drive, const char* dir,
const char* fname, const char* ext)
{
@@ -425,6 +394,32 @@ void retro_run(void)
S9xMixSamples((uint8*)audio_buf, 534 << 1);
audio_batch_cb(audio_buf, 534);
+#ifdef PSP
+ static unsigned int __attribute__((aligned(16))) d_list[32];
+ void* const texture_vram_p = (void*)(0x44200000 - (512 *
+ 512)); // max VRAM address - frame size
+
+ sceKernelDcacheWritebackRange(GFX.Screen, GFX.Pitch * IPPU.RenderedScreenHeight);
+
+ sceGuStart(GU_DIRECT, d_list);
+
+ sceGuCopyImage(GU_PSM_4444, 0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch >> 1, GFX.Screen, 0,
+ 0,
+ 512, texture_vram_p);
+
+ sceGuTexSync();
+ sceGuTexImage(0, 512, 512, 512, texture_vram_p);
+ sceGuTexMode(GU_PSM_5551, 0, 0, GU_FALSE);
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
+ sceGuDisable(GU_BLEND);
+
+ sceGuFinish();
+
+
+ video_cb(texture_vram_p, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch);
+#else
+ video_cb(GFX.Screen, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, GFX.Pitch);
+#endif
#ifdef FRAMESKIP
if (IPPU.RenderThisFrame)
diff --git a/source/gfx.c b/source/gfx.c
index 9649b94..303d09f 100644
--- a/source/gfx.c
+++ b/source/gfx.c
@@ -710,7 +710,6 @@ void S9xEndScreenRefresh()
GFX.Pitch = GFX.Pitch2 = GFX.RealPitch;
GFX.PPL = GFX.PPLx2 >> 1;
- S9xDeinitUpdate(IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight);
}
S9xApplyCheats();
diff --git a/source/gfx.h b/source/gfx.h
index 411c464..0441223 100644
--- a/source/gfx.h
+++ b/source/gfx.h
@@ -108,7 +108,6 @@ extern struct SGFX GFX;
bool8 S9xGraphicsInit();
void S9xGraphicsDeinit();
bool8 S9xInitUpdate(void);
-void S9xDeinitUpdate(int width, int height);
#if 0
void S9xSyncSpeed();
#else