mirror of
https://github.com/phoboslab/wipeout-rewrite
synced 2024-12-26 09:59:04 +01:00
commit
9e90c4768f
1 changed files with 10 additions and 6 deletions
|
@ -247,9 +247,6 @@ uint32_t platform_store_userdata(const char *name, void *bytes, int32_t len) {
|
|||
return file_store(path, bytes, len);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(RENDERER_GL) // ----------------------------------------------------
|
||||
#define PLATFORM_WINDOW_FLAGS SDL_WINDOW_OPENGL
|
||||
SDL_GLContext platform_gl;
|
||||
|
@ -299,7 +296,10 @@ uint32_t platform_store_userdata(const char *name, void *bytes, int32_t len) {
|
|||
}
|
||||
|
||||
void platform_video_cleanup() {
|
||||
|
||||
if (screenbuffer) {
|
||||
SDL_DestroyTexture(screenbuffer);
|
||||
}
|
||||
SDL_DestroyRenderer(renderer);
|
||||
}
|
||||
|
||||
void platform_prepare_frame() {
|
||||
|
@ -339,8 +339,6 @@ uint32_t platform_store_userdata(const char *name, void *bytes, int32_t len) {
|
|||
#error "Unsupported renderer for platform SDL"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER);
|
||||
|
||||
|
@ -418,6 +416,12 @@ int main(int argc, char *argv[]) {
|
|||
system_cleanup();
|
||||
platform_video_cleanup();
|
||||
|
||||
SDL_DestroyWindow(window);
|
||||
|
||||
if (gamepad) {
|
||||
SDL_GameControllerClose(gamepad);
|
||||
}
|
||||
|
||||
if (sdl_path_assets) {
|
||||
SDL_free(sdl_path_assets);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue