Skip to content

Commit

Permalink
Use SDL_Window as the WindowHandle in Linux and Android. (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioSamo authored Dec 24, 2024
1 parent 576fed6 commit 1361c48
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions ultramodern/include/ultramodern/renderer_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "ultra64.h"
#include "config.hpp"

struct SDL_Window;

namespace ultramodern {
namespace renderer {

Expand All @@ -33,14 +35,9 @@ namespace ultramodern {
DWORD thread_id = (DWORD)-1;
auto operator<=>(const WindowHandle&) const = default;
};
#elif defined(__ANDROID__)
using WindowHandle = ANativeWindow*;
#elif defined(__linux__)
struct WindowHandle {
Display* display;
Window window;
auto operator<=>(const WindowHandle&) const = default;
};
// TODO add a native window handle option here (Display/Window for x11 and ANativeWindow for Android) as a compile-time option.
#elif defined(__linux__) || defined(__ANDROID__)
using WindowHandle = SDL_Window*;
#elif defined(__APPLE__)
struct WindowHandle {
void* window;
Expand Down

0 comments on commit 1361c48

Please sign in to comment.