summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp10
1 files changed, 4 insertions, 6 deletions
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)