From 33e95864878c846324b996287d317d6a7661aa67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hatvani=20Tam=C3=A1s?= Date: Wed, 25 Feb 2026 09:43:05 +0100 Subject: [PATCH] fix: freeing surface that is not created --- SakuraVNE/src/Application.cpp | 2 +- build.bat | 2 -- generate.bat | 6 ++++++ generate.sh | 7 +++++++ premake5.lua | 2 ++ todo.md | 2 +- 6 files changed, 17 insertions(+), 4 deletions(-) delete mode 100644 build.bat create mode 100644 generate.bat create mode 100755 generate.sh diff --git a/SakuraVNE/src/Application.cpp b/SakuraVNE/src/Application.cpp index 1a89180..bed7a4f 100644 --- a/SakuraVNE/src/Application.cpp +++ b/SakuraVNE/src/Application.cpp @@ -164,7 +164,7 @@ void Application::Shutdown() { SDL_DestroyRenderer(m_Renderer); - SDL_FreeSurface(m_Surface); + // SDL_FreeSurface(m_Surface); // Destroy window SDL_DestroyWindow(m_Window); diff --git a/build.bat b/build.bat deleted file mode 100644 index 67fa135..0000000 --- a/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -.\vendor\premake\windows\premake5.exe vs2022 -PAUSE \ No newline at end of file diff --git a/generate.bat b/generate.bat new file mode 100644 index 0000000..f7a5836 --- /dev/null +++ b/generate.bat @@ -0,0 +1,6 @@ +echo Generating vs2022 project files... +.\vendor\premake\windows\premake5.exe vs2022 +echo Generating compile_commands.json with premake-ecc +.\vendor\premake\windows\premake5.exe ecc +echo Done +PAUSE diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..32ae58c --- /dev/null +++ b/generate.sh @@ -0,0 +1,7 @@ +#!/bin/bash +echo "Generating Makefiles..." +./vendor/premake/linux/premake5 gmake2 +echo "Generating compile_commands.json for clangd..." +./vendor/premake/linux/premake5 ecc +echo "Done!" +echo "Run `make help` to see how to build the project." diff --git a/premake5.lua b/premake5.lua index b5a0d3e..106554a 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,3 +1,5 @@ +require "plugins/ecc" + workspace "SakuraVNE" architecture "x64" startproject "SakuraVNE" diff --git a/todo.md b/todo.md index 44fcbc7..2a58333 100644 --- a/todo.md +++ b/todo.md @@ -2,4 +2,4 @@ - add imgui-node-editor to the project in the premake file - delete external/imgui from the node-editor and point it to the one in lib/imgui - fix seg fault after shutting down the program -update sdl2 to sdl3 for linux and windows +- update sdl2 to sdl3 for linux and windows