From b39c7374009d03d448e47e08ddabc30abeee5247 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Thu, 25 Aug 2022 18:55:59 -0400 Subject: minor fixes --- main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 52cfae6..866ef24 100644 --- a/main.cpp +++ b/main.cpp @@ -158,10 +158,10 @@ int main(int argc, char *argv[]) { File.StartFrame = 0; File.EndFrame = 65; - LoadTestFootage(&File, &State, &Memory); +#if DEBUG + LoadTestFootage(&File, &State, &Memory); -#if DEBUG // GDB and LLDB say this plain struct that's literally under 30 bytes is // incomplete in the layers unless I do this... layer_bitmap_info BitmapInfo; @@ -272,7 +272,7 @@ int main(int argc, char *argv[]) { ScreenSize[1] = 1080; } #endif - SDL_Window* window = SDL_CreateWindow("Event Tester", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, ScreenSize[0], ScreenSize[1], window_flags); + SDL_Window* window = SDL_CreateWindow("Event Tester", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, ScreenSize[0], ScreenSize[1], window_flags); SDL_GLContext gl_context = SDL_GL_CreateContext(window); SDL_GL_MakeCurrent(window, gl_context); SDL_GL_SetSwapInterval(1); // Enable vsync @@ -332,9 +332,7 @@ int main(int argc, char *argv[]) { ImGui_ImplSDL2_ProcessEvent(&event); if (event.type == SDL_DROPFILE) { char *DropFile = event.drop.file; - // TODO(fox): Free failed strings if too many get created! - void *SourceString = String_GenerateFromChar(Memory, DropFile); - Source_Generate(File, Memory, SourceString); + Source_Generate(&File, &State, &Memory, DropFile); SDL_free(DropFile); } if (event.type == SDL_QUIT) -- cgit v1.2.3