src/video/windows/SDL_windowsframebuffer.c
branchSDL-ryan-batching-renderer
changeset 12349 a67dedb293c8
parent 11811 5d94cb6b24d3
child 12503 806492103856
     1.1 --- a/src/video/windows/SDL_windowsframebuffer.c	Sat Oct 06 17:08:04 2018 -0400
     1.2 +++ b/src/video/windows/SDL_windowsframebuffer.c	Mon Oct 22 20:50:32 2018 -0400
     1.3 @@ -27,6 +27,7 @@
     1.4  int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
     1.5  {
     1.6      SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
     1.7 +    SDL_bool isstack;
     1.8      size_t size;
     1.9      LPBITMAPINFO info;
    1.10      HBITMAP hbm;
    1.11 @@ -41,7 +42,7 @@
    1.12  
    1.13      /* Find out the format of the screen */
    1.14      size = sizeof(BITMAPINFOHEADER) + 256 * sizeof (RGBQUAD);
    1.15 -    info = (LPBITMAPINFO)SDL_stack_alloc(Uint8, size);
    1.16 +    info = (LPBITMAPINFO)SDL_small_alloc(Uint8, size, &isstack);
    1.17      if (!info) {
    1.18          return SDL_OutOfMemory();
    1.19      }
    1.20 @@ -85,7 +86,7 @@
    1.21  
    1.22      data->mdc = CreateCompatibleDC(data->hdc);
    1.23      data->hbm = CreateDIBSection(data->hdc, info, DIB_RGB_COLORS, pixels, NULL, 0);
    1.24 -    SDL_stack_free(info);
    1.25 +    SDL_small_free(info, isstack);
    1.26  
    1.27      if (!data->hbm) {
    1.28          return WIN_SetError("Unable to create DIB");