Skip to content

Commit

Permalink
Clean up unused headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
bearoso committed Oct 22, 2024
1 parent 170a6aa commit f6a46f5
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 61 deletions.
2 changes: 0 additions & 2 deletions common/video/vulkan/slang_preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#include <cstdio>
#include <vector>
#include <cctype>
#include <iostream>
#include <fstream>
#include <filesystem>
#include <future>
#include "external/SPIRV-Cross/spirv_cross.hpp"
#include "external/SPIRV-Cross/spirv_glsl.hpp"
Expand Down
1 change: 0 additions & 1 deletion common/video/vulkan/slang_preset_ini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "slang_helpers.hpp"
#include <fstream>
#include <cstring>
#include <charconv>

static std::string trim_comments(std::string str)
{
Expand Down
2 changes: 0 additions & 2 deletions common/video/vulkan/vulkan_slang_pipeline.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "vulkan_slang_pipeline.hpp"
#include "slang_helpers.hpp"
#include <unordered_map>

namespace Vulkan
{
Expand Down
46 changes: 20 additions & 26 deletions gtk/src/filter_epx_unsafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions gtk/src/filter_epx_unsafe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cstdint>
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 */
1 change: 0 additions & 1 deletion gtk/src/gtk_builder_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
\*****************************************************************************/

#include <stdlib.h>
#include <string.h>
#include "gtk_builder_window.h"

extern const unsigned char snes9x_ui[];
Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_cheat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "gtk_s9x.h"
#include "gtk_cheat.h"
#include "cheats.h"
#include "display.h"

enum {
COLUMN_ENABLED = 0,
Expand Down
2 changes: 0 additions & 2 deletions gtk/src/gtk_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <filesystem>
Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
\*****************************************************************************/

#include <fcntl.h>
#include <filesystem>

#include "SDL_joystick.h"
#include "fscompat.h"
Expand Down
5 changes: 0 additions & 5 deletions gtk/src/gtk_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_display_driver_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_display_driver_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
\*****************************************************************************/

#include <sys/stat.h>
#include <errno.h>
#include <string>
#include <filesystem>

Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
16 changes: 7 additions & 9 deletions gtk/src/gtk_s9x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include "ppu.h"
#include "fmt/format.h"

#include <iomanip>

static void S9xThrottle(int);
static void S9xCheckPointerTimer();
static bool S9xIdleFunc();
Expand Down Expand Up @@ -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);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion gtk/src/gtk_sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/

#include <errno.h>
#include <unistd.h>

#include "gtk_s9x.h"
Expand Down
1 change: 0 additions & 1 deletion qt/src/CheatsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "EmuApplication.hpp"
#include "EmuConfig.hpp"
#include "fscompat.h"
#include <tuple>

#include <QMessageBox>
#include <QDir>
Expand Down
1 change: 0 additions & 1 deletion qt/src/ControllerPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "EmuApplication.hpp"
#include "EmuConfig.hpp"
#include "SDL_gamecontroller.h"
#include <optional>
#include <QtEvents>
#include <QTimer>

Expand Down
1 change: 0 additions & 1 deletion qt/src/EmuBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "SDL_joystick.h"
#include <QString>
#include <QKeySequence>
#include <sstream>

// Hash format:
//
Expand Down
1 change: 0 additions & 1 deletion qt/src/FoldersPanel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "FoldersPanel.hpp"
#include "EmuBinding.hpp"
#include "EmuConfig.hpp"
#include <QSpinBox>
#include <QFileDialog>
Expand Down

0 comments on commit f6a46f5

Please sign in to comment.