mirror of https://github.com/encounter/aurora.git
Add VISetWindowTitle, VISetWindowFullscreen
This commit is contained in:
parent
928b34ce76
commit
e22541f175
|
@ -16,6 +16,12 @@ void VISetNextFrameBuffer(void *fb);
|
|||
void VIWaitForRetrace(void);
|
||||
void VISetBlack(BOOL black);
|
||||
|
||||
#ifdef TARGET_PC
|
||||
void VISetWindowTitle(const char* title);
|
||||
void VISetWindowFullscreen(bool fullscreen);
|
||||
bool VIGetWindowFullscreen();
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
extern "C" {
|
||||
#include <dolphin/vi.h>
|
||||
}
|
||||
|
||||
#include "../window.hpp"
|
||||
|
||||
void VIInit() {}
|
||||
u32 VIGetTvFormat() { return 0; }
|
||||
void VIFlush() {}
|
||||
|
||||
void VISetWindowTitle(const char* title) { aurora::window::set_title(title); }
|
||||
void VISetWindowFullscreen(bool fullscreen) { aurora::window::set_fullscreen(fullscreen); }
|
||||
bool VIGetWindowFullscreen() { return aurora::window::get_fullscreen(); }
|
||||
|
|
|
@ -91,6 +91,11 @@ const AuroraEvent* poll_events() {
|
|||
.type = AURORA_EXIT,
|
||||
});
|
||||
}
|
||||
|
||||
g_events.push_back(AuroraEvent{
|
||||
.type = AURORA_SDL_EVENT,
|
||||
.sdl = event,
|
||||
});
|
||||
}
|
||||
g_events.push_back(AuroraEvent{
|
||||
.type = AURORA_NONE,
|
||||
|
@ -247,4 +252,10 @@ SDL_Window* get_sdl_window() { return g_window; }
|
|||
|
||||
SDL_Renderer* get_sdl_renderer() { return g_renderer; }
|
||||
|
||||
void set_title(const char* title) { SDL_SetWindowTitle(g_window, title); }
|
||||
|
||||
void set_fullscreen(bool fullscreen) { SDL_SetWindowFullscreen(g_window, fullscreen ? SDL_WINDOW_FULLSCREEN : 0); }
|
||||
|
||||
bool get_fullscreen() { return (SDL_GetWindowFlags(g_window) & SDL_WINDOW_FULLSCREEN) != 0u; }
|
||||
|
||||
} // namespace aurora::window
|
||||
|
|
|
@ -17,4 +17,7 @@ AuroraWindowSize get_window_size();
|
|||
const AuroraEvent* poll_events();
|
||||
SDL_Window* get_sdl_window();
|
||||
SDL_Renderer* get_sdl_renderer();
|
||||
void set_title(const char* title);
|
||||
void set_fullscreen(bool fullscreen);
|
||||
bool get_fullscreen();
|
||||
}; // namespace aurora::window
|
||||
|
|
Loading…
Reference in New Issue