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
f918c402
Commit
f918c402
authored
5 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add an SDL beep to allow the first beep to not block the console.
(successive beeps currently still will)
parent
5b1f0487
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/conio/ciolib.c
+1
-0
1 addition, 0 deletions
src/conio/ciolib.c
src/conio/sdl_con.c
+12
-0
12 additions, 0 deletions
src/conio/sdl_con.c
src/conio/sdl_con.h
+1
-0
1 addition, 0 deletions
src/conio/sdl_con.h
with
14 additions
and
0 deletions
src/conio/ciolib.c
+
1
−
0
View file @
f918c402
...
...
@@ -195,6 +195,7 @@ static int try_sdl_init(int mode)
cio_api
.
set_modepalette
=
bitmap_set_modepalette
;
cio_api
.
map_rgb
=
bitmap_map_rgb
;
cio_api
.
replace_font
=
bitmap_replace_font
;
cio_api
.
beep
=
sdl_beep
;
return
(
1
);
}
return
(
0
);
...
...
This diff is collapsed.
Click to expand it.
src/conio/sdl_con.c
+
12
−
0
View file @
f918c402
...
...
@@ -1392,3 +1392,15 @@ int sdl_initciolib(int mode)
sdl_keylock
=
sdl
.
SDL_CreateMutex
();
return
(
sdl_init
(
mode
));
}
void
sdl_beep
(
void
)
{
static
unsigned
char
wave
[
2206
];
if
(
wave
[
2205
]
==
0
)
{
xptone_makewave
(
440
,
wave
,
2205
,
WAVE_SHAPE_SINE_SAW_HARM
);
wave
[
2205
]
=
1
;
}
xp_play_sample
(
wave
,
2205
,
TRUE
);
}
This diff is collapsed.
Click to expand it.
src/conio/sdl_con.h
+
1
−
0
View file @
f918c402
...
...
@@ -37,6 +37,7 @@ int sdl_get_window_info(int *width, int *height, int *xpos, int *ypos);
int
sdl_setpalette
(
uint32_t
index
,
uint16_t
r
,
uint16_t
g
,
uint16_t
b
);
void
sdl_setwinsize
(
int
w
,
int
h
);
void
sdl_setwinposition
(
int
x
,
int
y
);
void
sdl_beep
(
void
);
#ifdef __cplusplus
}
#endif
...
...
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