From e322bbf109d4112d77f15f494deb85d6e7d64c02 Mon Sep 17 00:00:00 2001 From: BearOso Date: Thu, 6 Aug 2020 16:26:12 -0500 Subject: [PATCH] Remove S9xSetPalette --- display.h | 1 - docs/porting.html | 4 ---- gfx.cpp | 1 - gfx.h | 1 - gtk/src/gtk_display.cpp | 4 ---- libretro/libretro.cpp | 7 +++---- macosx/mac-render.mm | 7 +------ unix/x11.cpp | 7 +------ win32/win32_display.cpp | 6 ------ 9 files changed, 5 insertions(+), 33 deletions(-) diff --git a/display.h b/display.h index bafb5c83..3e770709 100644 --- a/display.h +++ b/display.h @@ -40,7 +40,6 @@ void S9xInitDisplay (int, char **); void S9xDeinitDisplay (void); void S9xTextMode (void); void S9xGraphicsMode (void); -void S9xSetPalette (void); void S9xToggleSoundChannel (int); bool8 S9xOpenSnapshotFile (const char *, bool8, STREAM *); void S9xCloseSnapshotFile (STREAM); diff --git a/docs/porting.html b/docs/porting.html index cde540dd..ac800c62 100644 --- a/docs/porting.html +++ b/docs/porting.html @@ -318,10 +318,6 @@

If your port can match Snes9x's built-in SoundChannelXXX command (see controls.cpp), you may choose to use this function. Otherwise return NULL. Basically, turn on/off the sound channel c (0-7), and turn on all channels if c is 8.

-

void S9xSetPalette (void)

-

- Called when the SNES color palette has changed. Use this function if your system needs to change its color palette to match the SNES's. Otherwise, leave it empty. -

void S9xSyncSpeed (void)

Called at the end of S9xMainLoop function, when emulating one frame has been done. You should adjust the frame rate in this function. diff --git a/gfx.cpp b/gfx.cpp index edaf3b4d..bbeae228 100644 --- a/gfx.cpp +++ b/gfx.cpp @@ -221,7 +221,6 @@ void S9xEndScreenRefresh (void) { uint32 saved = PPU.CGDATA[0]; IPPU.ColorsChanged = FALSE; - S9xSetPalette(); PPU.CGDATA[0] = saved; } diff --git a/gfx.h b/gfx.h index 9b4f6d74..f4deca3b 100644 --- a/gfx.h +++ b/gfx.h @@ -216,7 +216,6 @@ bool8 S9xInitUpdate (void); bool8 S9xDeinitUpdate (int, int); bool8 S9xContinueUpdate (int, int); void S9xReRefresh (void); -void S9xSetPalette (void); void S9xSyncSpeed (void); // called instead of S9xDisplayString if set to non-NULL diff --git a/gtk/src/gtk_display.cpp b/gtk/src/gtk_display.cpp index 4cfb454c..b25cf0d5 100644 --- a/gtk/src/gtk_display.cpp +++ b/gtk/src/gtk_display.cpp @@ -1498,10 +1498,6 @@ bool8 S9xInitUpdate() return true; } -void S9xSetPalette() -{ -} - void S9xTextMode() { } diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index dc33d07b..87f1a819 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -607,10 +607,10 @@ static void update_variables(void) var.key = "snes9x_echo_buffer_hack"; var.value = NULL; - + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var)) Settings.SeparateEchoBuffer = !strcmp(var.value, "disabled") ? false : true; - else + else Settings.SeparateEchoBuffer = false; var.key = "snes9x_blargg"; @@ -1133,7 +1133,7 @@ bool retro_load_game(const struct retro_game_info *game) if (rom_loaded) { /* If we're in RGB565 format, switch frontend to that */ - if (RED_SHIFT_BITS == 11) + if (RED_SHIFT_BITS == 11) { enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565; if (!environ_cb || !environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) @@ -2135,7 +2135,6 @@ bool8 S9xInitUpdate() { return TRUE; } void S9xExtraUsage() {} bool8 S9xOpenSoundDevice() { return TRUE; } bool S9xPollAxis(unsigned int, short*) { return FALSE; } -void S9xSetPalette() {} void S9xParseArg(char**, int&, int) {} void S9xExit() {} bool S9xPollPointer(unsigned int, short*, short*) { return false; } diff --git a/macosx/mac-render.mm b/macosx/mac-render.mm index 3ce4e9a1..dbdf7529 100644 --- a/macosx/mac-render.mm +++ b/macosx/mac-render.mm @@ -408,9 +408,4 @@ void S9xTextMode (void) void S9xGraphicsMode (void) { return; -} - -void S9xSetPalette (void) -{ - return; -} +} \ No newline at end of file diff --git a/unix/x11.cpp b/unix/x11.cpp index 9810904d..5613d802 100644 --- a/unix/x11.cpp +++ b/unix/x11.cpp @@ -1793,9 +1793,4 @@ bool S9xDisplayPollPointer (uint32 id, int16 *x, int16 *y) *y = GUI.mouse_y; return (true); -} - -void S9xSetPalette (void) -{ - return; -} +} \ No newline at end of file diff --git a/win32/win32_display.cpp b/win32/win32_display.cpp index cb6b2c24..c4448ef1 100644 --- a/win32/win32_display.cpp +++ b/win32/win32_display.cpp @@ -211,12 +211,6 @@ RECT CalculateDisplayRect(unsigned int sourceWidth,unsigned int sourceHeight, return drawRect; } -// we no longer support 8bit modes - no palette necessary -void S9xSetPalette( void) -{ - return; -} - bool8 S9xInitUpdate (void) { return (TRUE);