mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-22 09:30:19 +00:00
Fix keyboard strobe behaviour
This commit is contained in:
parent
b775526b34
commit
1247d58912
@ -93,8 +93,7 @@ func getSoftSwitch(ioFlag uint8, isSet bool) softSwitchR {
|
||||
}
|
||||
|
||||
func getKeySoftSwitch(io *ioC0Page) uint8 {
|
||||
strobed := (io.softSwitchesData[ioDataKeyboard] & (1 << 7)) == 0
|
||||
if strobed && io.keyboard != nil {
|
||||
if io.keyboard != nil {
|
||||
if key, ok := io.keyboard.GetKey(); ok {
|
||||
io.softSwitchesData[ioDataKeyboard] = key + (1 << 7)
|
||||
}
|
||||
|
@ -35,9 +35,8 @@ func (k *sdlKeyboard) putText(textEvent *sdl.TextInputEvent) {
|
||||
func (k *sdlKeyboard) putKey(keyEvent *sdl.KeyboardEvent) {
|
||||
/* To get keys as understood by the Apple2 hardware run:
|
||||
10 A=PEEK(49152)
|
||||
20 B = A - 128
|
||||
30 PRINT A, B
|
||||
40 GOTO 10
|
||||
20 PRINT A, A - 128
|
||||
30 GOTO 10
|
||||
*/
|
||||
if keyEvent.Type != sdl.KEYDOWN {
|
||||
// Process only key pushes
|
||||
|
Loading…
Reference in New Issue
Block a user