From 9a0712b258538856cf0c4c1842cf4b35d3b8a3b7 Mon Sep 17 00:00:00 2001 From: BearOso Date: Wed, 7 Jun 2023 11:31:24 -0500 Subject: [PATCH] Gtk: Rename frontend-common to common and move files to video subfolder. --- .../video}/fractional-scale-v1.c | 0 .../video}/fractional-scale-v1.h | 0 .../video}/glx_context.cpp | 0 .../video}/glx_context.hpp | 0 .../video}/opengl_context.hpp | 0 .../video}/viewporter-client-protocol.c | 0 .../video}/viewporter-client-protocol.h | 0 .../video}/wayland-idle-inhibit-unstable-v1.c | 0 .../video}/wayland-idle-inhibit-unstable-v1.h | 0 .../video}/wayland_egl_context.cpp | 0 .../video}/wayland_egl_context.hpp | 2 +- .../video}/wayland_surface.cpp | 0 .../video}/wayland_surface.hpp | 0 gtk/CMakeLists.txt | 16 ++++++++-------- gtk/src/gtk_display_driver_opengl.h | 6 +++--- gtk/src/gtk_display_driver_vulkan.cpp | 2 +- gtk/src/gtk_display_driver_vulkan.h | 10 +++++----- 17 files changed, 18 insertions(+), 18 deletions(-) rename {frontend-common => common/video}/fractional-scale-v1.c (100%) rename {frontend-common => common/video}/fractional-scale-v1.h (100%) rename {frontend-common => common/video}/glx_context.cpp (100%) rename {frontend-common => common/video}/glx_context.hpp (100%) rename {frontend-common => common/video}/opengl_context.hpp (100%) rename {frontend-common => common/video}/viewporter-client-protocol.c (100%) rename {frontend-common => common/video}/viewporter-client-protocol.h (100%) rename {frontend-common => common/video}/wayland-idle-inhibit-unstable-v1.c (100%) rename {frontend-common => common/video}/wayland-idle-inhibit-unstable-v1.h (100%) rename {frontend-common => common/video}/wayland_egl_context.cpp (100%) rename {frontend-common => common/video}/wayland_egl_context.hpp (96%) rename {frontend-common => common/video}/wayland_surface.cpp (100%) rename {frontend-common => common/video}/wayland_surface.hpp (100%) diff --git a/frontend-common/fractional-scale-v1.c b/common/video/fractional-scale-v1.c similarity index 100% rename from frontend-common/fractional-scale-v1.c rename to common/video/fractional-scale-v1.c diff --git a/frontend-common/fractional-scale-v1.h b/common/video/fractional-scale-v1.h similarity index 100% rename from frontend-common/fractional-scale-v1.h rename to common/video/fractional-scale-v1.h diff --git a/frontend-common/glx_context.cpp b/common/video/glx_context.cpp similarity index 100% rename from frontend-common/glx_context.cpp rename to common/video/glx_context.cpp diff --git a/frontend-common/glx_context.hpp b/common/video/glx_context.hpp similarity index 100% rename from frontend-common/glx_context.hpp rename to common/video/glx_context.hpp diff --git a/frontend-common/opengl_context.hpp b/common/video/opengl_context.hpp similarity index 100% rename from frontend-common/opengl_context.hpp rename to common/video/opengl_context.hpp diff --git a/frontend-common/viewporter-client-protocol.c b/common/video/viewporter-client-protocol.c similarity index 100% rename from frontend-common/viewporter-client-protocol.c rename to common/video/viewporter-client-protocol.c diff --git a/frontend-common/viewporter-client-protocol.h b/common/video/viewporter-client-protocol.h similarity index 100% rename from frontend-common/viewporter-client-protocol.h rename to common/video/viewporter-client-protocol.h diff --git a/frontend-common/wayland-idle-inhibit-unstable-v1.c b/common/video/wayland-idle-inhibit-unstable-v1.c similarity index 100% rename from frontend-common/wayland-idle-inhibit-unstable-v1.c rename to common/video/wayland-idle-inhibit-unstable-v1.c diff --git a/frontend-common/wayland-idle-inhibit-unstable-v1.h b/common/video/wayland-idle-inhibit-unstable-v1.h similarity index 100% rename from frontend-common/wayland-idle-inhibit-unstable-v1.h rename to common/video/wayland-idle-inhibit-unstable-v1.h diff --git a/frontend-common/wayland_egl_context.cpp b/common/video/wayland_egl_context.cpp similarity index 100% rename from frontend-common/wayland_egl_context.cpp rename to common/video/wayland_egl_context.cpp diff --git a/frontend-common/wayland_egl_context.hpp b/common/video/wayland_egl_context.hpp similarity index 96% rename from frontend-common/wayland_egl_context.hpp rename to common/video/wayland_egl_context.hpp index be91bba5..14cc9c6c 100644 --- a/frontend-common/wayland_egl_context.hpp +++ b/common/video/wayland_egl_context.hpp @@ -10,7 +10,7 @@ #include "opengl_context.hpp" #include "wayland_surface.hpp" -#include "../external/glad/include/glad/egl.h" +#include "glad/egl.h" #include #include diff --git a/frontend-common/wayland_surface.cpp b/common/video/wayland_surface.cpp similarity index 100% rename from frontend-common/wayland_surface.cpp rename to common/video/wayland_surface.cpp diff --git a/frontend-common/wayland_surface.hpp b/common/video/wayland_surface.hpp similarity index 100% rename from frontend-common/wayland_surface.hpp rename to common/video/wayland_surface.hpp diff --git a/gtk/CMakeLists.txt b/gtk/CMakeLists.txt index c7491190..fb0906bf 100644 --- a/gtk/CMakeLists.txt +++ b/gtk/CMakeLists.txt @@ -68,7 +68,7 @@ list(APPEND ARGS ${SDL2_CFLAGS} ${GTK_CFLAGS} ${XRANDR_CFLAGS}) list(APPEND LIBS ${X11} ${XEXT} ${DL} ${SDL2_LIBRARIES} ${GTK_LIBRARIES} ${XRANDR_LIBRARIES}) list(APPEND SOURCES src/gtk_display_driver_opengl.cpp - ../frontend-common/glx_context.cpp + ../common/video/glx_context.cpp ../shaders/glsl.cpp ../shaders/shader_helpers.cpp ../vulkan/slang_helpers.cpp @@ -152,13 +152,13 @@ list(APPEND INCLUDES ../external/imgui) if(USE_WAYLAND) pkg_check_modules(WAYLAND REQUIRED wayland-client wayland-egl) list(APPEND DEFINES "USE_WAYLAND") - list(APPEND SOURCES ../frontend-common/wayland_egl_context.cpp - ../frontend-common/wayland_egl_context.hpp - ../frontend-common/wayland_surface.cpp - ../frontend-common/wayland_surface.hpp - ../frontend-common/wayland-idle-inhibit-unstable-v1.c - ../frontend-common/viewporter-client-protocol.c - ../frontend-common/fractional-scale-v1.c) + list(APPEND SOURCES ../common/video/wayland_egl_context.cpp + ../common/video/wayland_egl_context.hpp + ../common/video/wayland_surface.cpp + ../common/video/wayland_surface.hpp + ../common/video/wayland-idle-inhibit-unstable-v1.c + ../common/video/viewporter-client-protocol.c + ../common/video/fractional-scale-v1.c) list(APPEND ARGS ${WAYLAND_CFLAGS}) list(APPEND LIBS ${WAYLAND_LIBRARIES}) endif() diff --git a/gtk/src/gtk_display_driver_opengl.h b/gtk/src/gtk_display_driver_opengl.h index 3374b157..c9f6862f 100644 --- a/gtk/src/gtk_display_driver_opengl.h +++ b/gtk/src/gtk_display_driver_opengl.h @@ -12,14 +12,14 @@ #include -#include "../../frontend-common/opengl_context.hpp" +#include "common/video/opengl_context.hpp" #include "gtk_compat.h" #ifdef GDK_WINDOWING_X11 -#include "../../frontend-common/glx_context.hpp" +#include "common/video/glx_context.hpp" #endif #ifdef GDK_WINDOWING_WAYLAND -#include "../../frontend-common/wayland_egl_context.hpp" +#include "common/video/wayland_egl_context.hpp" #endif #include "shaders/glsl.h" diff --git a/gtk/src/gtk_display_driver_vulkan.cpp b/gtk/src/gtk_display_driver_vulkan.cpp index 7ba7b622..70f4f2c4 100644 --- a/gtk/src/gtk_display_driver_vulkan.cpp +++ b/gtk/src/gtk_display_driver_vulkan.cpp @@ -13,7 +13,7 @@ #include "fmt/format.h" #include "snes9x_imgui.h" -#include "../../external/imgui/imgui_impl_vulkan.h" +#include "external/imgui/imgui_impl_vulkan.h" #ifdef GDK_WINDOWING_WAYLAND static WaylandSurface::Metrics get_metrics(Gtk::DrawingArea &w) diff --git a/gtk/src/gtk_display_driver_vulkan.h b/gtk/src/gtk_display_driver_vulkan.h index 3da9ceb6..fa0e72a6 100644 --- a/gtk/src/gtk_display_driver_vulkan.h +++ b/gtk/src/gtk_display_driver_vulkan.h @@ -7,13 +7,13 @@ #pragma once #include "gtk_s9x.h" #include "gtk_display_driver.h" -#include "../../vulkan/vulkan_context.hpp" -#include "../../vulkan/vulkan_shader_chain.hpp" -#include "../../vulkan/vulkan_simple_output.hpp" -#include "../../vulkan/std_chrono_throttle.hpp" +#include "vulkan/vulkan_context.hpp" +#include "vulkan/vulkan_shader_chain.hpp" +#include "vulkan/vulkan_simple_output.hpp" +#include "vulkan/std_chrono_throttle.hpp" #ifdef VK_USE_PLATFORM_WAYLAND_KHR -#include "../../frontend-common/wayland_surface.hpp" +#include "common/video/wayland_surface.hpp" #endif class S9xVulkanDisplayDriver : public S9xDisplayDriver