[Build] Rework wx/CMakeLists.txt

* Bring the wx frontend more in-line with the rest of the codebase.
* Always default to Unicode APIs on Windows.
* Clean up all include guards and headers.
This commit is contained in:
Fabrice de Gans 2024-03-17 18:33:46 -07:00 committed by Rafael Kitover
parent d4430ca440
commit 6ac95d373f
89 changed files with 985 additions and 1438 deletions

View File

@ -184,28 +184,6 @@ if(X86_64 AND (ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS OR ENABLE_MMX))
message(FATAL_ERROR "The options ASM_CORE, ASM_SCALERS and MMX are not supported on X86_64 yet.") message(FATAL_ERROR "The options ASM_CORE, ASM_SCALERS and MMX are not supported on X86_64 yet.")
endif() endif()
if(NOT WIN32)
find_library(PTHREAD_LIB pthread)
if(PTHREAD_LIB)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PTHREAD_LIB})
set(VBAM_PTHREAD_LIB ${PTHREAD_LIB})
endif()
elseif(MINGW)
if(NOT VBAM_STATIC)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} -lpthread)
set(VBAM_PTHREAD_LIB -lpthread)
else()
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} "-Wl,-Bstatic -lwinpthread -Wl,-Bdynamic")
set(VBAM_PTHREAD_LIB "-Wl,-Bstatic -lwinpthread -Wl,-Bdynamic")
endif()
else()
find_package(PThreads4W)
if(PThreads4W_FOUND)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} PThreads4W::PThreads4W)
set(VBAM_PTHREAD_LIB PThreads4W::PThreads4W)
endif()
endif()
# Look for some dependencies using CMake scripts # Look for some dependencies using CMake scripts
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
@ -240,17 +218,9 @@ endif()
set(VBAM_SDL2_LIBS SDL2::SDL2 ${SDL2_LIBRARY_TEMP}) set(VBAM_SDL2_LIBS SDL2::SDL2 ${SDL2_LIBRARY_TEMP})
# set the standard libraries all ports use
set(
VBAMCORE_LIBS
vbam-core
${VBAM_SDL2_LIBS}
${OPENGL_LIBRARIES}
)
set(VBAM_GENERATED_DIR ${CMAKE_BINARY_DIR}/generated) set(VBAM_GENERATED_DIR ${CMAKE_BINARY_DIR}/generated)
# Set up "src" as a global include directory. # Set up "src" and generated directory as a global include directory.
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
${VBAM_GENERATED_DIR} ${VBAM_GENERATED_DIR}
@ -262,10 +232,10 @@ if(ENABLE_FFMPEG)
endif() endif()
if(APPLE) if(APPLE)
set(FFMPEG_LDFLAGS ${FFMPEG_LDFLAGS} -framework CoreText -framework ApplicationServices) list(APPEND FFMPEG_LDFLAGS "SHELL:-framework CoreText" "SHELL:-framework ApplicationServices")
if(UPSTREAM_RELEASE) if(UPSTREAM_RELEASE)
set(FFMPEG_LDFLAGS ${FFMPEG_LDFLAGS} -lbz2 -ltiff -framework DiskArbitration -lfreetype -lfontconfig -llzma -lxml2 -lharfbuzz) list(APPEND FFMPEG_LDFLAGS -lbz2 -ltiff "SHELL:-framework DiskArbitration" -lfreetype -lfontconfig -llzma -lxml2 -lharfbuzz)
endif() endif()
elseif(WIN32) elseif(WIN32)
set(WIN32_MEDIA_FOUNDATION_LIBS dxva2 evr mf mfplat mfplay mfreadwrite mfuuid amstrmid) set(WIN32_MEDIA_FOUNDATION_LIBS dxva2 evr mf mfplat mfplay mfreadwrite mfuuid amstrmid)
@ -366,24 +336,10 @@ if(NOT TRANSLATIONS_ONLY)
add_subdirectory(src/core) add_subdirectory(src/core)
add_subdirectory(src/components) add_subdirectory(src/components)
add_subdirectory(src/sdl) add_subdirectory(src/sdl)
endif()
if(ENABLE_WX)
add_subdirectory(src/wx) add_subdirectory(src/wx)
# Native Language Support
if(ENABLE_NLS)
add_subdirectory(po)
endif()
endif() endif()
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vba-over.ini DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/vbam)
# manual pages add_subdirectory(po/wxvbam)
if(UNIX)
if(ENABLE_WX)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/visualboyadvance-m.6 DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man6)
endif()
endif()
set(CPACK_GENERATOR "ZIP") set(CPACK_GENERATOR "ZIP")
set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_GENERATOR "TGZ")

View File

