mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-21 02:38:14 +00:00
Renamed driverdata to internal
This was done to SDL_DisplayMode for consistency with SDL_Surface and gives it a type so we don't have to do casts in SDL code. I considered switching to an ID and hashing the driver data, etc. but all of that involved a lot of internal code churn and this solution gives us flexibility in how we handle this in the future. After consideration, I made this renaming global across the project, for consistency. Fixes https://github.com/libsdl-org/SDL/issues/10198
This commit is contained in:
@@ -34,7 +34,7 @@ int Emscripten_CreateWindowFramebuffer(SDL_VideoDevice *_this, SDL_Window *windo
|
||||
int w, h;
|
||||
|
||||
/* Free the old framebuffer surface */
|
||||
SDL_WindowData *data = window->driverdata;
|
||||
SDL_WindowData *data = window->internal;
|
||||
surface = data->surface;
|
||||
SDL_DestroySurface(surface);
|
||||
|
||||
@@ -58,7 +58,7 @@ int Emscripten_UpdateWindowFramebuffer(SDL_VideoDevice *_this, SDL_Window *windo
|
||||
{
|
||||
SDL_Surface *surface;
|
||||
|
||||
SDL_WindowData *data = window->driverdata;
|
||||
SDL_WindowData *data = window->internal;
|
||||
surface = data->surface;
|
||||
if (!surface) {
|
||||
return SDL_SetError("Couldn't find framebuffer surface for window");
|
||||
@@ -152,7 +152,7 @@ int Emscripten_UpdateWindowFramebuffer(SDL_VideoDevice *_this, SDL_Window *windo
|
||||
|
||||
void Emscripten_DestroyWindowFramebuffer(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
{
|
||||
SDL_WindowData *data = window->driverdata;
|
||||
SDL_WindowData *data = window->internal;
|
||||
|
||||
SDL_DestroySurface(data->surface);
|
||||
data->surface = NULL;
|
||||
|
Reference in New Issue
Block a user