Add CMake build and cross-platform cleanup
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user