diff --git a/common/video/vulkan/slang_preset.cpp b/common/video/vulkan/slang_preset.cpp index 69cb4143..b2af65e2 100644 --- a/common/video/vulkan/slang_preset.cpp +++ b/common/video/vulkan/slang_preset.cpp @@ -8,9 +8,7 @@ #include #include #include -#include #include -#include #include #include "external/SPIRV-Cross/spirv_cross.hpp" #include "external/SPIRV-Cross/spirv_glsl.hpp" diff --git a/common/video/vulkan/slang_preset_ini.cpp b/common/video/vulkan/slang_preset_ini.cpp index 13654634..a3a073c6 100644 --- a/common/video/vulkan/slang_preset_ini.cpp +++ b/common/video/vulkan/slang_preset_ini.cpp @@ -2,7 +2,6 @@ #include "slang_helpers.hpp" #include #include -#include static std::string trim_comments(std::string str) { diff --git a/common/video/vulkan/vulkan_slang_pipeline.cpp b/common/video/vulkan/vulkan_slang_pipeline.cpp index 80398daf..1c857603 100644 --- a/common/video/vulkan/vulkan_slang_pipeline.cpp +++ b/common/video/vulkan/vulkan_slang_pipeline.cpp @@ -1,6 +1,4 @@ #include "vulkan_slang_pipeline.hpp" -#include "slang_helpers.hpp" -#include namespace Vulkan { diff --git a/gtk/src/filter_epx_unsafe.cpp b/gtk/src/filter_epx_unsafe.cpp index 3c03b7b7..5df6a3d7 100644 --- a/gtk/src/filter_epx_unsafe.cpp +++ b/gtk/src/filter_epx_unsafe.cpp @@ -4,37 +4,31 @@ For further information, consult the LICENSE file in the root directory. \*****************************************************************************/ -#ifdef DEBUGGER -#include "debug.h" -#include "missing.h" -#endif - -#include "port.h" #include "filter_epx_unsafe.h" #undef AVERAGE_565 #define AVERAGE_565(el0, el1) (((el0) & (el1)) + ((((el0) ^ (el1)) & 0xF7DE) >> 1)) /* Allows vertical overlap. We need this to avoid seams when threading */ -void EPX_16_unsafe (uint8 *srcPtr, +void EPX_16_unsafe (uint8_t *srcPtr, int srcPitch, - uint8 *dstPtr, + uint8_t *dstPtr, int dstPitch, int width, int height) { - uint16 colorX, colorA, colorB, colorC, colorD; - uint16 *sP, *uP, *lP; - uint32 *dP1, *dP2; + uint16_t colorX, colorA, colorB, colorC, colorD; + uint16_t *sP, *uP, *lP; + uint32_t *dP1, *dP2; int w; for (; height; height--) { - sP = (uint16 *) srcPtr; - uP = (uint16 *) (srcPtr - srcPitch); - lP = (uint16 *) (srcPtr + srcPitch); - dP1 = (uint32 *) dstPtr; - dP2 = (uint32 *) (dstPtr + dstPitch); + sP = (uint16_t *) srcPtr; + uP = (uint16_t *) (srcPtr - srcPitch); + lP = (uint16_t *) (srcPtr + srcPitch); + dP1 = (uint32_t *) dstPtr; + dP2 = (uint32_t *) (dstPtr + dstPitch); // left edge @@ -112,25 +106,25 @@ void EPX_16_unsafe (uint8 *srcPtr, } /* Blends with edge pixel instead of just using it directly. */ -void EPX_16_smooth_unsafe (uint8 *srcPtr, +void EPX_16_smooth_unsafe (uint8_t *srcPtr, int srcPitch, - uint8 *dstPtr, + uint8_t *dstPtr, int dstPitch, int width, int height) { - uint16 colorX, colorA, colorB, colorC, colorD; - uint16 *sP, *uP, *lP; - uint32 *dP1, *dP2; + uint16_t colorX, colorA, colorB, colorC, colorD; + uint16_t *sP, *uP, *lP; + uint32_t *dP1, *dP2; int w; for (; height; height--) { - sP = (uint16 *) srcPtr; - uP = (uint16 *) (srcPtr - srcPitch); - lP = (uint16 *) (srcPtr + srcPitch); - dP1 = (uint32 *) dstPtr; - dP2 = (uint32 *) (dstPtr + dstPitch); + sP = (uint16_t *) srcPtr; + uP = (uint16_t *) (srcPtr - srcPitch); + lP = (uint16_t *) (srcPtr + srcPitch); + dP1 = (uint32_t *) dstPtr; + dP2 = (uint32_t *) (dstPtr + dstPitch); // left edge diff --git a/gtk/src/filter_epx_unsafe.h b/gtk/src/filter_epx_unsafe.h index 6ce545c9..d39c9e24 100644 --- a/gtk/src/filter_epx_unsafe.h +++ b/gtk/src/filter_epx_unsafe.h @@ -7,7 +7,8 @@ #ifndef __FILTER_EPX_UNSAFE_H #define __FILTER_EPX_UNSAFE_H -void EPX_16_unsafe (uint8 *, int, uint8 *, int, int, int); -void EPX_16_smooth_unsafe (uint8 *, int, uint8 *, int, int, int); +#include +void EPX_16_unsafe(uint8_t *, int, uint8_t *, int, int, int); +void EPX_16_smooth_unsafe(uint8_t *, int, uint8_t *, int, int, int); #endif /* __FILTER_EPX_UNSAFE_H */ diff --git a/gtk/src/gtk_builder_window.cpp b/gtk/src/gtk_builder_window.cpp index b047c916..22edd1ee 100644 --- a/gtk/src/gtk_builder_window.cpp +++ b/gtk/src/gtk_builder_window.cpp @@ -5,7 +5,6 @@ \*****************************************************************************/ #include -#include #include "gtk_builder_window.h" extern const unsigned char snes9x_ui[]; diff --git a/gtk/src/gtk_cheat.cpp b/gtk/src/gtk_cheat.cpp index ca6571c1..77df9451 100644 --- a/gtk/src/gtk_cheat.cpp +++ b/gtk/src/gtk_cheat.cpp @@ -7,7 +7,6 @@ #include "gtk_s9x.h" #include "gtk_cheat.h" #include "cheats.h" -#include "display.h" enum { COLUMN_ENABLED = 0, diff --git a/gtk/src/gtk_config.cpp b/gtk/src/gtk_config.cpp index df19a45b..96c0201f 100644 --- a/gtk/src/gtk_config.cpp +++ b/gtk/src/gtk_config.cpp @@ -4,8 +4,6 @@ For further information, consult the LICENSE file in the root directory. \*****************************************************************************/ -#include -#include #include #include #include diff --git a/gtk/src/gtk_control.cpp b/gtk/src/gtk_control.cpp index 35695093..2a41fc4e 100644 --- a/gtk/src/gtk_control.cpp +++ b/gtk/src/gtk_control.cpp @@ -5,7 +5,6 @@ \*****************************************************************************/ #include -#include #include "SDL_joystick.h" #include "fscompat.h" diff --git a/gtk/src/gtk_display.cpp b/gtk/src/gtk_display.cpp index c47ff334..bf290e84 100644 --- a/gtk/src/gtk_display.cpp +++ b/gtk/src/gtk_display.cpp @@ -13,13 +13,8 @@ #include "gtk_display_driver_gtk.h" #include "snes9x.h" -#include "memmap.h" -#include "cpuexec.h" -#include "ppu.h" #include "gfx.h" #include "netplay.h" -#include "controls.h" -#include "movie.h" #if defined(USE_XV) && defined(GDK_WINDOWING_X11) #include "gtk_display_driver_xv.h" diff --git a/gtk/src/gtk_display_driver_gtk.h b/gtk/src/gtk_display_driver_gtk.h index aa29441e..e5227611 100644 --- a/gtk/src/gtk_display_driver_gtk.h +++ b/gtk/src/gtk_display_driver_gtk.h @@ -7,7 +7,6 @@ #ifndef __GTK_DISPLAY_DRIVER_GTK_H #define __GTK_DISPLAY_DRIVER_GTK_H -#include "gtk_s9x.h" #include "gtk_display_driver.h" class S9xGTKDisplayDriver : public S9xDisplayDriver diff --git a/gtk/src/gtk_display_driver_vulkan.cpp b/gtk/src/gtk_display_driver_vulkan.cpp index 67838eaf..77285c59 100644 --- a/gtk/src/gtk_display_driver_vulkan.cpp +++ b/gtk/src/gtk_display_driver_vulkan.cpp @@ -9,7 +9,6 @@ #include "gtk_display_driver_vulkan.h" #include "gtk_shader_parameters.h" #include "snes9x.h" -#include "gfx.h" #include "fmt/format.h" #include "snes9x_imgui.h" diff --git a/gtk/src/gtk_file.cpp b/gtk/src/gtk_file.cpp index 280a28aa..aad6f746 100644 --- a/gtk/src/gtk_file.cpp +++ b/gtk/src/gtk_file.cpp @@ -5,7 +5,6 @@ \*****************************************************************************/ #include -#include #include #include diff --git a/gtk/src/gtk_preferences.cpp b/gtk/src/gtk_preferences.cpp index eaeb1225..1d512150 100644 --- a/gtk/src/gtk_preferences.cpp +++ b/gtk/src/gtk_preferences.cpp @@ -14,7 +14,6 @@ #include "fmt/format.h" #include "snes9x.h" #include "gfx.h" -#include "display.h" #define SAME_AS_GAME gettext("Same location as current game") diff --git a/gtk/src/gtk_s9x.cpp b/gtk/src/gtk_s9x.cpp index 95eda956..8fb942a4 100644 --- a/gtk/src/gtk_s9x.cpp +++ b/gtk/src/gtk_s9x.cpp @@ -28,8 +28,6 @@ #include "ppu.h" #include "fmt/format.h" -#include - static void S9xThrottle(int); static void S9xCheckPointerTimer(); static bool S9xIdleFunc(); @@ -383,35 +381,35 @@ void S9xMessage(int type, int number, const char *message) case S9X_TRACE: case S9X_DEBUG: { - g_debug(message); + g_debug("%s", message); break; } case S9X_WARNING: { - g_warning(message); + g_warning("%s", message); break; } case S9X_INFO: { - g_info(message); - g_message(message); + g_info("%s", message); + g_message("%s", message); break; } case S9X_ERROR: { // GLib’s g_critical() does not terminate the process - g_critical(message); + g_critical("%s", message); break; } case S9X_FATAL_ERROR: { // GLib’s g_error() terminates the process - g_error(message); + g_error("%s", message); break; } default: { - g_message(message); + g_message("%s", message); } } } diff --git a/gtk/src/gtk_sound.cpp b/gtk/src/gtk_sound.cpp index 157027d7..961812a5 100644 --- a/gtk/src/gtk_sound.cpp +++ b/gtk/src/gtk_sound.cpp @@ -4,7 +4,6 @@ For further information, consult the LICENSE file in the root directory. \*****************************************************************************/ -#include #include #include "gtk_s9x.h" diff --git a/qt/src/CheatsDialog.cpp b/qt/src/CheatsDialog.cpp index 7073d33d..886d9b57 100644 --- a/qt/src/CheatsDialog.cpp +++ b/qt/src/CheatsDialog.cpp @@ -2,7 +2,6 @@ #include "EmuApplication.hpp" #include "EmuConfig.hpp" #include "fscompat.h" -#include #include #include diff --git a/qt/src/ControllerPanel.cpp b/qt/src/ControllerPanel.cpp index 162f92f4..46f623e6 100644 --- a/qt/src/ControllerPanel.cpp +++ b/qt/src/ControllerPanel.cpp @@ -3,7 +3,6 @@ #include "EmuApplication.hpp" #include "EmuConfig.hpp" #include "SDL_gamecontroller.h" -#include #include #include diff --git a/qt/src/EmuBinding.cpp b/qt/src/EmuBinding.cpp index 4d52e3be..d221ed1e 100644 --- a/qt/src/EmuBinding.cpp +++ b/qt/src/EmuBinding.cpp @@ -2,7 +2,6 @@ #include "SDL_joystick.h" #include #include -#include // Hash format: // diff --git a/qt/src/FoldersPanel.cpp b/qt/src/FoldersPanel.cpp index 7dda46b2..f5be2f86 100644 --- a/qt/src/FoldersPanel.cpp +++ b/qt/src/FoldersPanel.cpp @@ -1,5 +1,4 @@ #include "FoldersPanel.hpp" -#include "EmuBinding.hpp" #include "EmuConfig.hpp" #include #include