Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
cb7184e9
Commit
cb7184e9
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: VIDEOMODE cannot be a blocking call.
parent
0d034032
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/sdl_con.c
+4
-5
4 additions, 5 deletions
src/conio/sdl_con.c
with
4 additions
and
5 deletions
src/conio/sdl_con.c
+
4
−
5
View file @
cb7184e9
...
@@ -61,6 +61,7 @@ int sdl_ufunc_retval;
...
@@ -61,6 +61,7 @@ int sdl_ufunc_retval;
int
fullscreen
=
0
;
int
fullscreen
=
0
;
SDL_sem
*
sdl_init_complete
;
int
sdl_init_good
=
0
;
int
sdl_init_good
=
0
;
SDL_mutex
*
sdl_keylock
;
SDL_mutex
*
sdl_keylock
;
SDL_sem
*
sdl_key_pending
;
SDL_sem
*
sdl_key_pending
;
...
@@ -261,6 +262,7 @@ void sdl_user_func(int func, ...)
...
@@ -261,6 +262,7 @@ void sdl_user_func(int func, ...)
}
}
while
(
sdl
.
PeepEvents
(
&
ev
,
1
,
SDL_ADDEVENT
,
0xffffffff
)
!=
1
);
while
(
sdl
.
PeepEvents
(
&
ev
,
1
,
SDL_ADDEVENT
,
0xffffffff
)
!=
1
);
break
;
break
;
case
SDL_USEREVENT_SETVIDMODE
:
case
SDL_USEREVENT_COPY
:
case
SDL_USEREVENT_COPY
:
case
SDL_USEREVENT_PASTE
:
case
SDL_USEREVENT_PASTE
:
case
SDL_USEREVENT_SHOWMOUSE
:
case
SDL_USEREVENT_SHOWMOUSE
:
...
@@ -289,7 +291,6 @@ int sdl_user_func_ret(int func, ...)
...
@@ -289,7 +291,6 @@ int sdl_user_func_ret(int func, ...)
ev
.
user
.
code
=
func
;
ev
.
user
.
code
=
func
;
va_start
(
argptr
,
func
);
va_start
(
argptr
,
func
);
switch
(
func
)
{
switch
(
func
)
{
case
SDL_USEREVENT_SETVIDMODE
:
case
SDL_USEREVENT_INIT
:
case
SDL_USEREVENT_INIT
:
case
SDL_USEREVENT_QUIT
:
case
SDL_USEREVENT_QUIT
:
while
(
sdl
.
PeepEvents
(
&
ev
,
1
,
SDL_ADDEVENT
,
0xffffffff
)
!=
1
);
while
(
sdl
.
PeepEvents
(
&
ev
,
1
,
SDL_ADDEVENT
,
0xffffffff
)
!=
1
);
...
@@ -452,7 +453,7 @@ int sdl_init_mode(int mode)
...
@@ -452,7 +453,7 @@ int sdl_init_mode(int mode)
if
(
vstat
.
scaling
<
1
)
if
(
vstat
.
scaling
<
1
)
vstat
.
scaling
=
1
;
vstat
.
scaling
=
1
;
sdl_user_func
_ret
(
SDL_USEREVENT_SETVIDMODE
);
sdl_user_func
(
SDL_USEREVENT_SETVIDMODE
);
return
(
0
);
return
(
0
);
}
}
...
@@ -617,7 +618,7 @@ void sdl_add_key(unsigned int keyval)
...
@@ -617,7 +618,7 @@ void sdl_add_key(unsigned int keyval)
if
(
keyval
==
0xa600
)
{
if
(
keyval
==
0xa600
)
{
fullscreen
=!
fullscreen
;
fullscreen
=!
fullscreen
;
cio_api
.
mode
=
fullscreen
?
CIOLIB_MODE_SDL_FULLSCREEN
:
CIOLIB_MODE_SDL
;
cio_api
.
mode
=
fullscreen
?
CIOLIB_MODE_SDL_FULLSCREEN
:
CIOLIB_MODE_SDL
;
sdl_user_func
_ret
(
SDL_USEREVENT_SETVIDMODE
);
sdl_user_func
(
SDL_USEREVENT_SETVIDMODE
);
return
;
return
;
}
}
if
(
keyval
<=
0xffff
)
{
if
(
keyval
<=
0xffff
)
{
...
@@ -1306,8 +1307,6 @@ int sdl_video_event_thread(void *data)
...
@@ -1306,8 +1307,6 @@ int sdl_video_event_thread(void *data)
}
}
else
else
pthread_mutex_unlock
(
&
vstatlock
);
pthread_mutex_unlock
(
&
vstatlock
);
sdl_ufunc_retval
=
0
;
sdl
.
SemPost
(
sdl_ufunc_ret
);
break
;
break
;
case
SDL_USEREVENT_HIDEMOUSE
:
case
SDL_USEREVENT_HIDEMOUSE
:
sdl
.
ShowCursor
(
SDL_DISABLE
);
sdl
.
ShowCursor
(
SDL_DISABLE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment