Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 03f8528315fa46c95991a34f3325d7b33ae5538c
source/test/testdropfile.c
@@ -1,5 +1,5 @@
/*
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -52,7 +52,7 @@
            consumed = -1;
        }
        if (consumed < 0) {
            SDL_Log("Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state));
            SDLTest_CommonLogUsage(state, argv[0], NULL);
            quit(1);
        }
        i += consumed;
@@ -75,8 +75,6 @@
    while (!done) {
        /* Check for events */
        while (SDL_PollEvent(&event)) {
            SDLTest_CommonEvent(state, &event, &done);
            if (event.type == SDL_DROPBEGIN) {
                SDL_Log("Drop beginning on window %u", (unsigned int) event.drop.windowID);
            } else if (event.type == SDL_DROPCOMPLETE) {
@@ -85,8 +83,11 @@
                const char *typestr = (event.type == SDL_DROPFILE) ? "File" : "Text";
                char *dropped_filedir = event.drop.file;
                SDL_Log("%s dropped on window %u: %s", typestr, (unsigned int) event.drop.windowID, dropped_filedir);
                SDL_free(dropped_filedir);
                /* Normally you'd have to do this, but this is freed in SDLTest_CommonEvent() */
                /*SDL_free(dropped_filedir);*/
            }
            SDLTest_CommonEvent(state, &event, &done);
        }
    }