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
ac7e9ca7
Commit
ac7e9ca7
authored
1 year ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Don't bother starting the SDL thread just to shut it down.
Fixes issue closing SyncTERM in curses mode on macOS.
parent
eac02d15
No related branches found
No related tags found
No related merge requests found
Pipeline
#6171
passed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/ciolib.c
+16
-7
16 additions, 7 deletions
src/conio/ciolib.c
with
16 additions
and
7 deletions
src/conio/ciolib.c
+
16
−
7
View file @
ac7e9ca7
...
@@ -2018,30 +2018,39 @@ struct main_args {
...
@@ -2018,30 +2018,39 @@ struct main_args {
int
argc
;
int
argc
;
char
**
argv
;
char
**
argv
;
int
ret
;
int
ret
;
int
no_sdl
;
enum
{
SDL_NOT_STARTED
,
SDL_STARTED
,
SDL_ENDED
}
sdl_state
;
};
};
int
CIOLIB_main
(
int
,
char
**
);
int
CIOLIB_main
(
int
,
char
**
);
void
main_stub
(
void
*
argptr
)
void
main_stub
(
void
*
argptr
)
{
{
bool
exit_sdl
=
false
;
struct
main_args
*
args
=
(
struct
main_args
*
)
argptr
;
struct
main_args
*
args
=
(
struct
main_args
*
)
argptr
;
args
->
ret
=
CIOLIB_main
(
args
->
argc
,
args
->
argv
);
args
->
ret
=
CIOLIB_main
(
args
->
argc
,
args
->
argv
);
args
->
no_sdl
=
1
;
if
(
args
->
sdl_state
==
SDL_STARTED
)
exit_sdl
=
true
;
args
->
sdl_state
=
SDL_ENDED
;
sem_post
(
&
startsdl_sem
);
sem_post
(
&
startsdl_sem
);
exit_sdl_con
();
if
(
exit_sdl
)
exit_sdl_con
();
sem_post
(
&
main_sem
);
sem_post
(
&
main_sem
);
}
}
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
struct
main_args
ma
=
{
argc
,
argv
,
-
1
,
0
};
struct
main_args
ma
=
{
argc
,
argv
,
-
1
,
SDL_NOT_STARTED
};
sem_init
(
&
startsdl_sem
,
0
,
0
);
sem_init
(
&
startsdl_sem
,
0
,
0
);
sem_init
(
&
main_sem
,
0
,
0
);
sem_init
(
&
main_sem
,
0
,
0
);
initsdl_ret
=
init_sdl_video
();
initsdl_ret
=
init_sdl_video
();
_beginthread
(
main_stub
,
0
,
&
ma
);
_beginthread
(
main_stub
,
0
,
&
ma
);
if
(
!
ma
.
no_sdl
)
{
if
(
initsdl_ret
!=
-
1
)
{
if
(
initsdl_ret
!=
-
1
)
{
sem_wait
(
&
startsdl_sem
);
sem_wait
(
&
startsdl_sem
);
if
(
ma
.
sdl_state
==
SDL_NOT_STARTED
)
{
ma
.
sdl_state
=
SDL_STARTED
;
sdl_video_event_thread
(
NULL
);
sdl_video_event_thread
(
NULL
);
}
}
}
}
...
...
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