Add CMake build and cross-platform cleanup

This commit is contained in:
Bram Verhulst
2026-04-12 23:15:20 +02:00
parent 81746db9ae
commit 1ba1c1f2cc
25 changed files with 350 additions and 56 deletions

View File

@@ -7,7 +7,7 @@ void DumpMemoryLeaks();
Vector2f Viewport { 900.f, 500.f };
int SDL_main(int argv, char** args) {
int SDL_main(int, char**) {
srand(static_cast<unsigned int>(time(nullptr)));
StartHeapControl();
@@ -21,7 +21,7 @@ int SDL_main(int argv, char** args) {
void StartHeapControl() {
#if defined(DEBUG) | defined(_DEBUG)
#if defined(_MSC_VER) && defined(_DEBUG)
// Notify user if heap is corrupt
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
@@ -34,7 +34,7 @@ void StartHeapControl() {
}
void DumpMemoryLeaks() {
#if defined(DEBUG) | defined(_DEBUG)
#if defined(_MSC_VER) && defined(_DEBUG)
_CrtDumpMemoryLeaks();
#endif
}