@ -14,6 +14,7 @@ endif()
add_compile_options( add_compile_options(
-pipe -pipe
-Wno-unused-command-line-argument -Wno-unused-command-line-argument
-Wno-deprecated-copy
-Wformat -Wformat
-Wformat-security -Wformat-security
-feliminate-unused-debug-types -feliminate-unused-debug-types

View File

@ -20,6 +20,10 @@ add_compile_definitions(
__STDC_LIMIT_MACROS __STDC_LIMIT_MACROS
__STDC_CONSTANT_MACROS __STDC_CONSTANT_MACROS
_CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS
_UNICODE
UNICODE
WINVER=0x0A00
NTDDI_VERSION=0x0A000007
NOMINMAX NOMINMAX
) )
add_compile_options( add_compile_options(

View File

@ -1,48 +1,3 @@
# From: https://stackoverflow.com/a/41416298/262458
function(REMOVE_DUPES ARG_STR OUTPUT)
set(ARG_LIST ${ARG_STR})
separate_arguments(ARG_LIST)
list(REMOVE_DUPLICATES ARG_LIST)
string (REGEX REPLACE "([^\\]|^);" "\\1 " _TMP_STR "${ARG_LIST}")
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
endfunction()
# From: https://stackoverflow.com/a/7216542
function(JOIN VALUES GLUE OUTPUT)
string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}")
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
endfunction()
# On MSYS2 transform wx lib paths to native paths for Ninja.
function(normalize_wx_paths)
if(MSYS)
set(libs "")
foreach(lib ${wxWidgets_LIBRARIES})
if(NOT lib MATCHES "^(-Wl,|-mwindows$|-pipe$)")
if(lib MATCHES "^/")
cygpath(lib "${lib}")
endif()
if(VBAM_STATIC AND lib MATCHES "^-l(wx.*|jpeg|tiff|jbig|lzma|expat)$")
cygpath(lib "$ENV{MSYSTEM_PREFIX}/lib/lib${CMAKE_MATCH_1}.a")
endif()
list(APPEND libs "${lib}")
endif()
endforeach()
set(wxWidgets_LIBRARIES "${libs}" PARENT_SCOPE)
endif()
endfunction()
macro(cleanup_wx_vars)
if(wxWidgets_CXX_FLAGS)
list(REMOVE_ITEM wxWidgets_CXX_FLAGS -fpermissive)
endif()
endmacro()
function(cygpath var path) function(cygpath var path)
execute_process( execute_process(
@ -157,5 +112,3 @@ function(find_wx_util var util)
set(${var} ${util} PARENT_SCOPE) set(${var} ${util} PARENT_SCOPE)
endforeach() endforeach()
endfunction() endfunction()
# vim:sw=4 sts et:

View File

@ -1,4 +0,0 @@
IF(ENABLE_WX)
add_subdirectory(wxvbam)
ENDIF(ENABLE_WX)

View File

@ -1,8 +1,7 @@
if(NOT ENABLE_WX OR NOT ENABLE_NLS)
return()
endif()
file(GLOB po_files "${CMAKE_CURRENT_SOURCE_DIR}/*.po") file(GLOB po_files "${CMAKE_CURRENT_SOURCE_DIR}/*.po")
gettext_create_translations( gettext_create_translations(wxvbam.pot ${po_files})
wxvbam.pot
${po_files}
)
add_dependencies(visualboyadvance-m translations)

View File

@ -2601,7 +2601,7 @@ static ConnectionState InitIPC()
linkid = 0; linkid = 0;
#if (defined __WIN32__ || defined _WIN32) #if (defined __WIN32__ || defined _WIN32)
if ((mmf = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(LINKDATA), LOCAL_LINK_NAME)) == NULL) { if ((mmf = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(LINKDATA), LOCAL_LINK_NAME)) == NULL) {
systemMessage(0, N_("Error creating file mapping")); systemMessage(0, N_("Error creating file mapping"));
return LINK_ERROR; return LINK_ERROR;
} }
@ -2672,7 +2672,7 @@ static ConnectionState InitIPC()
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
linkevent[sizeof(linkevent) - 2] = (char)i + '1'; linkevent[sizeof(linkevent) - 2] = (char)i + '1';
#if (defined __WIN32__ || defined _WIN32) #if (defined __WIN32__ || defined _WIN32)
linksync[i] = firstone ? CreateSemaphore(NULL, 0, 4, linkevent) : OpenSemaphore(SEMAPHORE_ALL_ACCESS, false, linkevent); linksync[i] = firstone ? CreateSemaphoreA(NULL, 0, 4, linkevent) : OpenSemaphoreA(SEMAPHORE_ALL_ACCESS, false, linkevent);
if (linksync[i] == NULL) { if (linksync[i] == NULL) {
UnmapViewOfFile(linkmem); UnmapViewOfFile(linkmem);
CloseHandle(mmf); CloseHandle(mmf);

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
#include <stdexcept> #include <stdexcept>
#include <wx/utils.h> #include <wx/utils.h>
#include "wxvbam.h" #include "wx/wxvbam.h"
#include "winsparkle-wrapper.h" #include "winsparkle-wrapper.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"

View File

@ -10,7 +10,7 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/XKBlib.h> #include <X11/XKBlib.h>
#include "wayland.h" #include "wx/wayland.h"
#endif // defined(__WXMSW__) #endif // defined(__WXMSW__)

View File

@ -1,5 +1,5 @@
#ifndef BACKGROUND_INPUT_H #ifndef VBAM_WX_BACKGROUND_INPUT_H_
#define BACKGROUND_INPUT_H #define VBAM_WX_BACKGROUND_INPUT_H_
#include <wx/event.h> #include <wx/event.h>
#include <wx/log.h> #include <wx/log.h>
@ -7,10 +7,8 @@
#include <wx/utils.h> #include <wx/utils.h>
#include <wx/window.h> #include <wx/window.h>
#include <unordered_map>
void enableKeyboardBackgroundInput(wxEvtHandler* handler); void enableKeyboardBackgroundInput(wxEvtHandler* handler);
void disableKeyboardBackgroundInput(); void disableKeyboardBackgroundInput();
#endif // BACKGROUND_INPUT_H #endif // VBAM_WX_BACKGROUND_INPUT_H_

View File

@ -1,4 +1,4 @@
#include "wxvbam.h" #include "wx/wxvbam.h"
#include <wx/aboutdlg.h> #include <wx/aboutdlg.h>
#include <wx/ffile.h> #include <wx/ffile.h>
@ -11,8 +11,6 @@
#include <wx/msgdlg.h> #include <wx/msgdlg.h>
#include "components/filters_interframe/interframe.h" #include "components/filters_interframe/interframe.h"
#include "config/option-proxy.h"
#include "config/option.h"
#include "core/base/version.h" #include "core/base/version.h"
#include "core/gb/gb.h" #include "core/gb/gb.h"
#include "core/gb/gbCheats.h" #include "core/gb/gbCheats.h"
@ -24,7 +22,9 @@
#include "core/gba/gbaGlobals.h" #include "core/gba/gbaGlobals.h"
#include "core/gba/gbaPrint.h" #include "core/gba/gbaPrint.h"
#include "core/gba/gbaSound.h" #include "core/gba/gbaSound.h"
#include "dialogs/game-maker.h" #include "wx/config/option-proxy.h"
#include "wx/config/option.h"
#include "wx/dialogs/game-maker.h"
#define GetXRCDialog(n) \ #define GetXRCDialog(n) \
wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog) wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog)

View File

@ -1,8 +1,8 @@
#include "config/game-control.h" #include "wx/config/game-control.h"
#include "../strutils.h" #include "wx/opts.h"
#include "opts.h" #include "wx/strutils.h"
#include "wxlogdebug.h" #include "wx/wxlogdebug.h"
namespace config { namespace config {

View File

@ -9,7 +9,7 @@
#include <wx/string.h> #include <wx/string.h>
#include "config/user-input.h" #include "wx/config/user-input.h"
namespace config { namespace config {

View File

@ -1,4 +1,4 @@
#include "config/option.h" #include "wx/config/option.h"
// Helper implementation file to define and compile all of these huge constants // Helper implementation file to define and compile all of these huge constants
// separately. These should not be updated very often, so having these in a // separately. These should not be updated very often, so having these in a
@ -13,10 +13,10 @@
#include "core/base/system.h" #include "core/base/system.h"
#include "core/gb/gbGlobals.h" #include "core/gb/gbGlobals.h"
#include "core/gba/gbaSound.h" #include "core/gba/gbaSound.h"
#include "opts.h" #include "wx/opts.h"
#define VBAM_OPTION_INTERNAL_INCLUDE #define VBAM_OPTION_INTERNAL_INCLUDE
#include "config/internal/option-internal.h" #include "wx/config/internal/option-internal.h"
#undef VBAM_OPTION_INTERNAL_INCLUDE #undef VBAM_OPTION_INTERNAL_INCLUDE
struct CoreOptions coreOptions; struct CoreOptions coreOptions;

View File

@ -8,7 +8,7 @@
#include <wx/string.h> #include <wx/string.h>
#include "config/option.h" #include "wx/config/option.h"
namespace config { namespace config {
namespace internal { namespace internal {

View File

@ -1,9 +1,9 @@
#include "config/shortcuts.h" #include "wx/config/shortcuts.h"
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#define VBAM_SHORTCUTS_INTERNAL_INCLUDE #define VBAM_SHORTCUTS_INTERNAL_INCLUDE
#include "config/internal/shortcuts-internal.h" #include "wx/config/internal/shortcuts-internal.h"
#undef VBAM_SHORTCUTS_INTERNAL_INCLUDE #undef VBAM_SHORTCUTS_INTERNAL_INCLUDE
namespace config { namespace config {

View File

@ -5,7 +5,7 @@
#include <set> #include <set>
#include <unordered_map> #include <unordered_map>
#include "config/user-input.h" #include "wx/config/user-input.h"
namespace config { namespace config {
namespace internal { namespace internal {

View File

@ -1,6 +1,6 @@
#include "config/option-observer.h" #include "wx/config/option-observer.h"
#include "config/option.h" #include "wx/config/option.h"
namespace config { namespace config {

View File

@ -6,7 +6,7 @@
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include "config/option-id.h" #include "wx/config/option-id.h"
namespace config { namespace config {

View File

@ -4,8 +4,8 @@
#include <array> #include <array>
#include <type_traits> #include <type_traits>
#include "config/option-id.h" #include "wx/config/option-id.h"
#include "config/option.h" #include "wx/config/option.h"
namespace config { namespace config {

View File

@ -1,4 +1,4 @@
#include "config/option.h" #include "wx/config/option.h"
#include <cstring> #include <cstring>
@ -8,10 +8,10 @@
#include <wx/translation.h> #include <wx/translation.h>
#define VBAM_OPTION_INTERNAL_INCLUDE #define VBAM_OPTION_INTERNAL_INCLUDE
#include "config/internal/option-internal.h" #include "wx/config/internal/option-internal.h"
#undef VBAM_OPTION_INTERNAL_INCLUDE #undef VBAM_OPTION_INTERNAL_INCLUDE
#include "config/option-proxy.h" #include "wx/config/option-proxy.h"
namespace config { namespace config {

View File

@ -9,7 +9,7 @@
#include <wx/string.h> #include <wx/string.h>
#include "config/option-id.h" #include "wx/config/option-id.h"
using std::uint8_t; using std::uint8_t;
using std::uint16_t; using std::uint16_t;

View File

@ -1,13 +1,13 @@
#include "config/shortcuts.h" #include "wx/config/shortcuts.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/translation.h> #include <wx/translation.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "config/user-input.h" #include "wx/config/user-input.h"
#define VBAM_SHORTCUTS_INTERNAL_INCLUDE #define VBAM_SHORTCUTS_INTERNAL_INCLUDE
#include "config/internal/shortcuts-internal.h" #include "wx/config/internal/shortcuts-internal.h"
#undef VBAM_SHORTCUTS_INTERNAL_INCLUDE #undef VBAM_SHORTCUTS_INTERNAL_INCLUDE
namespace config { namespace config {

View File

@ -7,7 +7,7 @@
#include <unordered_map> #include <unordered_map>
#include <utility> #include <utility>
#include "config/user-input.h" #include "wx/config/user-input.h"
// by default, only 9 recent items // by default, only 9 recent items
#define wxID_FILE10 (wxID_FILE9 + 1) #define wxID_FILE10 (wxID_FILE9 + 1)

View File

@ -1,4 +1,4 @@
#include "config/user-input.h" #include "wx/config/user-input.h"
#include <map> #include <map>
@ -7,8 +7,8 @@
#include <wx/regex.h> #include <wx/regex.h>
#include <wx/translation.h> #include <wx/translation.h>
#include "strutils.h" #include "wx/strutils.h"
#include "wxutil.h" #include "wx/wxutil.h"
namespace config { namespace config {

View File

@ -5,7 +5,7 @@
#include <wx/string.h> #include <wx/string.h>
#include <set> #include <set>
#include "widgets/wx/sdljoy.h" #include "wx/widgets/sdljoy.h"
namespace config { namespace config {

View File

@ -13,7 +13,7 @@ STRING(REGEX MATCHALL "\nEVT_HANDLER([^\")]|\"[^\"]*\")*\\)" MW "${MW}")
# cmdtab.cpp is a table of cmd-id-name/cmd-name pairs # cmdtab.cpp is a table of cmd-id-name/cmd-name pairs
# sorted for binary searching # sorted for binary searching
FILE(WRITE "${CMDTAB}" "// Generated from cmdevents.cpp; do not edit\n#include <wx/xrc/xmlres.h>\n\n#include \"wxvbam.h\"\n#include \"wxhead.h\"\n\nstruct cmditem cmdtab[] = {\n") FILE(WRITE "${CMDTAB}" "// Generated from cmdevents.cpp; do not edit\n#include <wx/xrc/xmlres.h>\n\n#include \"wx/wxvbam.h\"\n#include \"wx/wxhead.h\"\n\nstruct cmditem cmdtab[] = {\n")
SET(EVLINES ) SET(EVLINES )
FOREACH(EV ${MW}) FOREACH(EV ${MW})
# stripping the wxID_ makes it look better, but it's still all-caps # stripping the wxID_ makes it look better, but it's still all-caps

View File

@ -1,4 +1,4 @@
#include "dialogs/accel-config.h" #include "wx/dialogs/accel-config.h"
#include <wx/ctrlsub.h> #include <wx/ctrlsub.h>
#include <wx/event.h> #include <wx/event.h>
@ -7,12 +7,12 @@
#include <wx/msgdlg.h> #include <wx/msgdlg.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "config/shortcuts.h" #include "wx/config/shortcuts.h"
#include "config/user-input.h" #include "wx/config/user-input.h"
#include "dialogs/validated-child.h" #include "wx/dialogs/validated-child.h"
#include "opts.h" #include "wx/opts.h"
#include "widgets/user-input-ctrl.h" #include "wx/widgets/user-input-ctrl.h"
#include "wxvbam.h" #include "wx/wxvbam.h"
namespace dialogs { namespace dialogs {

View File

@ -6,8 +6,8 @@
#include <wx/dialog.h> #include <wx/dialog.h>
#include <wx/treectrl.h> #include <wx/treectrl.h>
#include "config/shortcuts.h" #include "wx/config/shortcuts.h"
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
// Forward declarations. // Forward declarations.
class wxControl; class wxControl;

View File

@ -1,11 +1,11 @@
#include "dialogs/directories-config.h" #include "wx/dialogs/directories-config.h"
#include <wx/filepicker.h> #include <wx/filepicker.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "dialogs/validated-child.h" #include "wx/dialogs/validated-child.h"
#include "widgets/option-validator.h" #include "wx/widgets/option-validator.h"
namespace dialogs { namespace dialogs {

View File

@ -3,7 +3,7 @@
#include <wx/dialog.h> #include <wx/dialog.h>
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
namespace dialogs { namespace dialogs {

View File

@ -1,4 +1,4 @@
#include "dialogs/display-config.h" #include "wx/dialogs/display-config.h"
#include <wx/arrstr.h> #include <wx/arrstr.h>
#include <wx/choice.h> #include <wx/choice.h>
@ -13,14 +13,14 @@
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "config/option-id.h" #include "wx/config/option-id.h"
#include "config/option-proxy.h" #include "wx/config/option-proxy.h"
#include "config/option.h" #include "wx/config/option.h"
#include "dialogs/validated-child.h" #include "wx/dialogs/validated-child.h"
#include "rpi.h" #include "wx/rpi.h"
#include "widgets/option-validator.h" #include "wx/widgets/option-validator.h"
#include "widgets/render-plugin.h" #include "wx/widgets/render-plugin.h"
#include "wxvbam.h" #include "wx/wxvbam.h"
namespace dialogs { namespace dialogs {

View File

@ -4,8 +4,8 @@
#include <wx/dialog.h> #include <wx/dialog.h>
#include <wx/event.h> #include <wx/event.h>
#include "config/option-observer.h" #include "wx/config/option-observer.h"
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
// Forward declarations. // Forward declarations.
class wxChoice; class wxChoice;

View File

@ -1,4 +1,4 @@
#include "dialogs/game-boy-config.h" #include "wx/dialogs/game-boy-config.h"
#include <array> #include <array>
#include <cstddef> #include <cstddef>
@ -13,10 +13,10 @@
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "config/option-observer.h" #include "wx/config/option-observer.h"
#include "config/option-proxy.h" #include "wx/config/option-proxy.h"
#include "dialogs/validated-child.h" #include "wx/dialogs/validated-child.h"
#include "widgets/option-validator.h" #include "wx/widgets/option-validator.h"
namespace dialogs { namespace dialogs {

View File

@ -1,12 +1,10 @@
#ifndef VBAM_WX_DIALOGS_GAME_BOY_CONFIG_H_ #ifndef VBAM_WX_DIALOGS_GAME_BOY_CONFIG_H_
#define VBAM_WX_DIALOGS_GAME_BOY_CONFIG_H_ #define VBAM_WX_DIALOGS_GAME_BOY_CONFIG_H_
#include <cstddef>
#include <wx/clrpicker.h> #include <wx/clrpicker.h>
#include <wx/dialog.h> #include <wx/dialog.h>
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
namespace dialogs { namespace dialogs {

View File

@ -1,4 +1,4 @@
#include "game-maker.h" #include "wx/dialogs/game-maker.h"
#include <unordered_map> #include <unordered_map>

View File

@ -1,12 +1,12 @@
#include "dialogs/gb-rom-info.h" #include "wx/dialogs/gb-rom-info.h"
#include <wx/control.h> #include <wx/control.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "core/base/sizes.h" #include "core/base/sizes.h"
#include "core/gb/gb.h" #include "core/gb/gb.h"
#include "dialogs/game-maker.h" #include "wx/dialogs/game-maker.h"
#include "dialogs/validated-child.h" #include "wx/dialogs/validated-child.h"
namespace dialogs { namespace dialogs {

View File

@ -3,7 +3,7 @@
#include <wx/dialog.h> #include <wx/dialog.h>
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
namespace dialogs { namespace dialogs {

View File

@ -1,11 +1,11 @@
#include "dialogs/joypad-config.h" #include "wx/dialogs/joypad-config.h"
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "dialogs/validated-child.h" #include "wx/dialogs/validated-child.h"
#include "opts.h" #include "wx/opts.h"
#include "widgets/option-validator.h" #include "wx/widgets/option-validator.h"
#include "widgets/user-input-ctrl.h" #include "wx/widgets/user-input-ctrl.h"
namespace dialogs { namespace dialogs {

View File

@ -3,7 +3,7 @@
#include <wx/dialog.h> #include <wx/dialog.h>
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
namespace dialogs { namespace dialogs {

View File

@ -1,7 +1,7 @@
#ifndef GAME_DRAWING_H #ifndef VBAM_WX_DRAWING_H_
#define GAME_DRAWING_H #define VBAM_WX_DRAWING_H_
#include "wxvbam.h" #include "wx/wxvbam.h"
class BasicDrawingPanel : public DrawingPanel { class BasicDrawingPanel : public DrawingPanel {
public: public:
@ -67,4 +67,4 @@ public:
}; };
#endif #endif
#endif /* GAME_DRAWING_H */ #endif // VBAM_WX_DRAWING_H_

View File

@ -1,5 +1,5 @@
// Application // Application
#include "wxvbam.h" #include "wx/wxvbam.h"
// Internals // Internals
#include "core/base/sound_driver.h" #include "core/base/sound_driver.h"

View File

@ -3,7 +3,8 @@
// //
// Please sort. // Please sort.
#include "wxhead.h" #include <wx/string.h>
#include <wx/translation.h>
[[maybe_unused]] void f() [[maybe_unused]] void f()
{ {

View File

@ -1,7 +1,7 @@
#ifndef NO_FAUDIO #ifndef NO_FAUDIO
// Application // Application
#include "wxvbam.h" #include "wx/wxvbam.h"
#include <stdio.h> #include <stdio.h>
// Interface // Interface

View File

@ -5,11 +5,11 @@
#include <wx/colordlg.h> #include <wx/colordlg.h>
#include <wx/ffile.h> #include <wx/ffile.h>
#include "config/option-proxy.h"
#include "core/gb/gbGlobals.h" #include "core/gb/gbGlobals.h"
#include "core/gba/gbaGlobals.h" #include "core/gba/gbaGlobals.h"
#include "viewsupt.h" #include "wx/config/option-proxy.h"
#include "wxvbam.h" #include "wx/viewsupt.h"
#include "wx/wxvbam.h"
namespace { namespace {
void utilReadScreenPixels(uint8_t* dest, int w, int h) { void utilReadScreenPixels(uint8_t* dest, int w, int h) {

View File

@ -5,14 +5,13 @@
// other non-viewer dialogs are at least validated enough that they won't crash // other non-viewer dialogs are at least validated enough that they won't crash
// viewer dialogs are not commonly used, so they are initialized on demand // viewer dialogs are not commonly used, so they are initialized on demand
#include "wxvbam.h" #include "wx/wxvbam.h"
#include <cmath> #include <cmath>
#include <stdexcept> #include <stdexcept>
#include <typeinfo> #include <typeinfo>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/checkedlistctrl.h>
#include <wx/choice.h> #include <wx/choice.h>
#include <wx/clrpicker.h> #include <wx/clrpicker.h>
#include <wx/dialog.h> #include <wx/dialog.h>
@ -32,26 +31,27 @@
#include <wx/valtext.h> #include <wx/valtext.h>
#include <wx/wfstream.h> #include <wx/wfstream.h>
#include "config/option-proxy.h"
#include "core/gb/gb.h" #include "core/gb/gb.h"
#include "core/gb/gbCheats.h" #include "core/gb/gbCheats.h"
#include "core/gb/gbGlobals.h" #include "core/gb/gbGlobals.h"
#include "core/gba/gbaCheats.h"
#include "core/gba/gbaCheatSearch.h" #include "core/gba/gbaCheatSearch.h"
#include "core/gba/gbaCheats.h"
#include "core/gba/gbaFlash.h" #include "core/gba/gbaFlash.h"
#include "core/gba/gbaGlobals.h" #include "core/gba/gbaGlobals.h"
#include "dialogs/accel-config.h" #include "wx/config/option-proxy.h"
#include "dialogs/directories-config.h" #include "wx/dialogs/accel-config.h"
#include "dialogs/display-config.h" #include "wx/dialogs/directories-config.h"
#include "dialogs/game-boy-config.h" #include "wx/dialogs/display-config.h"
#include "dialogs/gb-rom-info.h" #include "wx/dialogs/game-boy-config.h"
#include "dialogs/joypad-config.h" #include "wx/dialogs/gb-rom-info.h"
#include "opts.h" #include "wx/dialogs/joypad-config.h"
#include "widgets/option-validator.h" #include "wx/opts.h"
#include "wxhead.h" #include "wx/widgets/option-validator.h"
#include "wx/widgets/checkedlistctrl.h"
#include "wx/wxhead.h"
#if defined(__WXGTK__) #if defined(__WXGTK__)
#include "wayland.h" #include "wx/wayland.h"
#endif #endif
// The program icon, in case it's missing from .xrc (MSW gets it from .rc file) // The program icon, in case it's missing from .xrc (MSW gets it from .rc file)

View File

@ -4,8 +4,8 @@
#include <wx/rawbmp.h> #include <wx/rawbmp.h>
#include "wxvbam.h" #include "wx/drawing.h"
#include "drawing.h" #include "wx/wxvbam.h"
Quartz2DDrawingPanel::Quartz2DDrawingPanel(wxWindow* parent, int _width, int _height) Quartz2DDrawingPanel::Quartz2DDrawingPanel(wxWindow* parent, int _width, int _height)
: BasicDrawingPanel(parent, _width, _height) : BasicDrawingPanel(parent, _width, _height)

View File

@ -5,7 +5,7 @@
// for gopts // for gopts
// also, wx-related // also, wx-related
#include "wxvbam.h" #include "wx/wxvbam.h"
// Interface // Interface
#include "core/base/sound_driver.h" #include "core/base/sound_driver.h"

View File

@ -1,4 +1,4 @@
#include "opts.h" #include "wx/opts.h"
#include <algorithm> #include <algorithm>
#include <limits> #include <limits>
@ -10,13 +10,13 @@
#include <wx/log.h> #include <wx/log.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "config/option-observer.h" #include "wx/config/option-observer.h"
#include "config/option-proxy.h" #include "wx/config/option-proxy.h"
#include "config/option.h" #include "wx/config/option.h"
#include "config/user-input.h" #include "wx/config/user-input.h"
#include "strutils.h" #include "wx/strutils.h"
#include "wxhead.h" #include "wx/wxhead.h"
#include "wxvbam.h" #include "wx/wxvbam.h"
/* /*
disableSfx(F) -> cpuDisableSfx disableSfx(F) -> cpuDisableSfx

View File

@ -1,15 +1,15 @@
#ifndef WX_OPTS_H #ifndef VBAM_WX_OPTS_H_
#define WX_OPTS_H #define VBAM_WX_OPTS_H_
#include <map> #include <map>
#include <wx/string.h> #include <wx/string.h>
#include <wx/vidmode.h> #include <wx/vidmode.h>
#include "config/game-control.h" #include "wx/config/game-control.h"
#include "config/shortcuts.h" #include "wx/config/shortcuts.h"
#include "config/user-input.h" #include "wx/config/user-input.h"
#include "wxhead.h" #include "wx/wxhead.h"
// Forward declaration. // Forward declaration.
class wxFileHistory; class wxFileHistory;
@ -95,4 +95,4 @@ void update_shortcut_opts();
// returns true if option name correct; prints error if val invalid // returns true if option name correct; prints error if val invalid
void opt_set(const wxString& name, const wxString& val); void opt_set(const wxString& name, const wxString& val);
#endif /* WX_OPTS_H */ #endif // VBAM_WX_OPTS_H_

View File

@ -25,10 +25,6 @@
#include "background-input.h" #include "background-input.h"
#include "components/draw_text/draw_text.h" #include "components/draw_text/draw_text.h"
#include "components/filters/filters.h" #include "components/filters/filters.h"
#include "config/game-control.h"
#include "config/option-proxy.h"
#include "config/option.h"
#include "config/user-input.h"
#include "core/base/file_util.h" #include "core/base/file_util.h"
#include "core/base/patch.h" #include "core/base/patch.h"
#include "core/base/version.h" #include "core/base/version.h"
@ -43,11 +39,15 @@
#include "core/gba/gbaPrint.h" #include "core/gba/gbaPrint.h"
#include "core/gba/gbaRtc.h" #include "core/gba/gbaRtc.h"
#include "core/gba/gbaSound.h" #include "core/gba/gbaSound.h"
#include "drawing.h" #include "wx/config/game-control.h"
#include "wayland.h" #include "wx/config/option-proxy.h"
#include "widgets/render-plugin.h" #include "wx/config/option.h"
#include "wxutil.h" #include "wx/config/user-input.h"
#include "wxvbam.h" #include "wx/drawing.h"
#include "wx/wayland.h"
#include "wx/widgets/render-plugin.h"
#include "wx/wxutil.h"
#include "wx/wxvbam.h"
#ifdef __WXMSW__ #ifdef __WXMSW__
#include <windows.h> #include <windows.h>

View File

@ -1,4 +1,5 @@
#pragma once #ifndef VBAM_WX_RPI_H_
#define VBAM_WX_RPI_H_
//--------------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------------
// hq2x plugin example - Steve Snake 2004. // hq2x plugin example - Steve Snake 2004.
@ -13,6 +14,8 @@
#define HMODULE void* #define HMODULE void*
#endif #endif
#include <cstdint>
//--------------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------------
typedef struct { typedef struct {
unsigned long Size; unsigned long Size;
@ -73,3 +76,5 @@ bool rpiInit(const char* sPluginName);
void rpiFilter(uint8_t* srcPtr, uint32_t srcPitch, uint8_t* deltaPtr, uint8_t* dstPtr, uint32_t dstPitch, int width, void rpiFilter(uint8_t* srcPtr, uint32_t srcPitch, uint8_t* deltaPtr, uint8_t* dstPtr, uint32_t dstPitch, int width,
int height); int height);
void rpiCleanup(); void rpiCleanup();
#endif // VBAM_WX_RPI_H_

View File

@ -1,4 +1,4 @@
#include "strutils.h" #include "wx/strutils.h"
#include <wx/tokenzr.h> #include <wx/tokenzr.h>

View File

@ -1,5 +1,5 @@
#ifndef STRUTILS_H #ifndef VBAM_WX_STRUTILS_H_
#define STRUTILS_H #define VBAM_WX_STRUTILS_H_
#include <wx/string.h> #include <wx/string.h>
#include <wx/arrstr.h> #include <wx/arrstr.h>
@ -16,4 +16,4 @@ wxArrayString split_with_sep(const wxString& text, const wxString& sep);
} // namespace strutils } // namespace strutils
#endif #endif // VBAM_WX_STRUTILS_H_

View File

@ -7,13 +7,13 @@
#include <SDL.h> #include <SDL.h>
#include "components/audio_sdl/audio_sdl.h" #include "components/audio_sdl/audio_sdl.h"
#include "config/game-control.h"
#include "config/option-proxy.h"
#include "core/base/image_util.h" #include "core/base/image_util.h"
#include "core/gb/gbGlobals.h" #include "core/gb/gbGlobals.h"
#include "core/gba/gbaGlobals.h" #include "core/gba/gbaGlobals.h"
#include "core/gba/gbaSound.h" #include "core/gba/gbaSound.h"
#include "wxvbam.h" #include "wx/config/game-control.h"
#include "wx/config/option-proxy.h"
#include "wx/wxvbam.h"
// These should probably be in vbamcore // These should probably be in vbamcore
int systemVerbose; int systemVerbose;

View File

@ -15,6 +15,12 @@ function(add_doctest_test test_src)
target_include_directories("${test_name}" target_include_directories("${test_name}"
PRIVATE ${wxWidgets_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/third_party/include) PRIVATE ${wxWidgets_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/third_party/include)
target_compile_options("${test_name}" PRIVATE ${wxWidgets_CXX_FLAGS})
target_compile_definitions("${test_name}" PRIVATE ${wxWidgets_DEFINITIONS})
if(CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$")
target_compile_definitions("${test_name}" PRIVATE ${wxWidgets_DEFINITIONS_DEBUG})
endif()
set_target_properties("${test_name}" set_target_properties("${test_name}"
PROPERTIES PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"

View File

@ -1,4 +1,4 @@
#include "strutils.h" #include "wx/strutils.h"
#include "tests.hpp" #include "tests.hpp"

View File

@ -7,14 +7,14 @@
#include <wx/ffile.h> #include <wx/ffile.h>
#include <wx/vlbox.h> #include <wx/vlbox.h>
#include "config/option-proxy.h"
#include "core/gb/gb.h" #include "core/gb/gb.h"
#include "core/gb/gbDis.h" #include "core/gb/gbDis.h"
#include "core/gb/gbGlobals.h" #include "core/gb/gbGlobals.h"
#include "core/gba/gbaCpu.h" #include "core/gba/gbaCpu.h"
#include "core/gba/gbaCpuArmDis.h" #include "core/gba/gbaCpuArmDis.h"
#include "viewsupt.h" #include "wx/config/option-proxy.h"
#include "wxvbam.h" #include "wx/viewsupt.h"
#include "wx/wxvbam.h"
// avoid exporting classes // avoid exporting classes
namespace Viewers { namespace Viewers {

View File

@ -1,8 +1,8 @@
#include "viewsupt.h" #include "wx/viewsupt.h"
#include "config/option-proxy.h" #include "wx/config/option-proxy.h"
#include "wxvbam.h" #include "wx/wxutil.h"
#include "wxutil.h" #include "wx/wxvbam.h"
namespace Viewers { namespace Viewers {
void Viewer::CloseDlg(wxCloseEvent& ev) void Viewer::CloseDlg(wxCloseEvent& ev)

View File

@ -1,5 +1,5 @@
#ifndef WX_VIEWSUPT_H #ifndef VBAM_WX_VIEWSUPT_H_
#define WX_VIEWSUPT_H #define VBAM_WX_VIEWSUPT_H_
#include <wx/wx.h> #include <wx/wx.h>
#include <wx/window.h> #include <wx/window.h>
@ -421,4 +421,4 @@ public:
// standard widgets in graphical viewers // standard widgets in graphical viewers
} }
#endif /* WX_VIEWSUPT_H */ #endif // VBAM_WX_VIEWSUPT_H_

View File

@ -1,4 +1,4 @@
#include "wayland.h" #include "wx/wayland.h"
#ifdef HAVE_WAYLAND_SUPPORT #ifdef HAVE_WAYLAND_SUPPORT

View File

@ -1,5 +1,5 @@
#ifndef VBAM_WAYLAND_H #ifndef VBAM_WX_WAYLAND_H_
#define VBAM_WAYLAND_H #define VBAM_WX_WAYLAND_H_
#include <wx/config.h> #include <wx/config.h>
@ -48,4 +48,4 @@ inline void MoveWaylandSubsurface([[maybe_unused]] wxGLCanvas* win) {};
#endif // gtk #endif // gtk
#endif // VBAM_WAYLAND_H #endif // VBAM_WX_WAYLAND_H_

View File

@ -9,6 +9,8 @@
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/widgets/checkedlistctrl.h"
#include <wx/wx.h> #include <wx/wx.h>
#ifdef __BORLANDC__ #ifdef __BORLANDC__
@ -16,7 +18,6 @@
#endif #endif
// includes // includes
#include "wx/checkedlistctrl.h"
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/settings.h> #include <wx/settings.h>

View File

@ -9,11 +9,11 @@
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKEDLISTCTRL_H_ #ifndef VBAM_WX_WIDGETS_CHECKEDLISTCTRL_H_
#define _WX_CHECKEDLISTCTRL_H_ #define VBAM_WX_WIDGETS_CHECKEDLISTCTRL_H_
// wxWidgets headers // wxWidgets headers
#include "wx/webupdatedef.h" // for the WXDLLIMPEXP_WEBUPDATE macro #include "wx/widgets/webupdatedef.h" // for the WXDLLIMPEXP_WEBUPDATE macro
#include <wx/imaglist.h> #include <wx/imaglist.h>
#include <wx/listctrl.h> #include <wx/listctrl.h>
@ -179,4 +179,4 @@ private:
#endif // wxUSE_CHECKEDLISTCTRL #endif // wxUSE_CHECKEDLISTCTRL
#endif // _WX_CHECKEDLISTCTRL_H_ #endif // VBAM_WX_WIDGETS_CHECKEDLISTCTRL_H_

View File

@ -1,4 +1,4 @@
#include "widgets/dpi-support.h" #include "wx/widgets/dpi-support.h"
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>

View File

@ -1,4 +1,4 @@
#include "widgets/dpi-support.h" #include "wx/widgets/dpi-support.h"
#include <wx/window.h> #include <wx/window.h>

View File

@ -1,4 +1,4 @@
#include "widgets/group-check-box.h" #include "wx/widgets/group-check-box.h"
namespace widgets { namespace widgets {

View File

@ -1,9 +1,8 @@
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
#include <wx/toplevel.h> #include <wx/toplevel.h>
#include "config/option-proxy.h" #include "wx/config/option.h"
#include "config/option.h"
namespace widgets { namespace widgets {

View File

@ -3,7 +3,7 @@
#include <wx/event.h> #include <wx/event.h>
#include "config/option-observer.h" #include "wx/config/option-observer.h"
// Forward declarations. // Forward declarations.
class wxTopLevelWindow; class wxTopLevelWindow;

View File

@ -1,4 +1,4 @@
#include "widgets/option-validator.h" #include "wx/widgets/option-validator.h"
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/choice.h> #include <wx/choice.h>

View File

@ -3,7 +3,7 @@
#include <wx/validate.h> #include <wx/validate.h>
#include "config/option.h" #include "wx/config/option.h"
#if wxCHECK_VERSION(3, 1, 1) #if wxCHECK_VERSION(3, 1, 1)
#define WX_HAS_VALIDATOR_SET_WINDOW_OVERRIDE 1 #define WX_HAS_VALIDATOR_SET_WINDOW_OVERRIDE 1

View File

@ -1,4 +1,4 @@
#include "widgets/render-plugin.h" #include "wx/widgets/render-plugin.h"
namespace widgets { namespace widgets {

View File

@ -1,11 +1,10 @@
#ifndef VBAM_WX_WIDGETS_RENDER_PLUGIN_H_ #ifndef VBAM_WX_WIDGETS_RENDER_PLUGIN_H_
#define VBAM_WX_WIDGETS_RENDER_PLUGIN_H_ #define VBAM_WX_WIDGETS_RENDER_PLUGIN_H_
#include <cstdint>
#include <wx/dynlib.h> #include <wx/dynlib.h>
#include <wx/string.h> #include <wx/string.h>
#include "rpi.h" #include "wx/rpi.h"
namespace widgets { namespace widgets {

View File

@ -1,10 +1,9 @@
#include "wx/sdljoy.h" #include "wx/widgets/sdljoy.h"
#include <algorithm>
#include <wx/timer.h> #include <wx/timer.h>
#include <SDL.h> #include <SDL.h>
#include "../wxvbam.h" #include "wx/wxvbam.h"
namespace { namespace {

View File

@ -1,12 +1,13 @@
#ifndef _WX_SDLJOY_H #ifndef VBAM_WX_WIDGETS_SDLJOY_H_
#define _WX_SDLJOY_H #define VBAM_WX_WIDGETS_SDLJOY_H_
#include <memory> #include <memory>
#include <set> #include <set>
#include <map>
#include <unordered_map> #include <unordered_map>
#include <wx/time.h> #include <wx/time.h>
#include <wx/event.h> #include <wx/event.h>
#include <SDL_joystick.h> #include <SDL_joystick.h>
#include <SDL_gamecontroller.h> #include <SDL_gamecontroller.h>
#include <SDL_events.h> #include <SDL_events.h>
@ -152,4 +153,4 @@ private:
wxLongLong last_poll_ = wxGetUTCTimeMillis(); wxLongLong last_poll_ = wxGetUTCTimeMillis();
}; };
#endif /* _WX_SDLJOY_H */ #endif // VBAM_WX_WIDGETS_SDLJOY_H_

View File

@ -1,8 +1,7 @@
#include "widgets/user-input-ctrl.h" #include "wx/widgets/user-input-ctrl.h"
#include "config/user-input.h" #include "wx/config/user-input.h"
#include "wx/opts.h"
#include "opts.h"
namespace widgets { namespace widgets {

View File

@ -8,9 +8,9 @@
#include <wx/validate.h> #include <wx/validate.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include "config/game-control.h" #include "wx/config/game-control.h"
#include "config/user-input.h" #include "wx/config/user-input.h"
#include "widgets/wx/sdljoy.h" #include "wx/widgets/sdljoy.h"
namespace widgets { namespace widgets {

View File

@ -4,10 +4,11 @@
#include <string> #include <string>
#include <algorithm> #include <algorithm>
#include "wx/wxmisc.h"
#include <wx/wx.h> #include <wx/wx.h>
#include <wx/spinctrl.h> #include <wx/spinctrl.h>
#include "wx/widgets/wxmisc.h"
bool wxBoolIntValidator::TransferToWindow() bool wxBoolIntValidator::TransferToWindow()
{ {
if (!vptr) if (!vptr)

View File

@ -1,5 +1,5 @@
#ifndef WX_MISC_H #ifndef VBAM_WX_WIDGETS_WX_MISC_H_
#define WX_MISC_H #define VBAM_WX_WIDGETS_WX_MISC_H_
// utility widgets // utility widgets
#include <cstdint> #include <cstdint>
@ -250,4 +250,4 @@ public:
// for wxTextValidator include lists // for wxTextValidator include lists
extern const wxArrayString val_hexdigits, val_sigdigits, val_unsdigits; extern const wxArrayString val_hexdigits, val_sigdigits, val_unsdigits;
#endif /* WX_MISC_H */ #endif // VBAM_WX_WIDGETS_WX_MISC_H_

View File

@ -1,5 +1,5 @@
#ifndef WX_WXHEAD_H #ifndef VBAM_WX_WXHEAD_H_
#define WX_WXHEAD_H #define VBAM_WX_WXHEAD_H_
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
@ -57,7 +57,7 @@ using std::int32_t;
// GetAccel is inefficent anyway (often I don't want to convert to wxAccEnt) // GetAccel is inefficent anyway (often I don't want to convert to wxAccEnt)
// This is a working replacement for SetAccel, at least. // This is a working replacement for SetAccel, at least.
#include "wxutil.h" #include "wx/wxutil.h"
// This enum must be kept in sync with the one in vbam-options-static.cpp. // This enum must be kept in sync with the one in vbam-options-static.cpp.
// TODO: These 2 enums should be unified and a validator created for this enum. // TODO: These 2 enums should be unified and a validator created for this enum.
@ -93,4 +93,4 @@ static inline const wxCharBuffer UTF8(wxString str)
return str.mb_str(wxConvUTF8); return str.mb_str(wxConvUTF8);
} }
#endif /* WX_WXHEAD_H */ #endif // VBAM_WX_WXHEAD_H_

View File

@ -1,5 +1,5 @@
#ifndef WXLOGDEBUG_H_ #ifndef VBAM_WX_WXLOGDEBUG_H_
#define WXLOGDEBUG_H_ #define VBAM_WX_WXLOGDEBUG_H_
#include <wx/log.h> #include <wx/log.h>
@ -20,4 +20,4 @@
} while(0) } while(0)
#endif #endif
#endif /* WXLOGDEBUG_H_ */ #endif // VBAM_WX_WXLOGDEBUG_H_

View File

@ -1,4 +1,4 @@
#include "wxutil.h" #include "wx/wxutil.h"
int getKeyboardKeyCode(const wxKeyEvent& event) { int getKeyboardKeyCode(const wxKeyEvent& event) {
int uc = event.GetUnicodeKey(); int uc = event.GetUnicodeKey();

View File

@ -1,8 +1,8 @@
#ifndef _WX_UTIL_H #ifndef VBAM_WX_UTIL_H_
#define _WX_UTIL_H #define VBAM_WX_UTIL_H_
#include <wx/event.h> #include <wx/event.h>
int getKeyboardKeyCode(const wxKeyEvent& event); int getKeyboardKeyCode(const wxKeyEvent& event);
#endif #endif // VBAM_WX_UTIL_H_

View File

@ -3,7 +3,7 @@
// load xrc file (guiinit.cpp does most of instantiation) // load xrc file (guiinit.cpp does most of instantiation)
// create & display main frame // create & display main frame
#include "wxvbam.h" #include "wx/wxvbam.h"
#ifdef __WXMSW__ #ifdef __WXMSW__
#include <windows.h> #include <windows.h>
@ -39,18 +39,18 @@
#endif // defined(VBAM_ENABLE_DEBUGGER) #endif // defined(VBAM_ENABLE_DEBUGGER)
// The built-in xrc file // The built-in xrc file
#include "builtin-xrc.h" #include "wx/builtin-xrc.h"
// The built-in vba-over.ini // The built-in vba-over.ini
#include "builtin-over.h" #include "wx/builtin-over.h"
#include "config/game-control.h" #include "wx/config/game-control.h"
#include "config/option-proxy.h" #include "wx/config/option-proxy.h"
#include "config/option.h" #include "wx/config/option.h"
#include "config/user-input.h" #include "wx/config/user-input.h"
#include "strutils.h" #include "wx/strutils.h"
#include "wayland.h" #include "wx/wayland.h"
#include "widgets/group-check-box.h" #include "wx/widgets/group-check-box.h"
#include "widgets/user-input-ctrl.h" #include "wx/widgets/user-input-ctrl.h"
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gdk/gdk.h> #include <gdk/gdk.h>
@ -878,7 +878,7 @@ void MainFrame::OnStatusBarChanged() {
} }
BEGIN_EVENT_TABLE(MainFrame, wxFrame) BEGIN_EVENT_TABLE(MainFrame, wxFrame)
#include "cmd-evtable.h" #include "wx/cmd-evtable.h"
EVT_CONTEXT_MENU(MainFrame::OnMenu) EVT_CONTEXT_MENU(MainFrame::OnMenu)
// this is the main window focus? Or EVT_SET_FOCUS/EVT_KILL_FOCUS? // this is the main window focus? Or EVT_SET_FOCUS/EVT_KILL_FOCUS?
EVT_ACTIVATE(MainFrame::OnActivate) EVT_ACTIVATE(MainFrame::OnActivate)

View File

@ -1,5 +1,5 @@
#ifndef WX_WXVBAM_H #ifndef VBAM_WX_WXVBAM_H_
#define WX_WXVBAM_H #define VBAM_WX_WXVBAM_H_
#include <list> #include <list>
#include <stdexcept> #include <stdexcept>
@ -12,12 +12,12 @@
#include <wx/datetime.h> #include <wx/datetime.h>
#include "core/base/system.h" #include "core/base/system.h"
#include "config/option-observer.h" #include "wx/config/option-observer.h"
#include "widgets/dpi-support.h" #include "wx/widgets/dpi-support.h"
#include "widgets/keep-on-top-styler.h" #include "wx/widgets/keep-on-top-styler.h"
#include "wx/sdljoy.h" #include "wx/widgets/sdljoy.h"
#include "wx/wxmisc.h" #include "wx/widgets/wxmisc.h"
#include "wxhead.h" #include "wx/wxhead.h"
#ifndef NO_LINK #ifndef NO_LINK
#include "core/gba/gbaLink.h" #include "core/gba/gbaLink.h"
@ -27,8 +27,8 @@
#include "components/av_recording/av_recording.h" #include "components/av_recording/av_recording.h"
#endif #endif
#include "wxlogdebug.h" #include "wx/wxlogdebug.h"
#include "wxutil.h" #include "wx/wxutil.h"
template <typename T> template <typename T>
void CheckPointer(T pointer) void CheckPointer(T pointer)
@ -385,7 +385,7 @@ private:
// Load a named wxDialog from the XRC file // Load a named wxDialog from the XRC file
wxDialog* LoadXRCropertySheetDialog(const char* name); wxDialog* LoadXRCropertySheetDialog(const char* name);
#include "cmdhandlers.h" #include "wx/cmdhandlers.h"
}; };
// a class for polling joystick keys // a class for polling joystick keys
@ -644,7 +644,7 @@ cmditem new_cmditem(const wxString cmd = wxT(""), const wxString name = wxT(""),
// for binary search // for binary search
extern bool cmditem_lt(const struct cmditem& cmd1, const struct cmditem& cmd2); extern bool cmditem_lt(const struct cmditem& cmd1, const struct cmditem& cmd2);
#include "rpi.h" #include "wx/rpi.h"
#include <wx/dynlib.h> #include <wx/dynlib.h>
class FilterThread; class FilterThread;
@ -698,7 +698,7 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
#include "opts.h" #include "wx/opts.h"
// I should add this to SoundDriver, but wxArrayString is wx-specific // I should add this to SoundDriver, but wxArrayString is wx-specific
// I suppose I could make subclass wxSoundDriver. maybe later. // I suppose I could make subclass wxSoundDriver. maybe later.
@ -797,4 +797,4 @@ extern int autofire, autohold;
#define KEYM_MOTION_IN (1 << 19) #define KEYM_MOTION_IN (1 << 19)
#define KEYM_MOTION_OUT (1 << 20) #define KEYM_MOTION_OUT (1 << 20)
#endif /* WX_WXVBAM_H */ #endif // VBAM_WX_WXVBAM_H_

View File

@ -3,7 +3,7 @@
AAAAA_MAINICON ICON "icons/visualboyadvance-m.ico" AAAAA_MAINICON ICON "icons/visualboyadvance-m.ico"
#define wxUSE_NO_MANIFEST 1 #define wxUSE_NO_MANIFEST 1
#include "wx/msw/wx.rc" #include <wx/msw/wx.rc>
#include "core/base/version_gen.h" #include "core/base/version_gen.h"

View File

@ -1,7 +1,7 @@
#ifndef NO_XAUDIO2 #ifndef NO_XAUDIO2
// Application // Application
#include "wxvbam.h" #include "wx/wxvbam.h"
#include <stdio.h> #include <stdio.h>
// Interface // Interface