diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c34f596..84093f6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,6 +169,7 @@ set(REDREAM_SOURCES src/core/rb_tree.c src/core/sort.c src/core/string.c + src/host/keycode.c src/hw/aica/aica.c src/hw/arm7/arm7.c src/hw/gdrom/cdi.c @@ -223,7 +224,6 @@ set(REDREAM_SOURCES src/sys/filesystem.c src/sys/memory.c src/emulator.c - src/keycode.c src/tracer.c ) @@ -300,7 +300,7 @@ target_compile_options(relib PRIVATE ${REDREAM_FLAGS}) if(BUILD_LIBRETRO) -add_library(redream_libretro SHARED $ src/retro_host.c) +add_library(redream_libretro SHARED $ src/host/retro_host.c) set_target_properties(redream_libretro PROPERTIES PREFIX "") set_target_properties(redream_libretro PROPERTIES POSITION_INDEPENDENT_CODE TRUE) target_include_directories(redream_libretro SYSTEM PUBLIC ${REDREAM_INCLUDE_DIRS} deps/libretro/include) @@ -325,7 +325,7 @@ endif() # redream #-------------------------------------------------- -add_executable(redream $ src/sdl_host.c) +add_executable(redream $ src/host/sdl_host.c) target_include_directories(redream SYSTEM PUBLIC ${REDREAM_INCLUDE_DIRS}) target_include_directories(redream PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) target_link_libraries(redream ${REDREAM_LIBS} SDL2main SDL2-static) @@ -339,7 +339,7 @@ target_compile_options(redream PRIVATE ${REDREAM_FLAGS}) if(BUILD_TOOLS) if(ARCH_X64) -add_executable(recc $ src/null_host.c tools/recc/main.c) +add_executable(recc $ src/host/null_host.c tools/recc/main.c) target_include_directories(recc SYSTEM PUBLIC ${REDREAM_INCLUDE_DIRS}) target_include_directories(recc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) target_link_libraries(recc ${REDREAM_LIBS}) @@ -348,7 +348,7 @@ target_compile_options(recc PRIVATE ${REDREAM_FLAGS}) endif() add_executable(retrace $ - src/null_host.c + src/host/null_host.c tools/retrace/depth.c tools/retrace/main.c) target_include_directories(retrace SYSTEM PUBLIC ${REDREAM_INCLUDE_DIRS}) @@ -466,7 +466,7 @@ endif() # build test binary set(RETEST_SOURCES - src/null_host.c + src/host/null_host.c test/test_dead_code_elimination.c test/test_interval_tree.c test/test_list.c diff --git a/src/emulator.c b/src/emulator.c index 7f22decb..cc3eb02a 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -14,7 +14,7 @@ #include "emulator.h" #include "core/option.h" #include "core/profiler.h" -#include "host.h" +#include "host/host.h" #include "hw/aica/aica.h" #include "hw/arm7/arm7.h" #include "hw/dreamcast.h" diff --git a/src/host.h b/src/host/host.h similarity index 100% rename from src/host.h rename to src/host/host.h diff --git a/src/keycode.c b/src/host/keycode.c similarity index 100% rename from src/keycode.c rename to src/host/keycode.c diff --git a/src/keycode.h b/src/host/keycode.h similarity index 100% rename from src/keycode.h rename to src/host/keycode.h diff --git a/src/null_host.c b/src/host/null_host.c similarity index 96% rename from src/null_host.c rename to src/host/null_host.c index a31edbcb..d3e3ab16 100644 --- a/src/null_host.c +++ b/src/host/null_host.c @@ -1,5 +1,5 @@ #include -#include "host.h" +#include "host/host.h" /* * audio diff --git a/src/retro_host.c b/src/host/retro_host.c similarity index 99% rename from src/retro_host.c rename to src/host/retro_host.c index db95dfa1..457226a6 100644 --- a/src/retro_host.c +++ b/src/host/retro_host.c @@ -5,7 +5,7 @@ #include "core/assert.h" #include "core/profiler.h" #include "emulator.h" -#include "host.h" +#include "host/host.h" #include "sys/filesystem.h" #define AUDIO_FREQ 44100 diff --git a/src/sdl_host.c b/src/host/sdl_host.c similarity index 99% rename from src/sdl_host.c rename to src/host/sdl_host.c index e760430d..67b72fe4 100644 --- a/src/sdl_host.c +++ b/src/host/sdl_host.c @@ -7,7 +7,7 @@ #include "core/profiler.h" #include "core/ringbuf.h" #include "emulator.h" -#include "host.h" +#include "host/host.h" #include "sys/filesystem.h" #include "tracer.h" diff --git a/src/hw/dreamcast.h b/src/hw/dreamcast.h index c1e96e6f..ba988111 100644 --- a/src/hw/dreamcast.h +++ b/src/hw/dreamcast.h @@ -4,8 +4,8 @@ #include #include #include "core/list.h" +#include "host/keycode.h" #include "hw/memory.h" -#include "keycode.h" struct aica; struct arm7; diff --git a/src/render/gl_backend.c b/src/render/gl_backend.c index 9c73f7d5..c940980f 100644 --- a/src/render/gl_backend.c +++ b/src/render/gl_backend.c @@ -2,7 +2,7 @@ #include "core/assert.h" #include "core/profiler.h" #include "core/string.h" -#include "host.h" +#include "host/host.h" #include "render/render_backend.h" #define MAX_FRAMEBUFFERS 8 diff --git a/src/render/imgui.cc b/src/render/imgui.cc index c37a45eb..0f60444d 100644 --- a/src/render/imgui.cc +++ b/src/render/imgui.cc @@ -2,7 +2,7 @@ extern "C" { #include "core/assert.h" -#include "keycode.h" +#include "host/keycode.h" #include "render/render_backend.h" } diff --git a/src/render/imgui.h b/src/render/imgui.h index 5a03cfda..c34e87ba 100644 --- a/src/render/imgui.h +++ b/src/render/imgui.h @@ -3,7 +3,7 @@ #define CIMGUI_DEFINE_ENUMS_AND_STRUCTS #include -#include "keycode.h" +#include "host/keycode.h" struct imgui; struct render_backend; diff --git a/src/render/microprofile.cc b/src/render/microprofile.cc index 6b68d210..336568cc 100644 --- a/src/render/microprofile.cc +++ b/src/render/microprofile.cc @@ -12,7 +12,6 @@ extern "C" { #include "core/assert.h" #include "core/math.h" -#include "keycode.h" #include "render/microprofile.h" #include "render/render_backend.h" } diff --git a/src/render/microprofile.h b/src/render/microprofile.h index 2f4677f3..d969a701 100644 --- a/src/render/microprofile.h +++ b/src/render/microprofile.h @@ -1,6 +1,8 @@ #ifndef MICROPROFILE_IMPL_H #define MICROPROFILE_IMPL_H +#include "host/keycode.h" + struct microprofile; struct render_backend; diff --git a/src/tracer.c b/src/tracer.c index ff6130ad..8b635861 100644 --- a/src/tracer.c +++ b/src/tracer.c @@ -1,6 +1,6 @@ #include "tracer.h" #include "core/math.h" -#include "host.h" +#include "host/host.h" #include "hw/pvr/ta.h" #include "hw/pvr/tr.h" #include "hw/pvr/trace.h"