Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
d05ada52
Commit
d05ada52
authored
Jul 18, 2011
by
Ryan C. Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The SwapInterval APIs should fail without a current OpenGL context.
parent
b77354e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
SDL_video.c
src/video/SDL_video.c
+8
-4
No files found.
src/video/SDL_video.c
View file @
d05ada52
...
@@ -2510,8 +2510,10 @@ SDL_GL_SetSwapInterval(int interval)
...
@@ -2510,8 +2510,10 @@ SDL_GL_SetSwapInterval(int interval)
if
(
!
_this
)
{
if
(
!
_this
)
{
SDL_UninitializedVideo
();
SDL_UninitializedVideo
();
return
-
1
;
return
-
1
;
}
}
else
if
(
_this
->
current_glctx
==
NULL
)
{
if
(
_this
->
GL_SetSwapInterval
)
{
SDL_SetError
(
"No OpenGL context has been made current"
);
return
-
1
;
}
else
if
(
_this
->
GL_SetSwapInterval
)
{
return
_this
->
GL_SetSwapInterval
(
_this
,
interval
);
return
_this
->
GL_SetSwapInterval
(
_this
,
interval
);
}
else
{
}
else
{
SDL_SetError
(
"Setting the swap interval is not supported"
);
SDL_SetError
(
"Setting the swap interval is not supported"
);
...
@@ -2525,8 +2527,10 @@ SDL_GL_GetSwapInterval(void)
...
@@ -2525,8 +2527,10 @@ SDL_GL_GetSwapInterval(void)
if
(
!
_this
)
{
if
(
!
_this
)
{
SDL_UninitializedVideo
();
SDL_UninitializedVideo
();
return
-
1
;
return
-
1
;
}
}
else
if
(
_this
->
current_glctx
==
NULL
)
{
if
(
_this
->
GL_GetSwapInterval
)
{
SDL_SetError
(
"No OpenGL context has been made current"
);
return
-
1
;
}
else
if
(
_this
->
GL_GetSwapInterval
)
{
return
_this
->
GL_GetSwapInterval
(
_this
);
return
_this
->
GL_GetSwapInterval
(
_this
);
}
else
{
}
else
{
SDL_SetError
(
"Getting the swap interval is not supported"
);
SDL_SetError
(
"Getting the swap interval is not supported"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment