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
30b7b398
Commit
30b7b398
authored
3 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Heh, fix codes over 255 as well.
parent
357a25b9
No related branches found
No related tags found
No related merge requests found
Pipeline
#8078
passed
3 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/retro.c
+8
-4
8 additions, 4 deletions
src/conio/retro.c
with
8 additions
and
4 deletions
src/conio/retro.c
+
8
−
4
View file @
30b7b398
...
...
@@ -8,8 +8,8 @@
#include
"libretro.h"
#define KEYBUFSIZE
32
static
uint
16
_t
keybuf
[
KEYBUFSIZE
];
#define KEYBUFSIZE
128
static
uint
8
_t
keybuf
[
KEYBUFSIZE
];
static
size_t
keybufremove
=
0
;
static
size_t
keybufadd
=
0
;
static
size_t
keybuffill
=
0
;
...
...
@@ -153,9 +153,13 @@ retro_keyboard(bool down, unsigned keycode, uint32_t character, uint16_t key_mod
}
}
}
if
(
add
)
{
keybuf
[
keybufadd
++
]
=
add
;
if
(
add
&&
keybuffill
<
KEYBUFSIZE
-
2
)
{
keybuf
[
keybufadd
++
]
=
add
&
0xff
;
keybuffill
++
;
if
(
add
>
255
)
{
keybuf
[
keybufadd
++
]
=
add
>>
8
;
keybuffill
++
;
}
}
}
...
...
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