mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-01 09:32:32 +00:00
fixed keycodes file name (SS)
fixed capslock (Windows)
This commit is contained in:
parent
c4956c40f8
commit
ecef51bc47
@ -90,11 +90,17 @@ enum {
|
|||||||
static int display_type = DISPLAY_WINDOW; // See enum above
|
static int display_type = DISPLAY_WINDOW; // See enum above
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SHEEPSHAVER
|
||||||
|
#define PROGRAM_NAME "SheepShaver"
|
||||||
|
#else
|
||||||
|
#define PROGRAM_NAME "BasiliskII"
|
||||||
|
#endif
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes";
|
const char KEYCODE_FILE_NAME[] = PROGRAM_NAME "_keycodes";
|
||||||
#elif __MACOSX__
|
#elif __MACOSX__
|
||||||
const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes";
|
const char KEYCODE_FILE_NAME[] = PROGRAM_NAME "_keycodes";
|
||||||
#else
|
#else
|
||||||
const char KEYCODE_FILE_NAME[] = DATADIR "/keycodes";
|
const char KEYCODE_FILE_NAME[] = DATADIR "/keycodes";
|
||||||
#endif
|
#endif
|
||||||
@ -741,7 +747,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags
|
|||||||
*/
|
*/
|
||||||
if (!sdl_window) {
|
if (!sdl_window) {
|
||||||
sdl_window = SDL_CreateWindow(
|
sdl_window = SDL_CreateWindow(
|
||||||
"Basilisk II",
|
PROGRAM_NAME,
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
window_width,
|
window_width,
|
||||||
@ -2198,7 +2204,14 @@ static void handle_events(void)
|
|||||||
code = event2keycode(event.key, true);
|
code = event2keycode(event.key, true);
|
||||||
if (code >= 0) {
|
if (code >= 0) {
|
||||||
if (!emul_suspended) {
|
if (!emul_suspended) {
|
||||||
|
#ifdef WIN32
|
||||||
|
if (code == 0x39)
|
||||||
|
(SDL_GetModState() & KMOD_CAPS ? ADBKeyDown : ADBKeyUp)(code);
|
||||||
|
else
|
||||||
ADBKeyDown(code);
|
ADBKeyDown(code);
|
||||||
|
#else
|
||||||
|
ADBKeyDown(code);
|
||||||
|
#endif
|
||||||
if (code == 0x36)
|
if (code == 0x36)
|
||||||
ctrl_down = true;
|
ctrl_down = true;
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
@ -2227,7 +2240,12 @@ static void handle_events(void)
|
|||||||
if (code == CODE_INVALID)
|
if (code == CODE_INVALID)
|
||||||
code = event2keycode(event.key, false);
|
code = event2keycode(event.key, false);
|
||||||
if (code >= 0) {
|
if (code >= 0) {
|
||||||
|
#ifdef WIN32
|
||||||
|
if (code != 0x39)
|
||||||
ADBKeyUp(code);
|
ADBKeyUp(code);
|
||||||
|
#else
|
||||||
|
ADBKeyUp(code);
|
||||||
|
#endif
|
||||||
if (code == 0x36)
|
if (code == 0x36)
|
||||||
ctrl_down = false;
|
ctrl_down = false;
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user