ソースを参照

testbed: app -> application

Michele Caini 11 ヶ月 前
コミット
8c04222a40

+ 1 - 0
testbed/CMakeLists.txt

@@ -48,6 +48,7 @@ target_sources(
 	PRIVATE
 		testbed.cpp
         app/context.cpp
+        application/context.cpp
         ${imgui_SOURCE_DIR}/imgui.cpp
         ${imgui_SOURCE_DIR}/imgui_demo.cpp
         ${imgui_SOURCE_DIR}/imgui_draw.cpp

+ 2 - 10
testbed/app/context.cpp → testbed/application/context.cpp

@@ -1,21 +1,13 @@
 #include <SDL3/SDL_render.h>
-#include <app/context.h>
+#include <application/context.h>
 #include <backends/imgui_impl_sdl3.h>
 #include <backends/imgui_impl_sdlrenderer3.h>
 #include <imgui.h>
 
 namespace testbed {
 
-namespace internal {
-
-static constexpr const char *window_default_title = "testbed";
-static constexpr int window_default_width = 1280;
-static constexpr int window_default_height = 720;
-
-} // namespace internal
-
 context::context()
-    : sdl_window{SDL_CreateWindow(internal::window_default_title, internal::window_default_width, internal::window_default_height, SDL_WINDOW_HIGH_PIXEL_DENSITY)},
+    : sdl_window{SDL_CreateWindow("testbed", 1280, 720, SDL_WINDOW_HIGH_PIXEL_DENSITY)},
       sdl_renderer{SDL_CreateRenderer(sdl_window, nullptr)} {
     SDL_SetRenderVSync(sdl_renderer, SDL_RENDERER_VSYNC_ADAPTIVE);
 

+ 0 - 0
testbed/app/context.h → testbed/application/context.h


+ 1 - 1
testbed/testbed.cpp

@@ -1,4 +1,4 @@
-#include <app/context.h>
+#include <application/context.h>
 
 int main() {
     testbed::context ctx{};