1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-04-06 05:02:57 +00:00

Add prototypical SDL support.

Build with cmake. This will create a new backend (ldesdl).
- Resolution can only be set by editing the variables in sdl.c.
- Key repeat does not work.
- Still problems with keysyms that implicitly contain modifiers.
- The entire screen is bitblted onto the SDL display every frame.

Support keyboard, and work on mouse.

Kind of working...

Fix display resolution problems.
This commit is contained in:
Peter
2021-10-19 14:11:45 +02:00
parent 75c668f1cd
commit f58abe36ee
8 changed files with 422 additions and 8 deletions

View File

@@ -273,6 +273,7 @@ void set_kbd_iopointers() {
#define KB_HP9000 (10 + MIN_KEYTYPE) /* TODO: Can we remove this? */
#define KB_X (11 + MIN_KEYTYPE)
#define KB_DOS (12 + MIN_KEYTYPE)
#define KB_SDL (13 + MIN_KEYTYPE)
/* KB_SUN4 not defined in older OS versions */
#ifndef KB_SUN4
@@ -432,6 +433,8 @@ void keyboardtype(int fd)
type = KB_X;
#elif DOS
type = KB_DOS;
#elif SDL
type = KB_SDL;
#endif /* XWINDOW */
} /* if end */
else {
@@ -447,6 +450,8 @@ void keyboardtype(int fd)
type = KB_X;
else if (strcmp("x", key) == 0)
type = KB_X;
else if (strcmp("sdl", key) == 0)
type = KB_SDL;
else
type = KB_SUN3; /* default */
}
@@ -483,7 +488,11 @@ void keyboardtype(int fd)
InterfacePage->devconfig |= KB_SUN3 - MIN_KEYTYPE; /* 10 */
break;
#endif /* XWINDOW */
#ifdef SDL
case KB_SDL:
InterfacePage->devconfig |= KB_SUN3 - MIN_KEYTYPE; /* 10 */
break;
#endif /* SDL */
#ifdef DOS
case KB_DOS:
SUNLispKeyMap = DOSLispKeyMap_101;