src/video/ataricommon/SDL_biosevents.c
changeset 2043 adf732f1f016
parent 2033 b657f0bc72c2
child 2859 99210400e8b9
equal deleted inserted replaced
2042:3908e1f808e1 2043:adf732f1f016
    59     vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS;  /* XBIOS joystick events */
    59     vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS;  /* XBIOS joystick events */
    60     if (!use_dev_mouse) {
    60     if (!use_dev_mouse) {
    61         vectors_mask |= ATARI_XBIOS_MOUSEEVENTS;        /* XBIOS mouse events */
    61         vectors_mask |= ATARI_XBIOS_MOUSEEVENTS;        /* XBIOS mouse events */
    62     }
    62     }
    63     /*if (Getcookie(C_MiNT, &dummy) == C_FOUND) {
    63     /*if (Getcookie(C_MiNT, &dummy) == C_FOUND) {
    64         vectors_mask = 0;
    64        vectors_mask = 0;
    65     }*/
    65        } */
    66 
    66 
    67     SDL_AtariXbios_InstallVectors(vectors_mask);
    67     SDL_AtariXbios_InstallVectors(vectors_mask);
    68 }
    68 }
    69 
    69 
    70 void
    70 void
    76     /* Update pressed keys */
    76     /* Update pressed keys */
    77     SDL_memset(bios_currentkeyboard, 0, ATARIBIOS_MAXKEYS);
    77     SDL_memset(bios_currentkeyboard, 0, ATARIBIOS_MAXKEYS);
    78 
    78 
    79     while (Bconstat(_CON)) {
    79     while (Bconstat(_CON)) {
    80         unsigned long key_pressed;
    80         unsigned long key_pressed;
    81         key_pressed=Bconin(_CON);
    81         key_pressed = Bconin(_CON);
    82         bios_currentkeyboard[(key_pressed>>16)&(ATARIBIOS_MAXKEYS-1)]=0xFF;
    82         bios_currentkeyboard[(key_pressed >> 16) & (ATARIBIOS_MAXKEYS - 1)] =
       
    83             0xFF;
    83     }
    84     }
    84 
    85 
    85     /* Read special keys */
    86     /* Read special keys */
    86     UpdateSpecialKeys(Kbshift(-1));
    87     UpdateSpecialKeys(Kbshift(-1));
    87 
    88 
    93                                 SDL_Atari_TranslateKey(i, &keysym, SDL_TRUE));
    94                                 SDL_Atari_TranslateKey(i, &keysym, SDL_TRUE));
    94 
    95 
    95         /* Key unpressed ? */
    96         /* Key unpressed ? */
    96         if (bios_previouskeyboard[i] && !bios_currentkeyboard[i])
    97         if (bios_previouskeyboard[i] && !bios_currentkeyboard[i])
    97             SDL_PrivateKeyboard(SDL_RELEASED,
    98             SDL_PrivateKeyboard(SDL_RELEASED,
    98                                 SDL_Atari_TranslateKey(i, &keysym, SDL_FALSE));
    99                                 SDL_Atari_TranslateKey(i, &keysym,
       
   100                                                        SDL_FALSE));
    99     }
   101     }
   100 
   102 
   101     if (use_dev_mouse) {
   103     if (use_dev_mouse) {
   102         SDL_AtariDevMouse_PostMouseEvents(_this, SDL_TRUE);
   104         SDL_AtariDevMouse_PostMouseEvents(_this, SDL_TRUE);
   103     } else {
   105     } else {