Sort common OpenGL and Wayland files into folders.

This commit is contained in:
BearOso 2024-08-10 17:00:40 -05:00
parent 8b1d67397e
commit 5c7847acbb
22 changed files with 30 additions and 24 deletions

View File

@ -8,7 +8,7 @@
#define __WAYLAND_EGL_CONTEXT_H #define __WAYLAND_EGL_CONTEXT_H
#include "opengl_context.hpp" #include "opengl_context.hpp"
#include "wayland_surface.hpp" #include "common/video/wayland/wayland_surface.hpp"
#include "glad/egl.h" #include "glad/egl.h"
#include <memory> #include <memory>

View File

@ -68,7 +68,7 @@ list(APPEND ARGS ${SDL2_CFLAGS} ${GTK_CFLAGS} ${XRANDR_CFLAGS})
list(APPEND LIBS ${X11} ${XEXT} ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES} ${GTK_LIBRARIES} ${XRANDR_LIBRARIES}) list(APPEND LIBS ${X11} ${XEXT} ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES} ${GTK_LIBRARIES} ${XRANDR_LIBRARIES})
list(APPEND SOURCES src/gtk_display_driver_opengl.cpp list(APPEND SOURCES src/gtk_display_driver_opengl.cpp
../common/video/glx_context.cpp ../common/video/opengl/glx_context.cpp
../shaders/glsl.cpp ../shaders/glsl.cpp
../shaders/shader_helpers.cpp ../shaders/shader_helpers.cpp
../vulkan/slang_helpers.cpp ../vulkan/slang_helpers.cpp
@ -154,13 +154,13 @@ list(APPEND INCLUDES ../external/imgui)
if(USE_WAYLAND) if(USE_WAYLAND)
pkg_check_modules(WAYLAND REQUIRED wayland-client wayland-egl) pkg_check_modules(WAYLAND REQUIRED wayland-client wayland-egl)
list(APPEND DEFINES "USE_WAYLAND") list(APPEND DEFINES "USE_WAYLAND")
list(APPEND SOURCES ../common/video/wayland_egl_context.cpp list(APPEND SOURCES ../common/video/opengl/wayland_egl_context.cpp
../common/video/wayland_egl_context.hpp ../common/video/opengl/wayland_egl_context.hpp
../common/video/wayland_surface.cpp ../common/video/wayland/wayland_surface.cpp
../common/video/wayland_surface.hpp ../common/video/wayland/wayland_surface.hpp
../common/video/wayland-idle-inhibit-unstable-v1.c ../common/video/wayland/wayland-idle-inhibit-unstable-v1.c
../common/video/viewporter-client-protocol.c ../common/video/wayland/viewporter-client-protocol.c
../common/video/fractional-scale-v1.c) ../common/video/wayland/fractional-scale-v1.c)
list(APPEND ARGS ${WAYLAND_CFLAGS}) list(APPEND ARGS ${WAYLAND_CFLAGS})
list(APPEND LIBS ${WAYLAND_LIBRARIES}) list(APPEND LIBS ${WAYLAND_LIBRARIES})
endif() endif()

View File

@ -12,14 +12,14 @@
#include <glad/gl.h> #include <glad/gl.h>
#include "common/video/opengl_context.hpp" #include "common/video/opengl/opengl_context.hpp"
#include "gtk_compat.h" #include "gtk_compat.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include "common/video/glx_context.hpp" #include "common/video/opengl/glx_context.hpp"
#endif #endif
#ifdef GDK_WINDOWING_WAYLAND #ifdef GDK_WINDOWING_WAYLAND
#include "common/video/wayland_egl_context.hpp" #include "common/video/opengl/wayland_egl_context.hpp"
#endif #endif
#include "shaders/glsl.h" #include "shaders/glsl.h"

View File

@ -13,7 +13,7 @@
#include "vulkan/std_chrono_throttle.hpp" #include "vulkan/std_chrono_throttle.hpp"
#ifdef VK_USE_PLATFORM_WAYLAND_KHR #ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include "common/video/wayland_surface.hpp" #include "common/video/wayland/wayland_surface.hpp"
#endif #endif
class S9xVulkanDisplayDriver : public S9xDisplayDriver class S9xVulkanDisplayDriver : public S9xDisplayDriver

View File

@ -139,12 +139,18 @@ else()
endif() endif()
list(APPEND PLATFORM_SOURCES list(APPEND PLATFORM_SOURCES
../common/video/glx_context.cpp ../common/video/opengl/glx_context.cpp
../common/video/wayland_egl_context.cpp ../common/video/opengl/glx_context.hpp
../common/video/wayland_surface.cpp ../common/video/opengl/wayland_egl_context.cpp
../common/video/fractional-scale-v1.c ../common/video/opengl/wayland_egl_context.hpp
../common/video/viewporter-client-protocol.c ../common/video/wayland/wayland_surface.cpp
../common/video/wayland-idle-inhibit-unstable-v1.c ../common/video/wayland/wayland_surface.hpp
../common/video/wayland/fractional-scale-v1.c
../common/video/wayland/fractional-scale-v1.h
../common/video/wayland/viewporter-client-protocol.c
../common/video/wayland/viewporter-client-protocol.h
../common/video/wayland/wayland-idle-inhibit-unstable-v1.c
../common/video/wayland/wayland-idle-inhibit-unstable-v1.h
../external/glad/src/glx.c ../external/glad/src/glx.c
../external/glad/src/egl.c) ../external/glad/src/egl.c)
endif() endif()

View File

@ -3,11 +3,11 @@
#include <qpa/qplatformnativeinterface.h> #include <qpa/qplatformnativeinterface.h>
#include <QTimer> #include <QTimer>
#include <QMessageBox> #include <QMessageBox>
#include "common/video/opengl_context.hpp" #include "common/video/opengl/opengl_context.hpp"
#ifndef _WIN32 #ifndef _WIN32
#include "common/video/glx_context.hpp" #include "common/video/opengl/glx_context.hpp"
#include "common/video/wayland_egl_context.hpp" #include "common/video/opengl/wayland_egl_context.hpp"
using namespace QNativeInterface; using namespace QNativeInterface;
#include <X11/Xlib.h> #include <X11/Xlib.h>
#else #else

View File

@ -1,4 +1,4 @@
#include <QtGui/QGuiApplication> #include <QGuiApplication>
#include <qpa/qplatformnativeinterface.h> #include <qpa/qplatformnativeinterface.h>
#include <QTimer> #include <QTimer>
#include <QtEvents> #include <QtEvents>

View File

@ -7,7 +7,7 @@
#include "../../vulkan/vulkan_shader_chain.hpp" #include "../../vulkan/vulkan_shader_chain.hpp"
#ifndef _WIN32 #ifndef _WIN32
#include "common/video/wayland_surface.hpp" #include "common/video/wayland/wayland_surface.hpp"
#endif #endif
class EmuCanvasVulkan : public EmuCanvas class EmuCanvasVulkan : public EmuCanvas