Move gpu/Window.cpp to ui/window.cpp

This commit is contained in:
Hyper
2024-10-17 14:36:02 +01:00
parent 86eac5ad8c
commit 86a80fbc61
5 changed files with 7 additions and 3 deletions
-31
View File
@@ -1,31 +0,0 @@
#include "window.h"
#include <config.h>
#include <kernel/function.h>
#include <SDL_syswm.h>
void Window::Init()
{
auto title = Config::Language == ELanguage_Japanese
? "Sonic World Adventure"
: "SONIC UNLEASHED";
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
s_window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_RESIZABLE);
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
SDL_GetWindowWMInfo(s_window, &info);
s_windowHandle = info.info.win.window;
}
// CApplication::Update
PPC_FUNC_IMPL(__imp__sub_822C1130);
PPC_FUNC(sub_822C1130)
{
SDL_PumpEvents();
SDL_FlushEvents(SDL_FIRSTEVENT, SDL_LASTEVENT);
__imp__sub_822C1130(ctx, base);
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include <SDL.h>
struct Window
{
static inline SDL_Window* s_window;
static inline HWND s_windowHandle;
static void Init();
};
+1 -1
View File
@@ -8,7 +8,7 @@
#include <xxHashMap.h>
#include "video.h"
#include "window.h"
#include "ui/window.h"
namespace RT64
{