Skip to content

Commit

Permalink
SDL_GetWindowICCProfile() follows the SDL_GetStringRule
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 19, 2024
1 parent fd5a02c commit 331bf8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/SDL3/SDL_video.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetWindowFullscreenMode(
/**
* Get the raw ICC profile data for the screen the window is currently on.
*
* Data returned should be freed with SDL_free.
* The returned data follows the SDL_GetStringRule, and will be automatically freed later.
*
* \param window the window to query.
* \param size the size of the ICC profile.
Expand All @@ -776,7 +776,7 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetWindowFullscreenMode(
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size);
extern SDL_DECLSPEC const void * SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size);

/**
* Get the pixel format associated with the window.
Expand Down
2 changes: 1 addition & 1 deletion src/dynapi/SDL_dynapi_procs.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ SDL_DYNAPI_PROC(float,SDL_GetWindowDisplayScale,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(SDL_WindowFlags,SDL_GetWindowFlags,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_GetWindowFromID,(SDL_WindowID a),(a),return)
SDL_DYNAPI_PROC(const SDL_DisplayMode*,SDL_GetWindowFullscreenMode,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(void*,SDL_GetWindowICCProfile,(SDL_Window *a, size_t *b),(a,b),return)
SDL_DYNAPI_PROC(const void*,SDL_GetWindowICCProfile,(SDL_Window *a, size_t *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_WindowID,SDL_GetWindowID,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GetWindowKeyboardGrab,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GetWindowMaximumSize,(SDL_Window *a, int *b, int *c),(a,b,c),return)
Expand Down
4 changes: 2 additions & 2 deletions src/video/SDL_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2000,13 +2000,13 @@ const SDL_DisplayMode *SDL_GetWindowFullscreenMode(SDL_Window *window)
}
}

void *SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)
const void *SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)
{
if (!_this->GetWindowICCProfile) {
SDL_Unsupported();
return NULL;
}
return _this->GetWindowICCProfile(_this, window, size);
return SDL_FreeLater(_this->GetWindowICCProfile(_this, window, size));
}

SDL_PixelFormat SDL_GetWindowPixelFormat(SDL_Window *window)
Expand Down

0 comments on commit 331bf8d

Please sign in to comment.