diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-08-25 18:55:59 -0400 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-08-25 18:55:59 -0400 |
commit | b39c7374009d03d448e47e08ddabc30abeee5247 (patch) | |
tree | d1a022544720138f244c0bf9cbc1437ff50e589d /main.cpp | |
parent | ae94b4b9fc5b4443f6d9eb6bb450de1def108cdb (diff) |
minor fixes
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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) |