Disable XBIOS driver for mouse and joystick under MiNT. Will write a driver for /dev/mouse later.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401240
This commit is contained in:
parent
ff0632ca53
commit
0022cb28fe
6 changed files with 50 additions and 11 deletions
11
README.MiNT
11
README.MiNT
|
@ -68,9 +68,9 @@ OpenGL (using Mesa offscreen rendering driver)
|
||||||
- Dependent driver combinations:
|
- Dependent driver combinations:
|
||||||
Video Kbd Mouse Timer Joysticks
|
Video Kbd Mouse Timer Joysticks
|
||||||
xbios ikbd ikbd vbl(2) ikbd
|
xbios ikbd ikbd vbl(2) ikbd
|
||||||
xbios gemdos xbios vbl(2) xbios
|
xbios gemdos xbios vbl(2) xbios(3)
|
||||||
xbios bios xbios vbl(2) xbios
|
xbios bios xbios vbl(2) xbios(3)
|
||||||
gem gem gem(1) vbl(2) xbios
|
gem gem gem(1) vbl(2) xbios(3)
|
||||||
|
|
||||||
Audio O/S Misc
|
Audio O/S Misc
|
||||||
dma8 All Uses MFP Timer A interrupt
|
dma8 All Uses MFP Timer A interrupt
|
||||||
|
@ -87,11 +87,14 @@ Joypad driver always uses hardware access.
|
||||||
OpenGL driver always uses OSMesa.
|
OpenGL driver always uses OSMesa.
|
||||||
|
|
||||||
(1) GEM does not report relative mouse motion, so xbios mouse driver is used
|
(1) GEM does not report relative mouse motion, so xbios mouse driver is used
|
||||||
to report this type event.
|
to report this type event. Under MiNT, using XBIOS mouse driver is not possible.
|
||||||
|
|
||||||
(2) If you build SDL with threads using the GNU pth library, timers are
|
(2) If you build SDL with threads using the GNU pth library, timers are
|
||||||
supported via the pth library.
|
supported via the pth library.
|
||||||
|
|
||||||
|
(3) Redirecting XBIOS vectors does not work under MiNT, so it is disabled in
|
||||||
|
this case.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
V. Environment variables:
|
V. Environment variables:
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ static char rcsid =
|
||||||
|
|
||||||
/* Mint includes */
|
/* Mint includes */
|
||||||
#include <mint/osbind.h>
|
#include <mint/osbind.h>
|
||||||
|
#include <mint/cookie.h>
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "SDL_sysevents.h"
|
#include "SDL_sysevents.h"
|
||||||
|
@ -71,7 +72,8 @@ static void UpdateSpecialKeys(int special_keys_state);
|
||||||
|
|
||||||
void AtariBios_InitOSKeymap(_THIS)
|
void AtariBios_InitOSKeymap(_THIS)
|
||||||
{
|
{
|
||||||
int i;
|
int i, vectors_mask;
|
||||||
|
unsigned long dummy;
|
||||||
|
|
||||||
memset(bios_currentkeyboard, 0, sizeof(bios_currentkeyboard));
|
memset(bios_currentkeyboard, 0, sizeof(bios_currentkeyboard));
|
||||||
memset(bios_previouskeyboard, 0, sizeof(bios_previouskeyboard));
|
memset(bios_previouskeyboard, 0, sizeof(bios_previouskeyboard));
|
||||||
|
@ -106,7 +108,12 @@ void AtariBios_InitOSKeymap(_THIS)
|
||||||
keymap[SCANCODE_LEFTALT] = SDLK_LALT;
|
keymap[SCANCODE_LEFTALT] = SDLK_LALT;
|
||||||
keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK;
|
keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK;
|
||||||
|
|
||||||
SDL_AtariXbios_InstallVectors(ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS);
|
vectors_mask = ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS;
|
||||||
|
if (Getcookie(C_MiNT, &dummy)==C_FOUND) {
|
||||||
|
vectors_mask = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_AtariXbios_InstallVectors(vectors_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtariBios_PumpEvents(_THIS)
|
void AtariBios_PumpEvents(_THIS)
|
||||||
|
|
|
@ -35,6 +35,7 @@ static char rcsid =
|
||||||
|
|
||||||
/* Mint includes */
|
/* Mint includes */
|
||||||
#include <mint/osbind.h>
|
#include <mint/osbind.h>
|
||||||
|
#include <mint/cookie.h>
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "SDL_sysevents.h"
|
#include "SDL_sysevents.h"
|
||||||
|
@ -76,7 +77,8 @@ static void UpdateSpecialKeys(int special_keys_state);
|
||||||
|
|
||||||
void AtariGemdos_InitOSKeymap(_THIS)
|
void AtariGemdos_InitOSKeymap(_THIS)
|
||||||
{
|
{
|
||||||
int i;
|
int i, vectors_mask;
|
||||||
|
unsigned long dummy;
|
||||||
|
|
||||||
memset(gemdos_currentkeyboard, 0, sizeof(gemdos_currentkeyboard));
|
memset(gemdos_currentkeyboard, 0, sizeof(gemdos_currentkeyboard));
|
||||||
memset(gemdos_previouskeyboard, 0, sizeof(gemdos_previouskeyboard));
|
memset(gemdos_previouskeyboard, 0, sizeof(gemdos_previouskeyboard));
|
||||||
|
@ -111,7 +113,12 @@ void AtariGemdos_InitOSKeymap(_THIS)
|
||||||
keymap[SCANCODE_LEFTALT] = SDLK_LALT;
|
keymap[SCANCODE_LEFTALT] = SDLK_LALT;
|
||||||
keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK;
|
keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK;
|
||||||
|
|
||||||
SDL_AtariXbios_InstallVectors(ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS);
|
vectors_mask = ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS;
|
||||||
|
if (Getcookie(C_MiNT, &dummy)==C_FOUND) {
|
||||||
|
vectors_mask = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_AtariXbios_InstallVectors(vectors_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtariGemdos_PumpEvents(_THIS)
|
void AtariGemdos_PumpEvents(_THIS)
|
||||||
|
|
|
@ -63,6 +63,11 @@ void SDL_AtariXbios_InstallVectors(int vectors_mask)
|
||||||
SDL_AtariXbios_joystick =
|
SDL_AtariXbios_joystick =
|
||||||
atari_prevmouseb = 0;
|
atari_prevmouseb = 0;
|
||||||
|
|
||||||
|
if (vectors_mask==0) {
|
||||||
|
SDL_AtariXbios_enabled=0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Read IKBD vectors base */
|
/* Read IKBD vectors base */
|
||||||
kbdvecs=Kbdvbase();
|
kbdvecs=Kbdvbase();
|
||||||
|
|
||||||
|
@ -86,6 +91,10 @@ void SDL_AtariXbios_RestoreVectors(void)
|
||||||
{
|
{
|
||||||
void *oldpile;
|
void *oldpile;
|
||||||
|
|
||||||
|
if (SDL_AtariXbios_enabled==0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Read IKBD vectors base */
|
/* Read IKBD vectors base */
|
||||||
kbdvecs=Kbdvbase();
|
kbdvecs=Kbdvbase();
|
||||||
|
|
||||||
|
@ -115,6 +124,10 @@ static int atari_GetButton(int button)
|
||||||
|
|
||||||
void SDL_AtariXbios_PostMouseEvents(_THIS)
|
void SDL_AtariXbios_PostMouseEvents(_THIS)
|
||||||
{
|
{
|
||||||
|
if (SDL_AtariXbios_enabled==0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Mouse motion ? */
|
/* Mouse motion ? */
|
||||||
if (SDL_AtariXbios_mousex || SDL_AtariXbios_mousey) {
|
if (SDL_AtariXbios_mousex || SDL_AtariXbios_mousey) {
|
||||||
SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey);
|
SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey);
|
||||||
|
|
|
@ -384,8 +384,10 @@ static void do_mouse(_THIS, short mx, short my, short mb, short ks)
|
||||||
/* Mouse motion ? */
|
/* Mouse motion ? */
|
||||||
if ((prevmousex!=mx) || (prevmousey!=my)) {
|
if ((prevmousex!=mx) || (prevmousey!=my)) {
|
||||||
if (GEM_mouse_relative) {
|
if (GEM_mouse_relative) {
|
||||||
|
if ((SDL_AtariXbios_mousex!=0) || (SDL_AtariXbios_mousey!=0)) {
|
||||||
SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey);
|
SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey);
|
||||||
SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0;
|
SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
int posx, posy;
|
int posx, posy;
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,8 @@ static void GEM_DeleteDevice(SDL_VideoDevice *device)
|
||||||
static SDL_VideoDevice *GEM_CreateDevice(int devindex)
|
static SDL_VideoDevice *GEM_CreateDevice(int devindex)
|
||||||
{
|
{
|
||||||
SDL_VideoDevice *device;
|
SDL_VideoDevice *device;
|
||||||
|
int vectors_mask;
|
||||||
|
unsigned long dummy;
|
||||||
|
|
||||||
/* Initialize all variables that we clean on shutdown */
|
/* Initialize all variables that we clean on shutdown */
|
||||||
device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));
|
device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));
|
||||||
|
@ -198,7 +200,12 @@ static SDL_VideoDevice *GEM_CreateDevice(int devindex)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Joystick + Mouse relative motion */
|
/* Joystick + Mouse relative motion */
|
||||||
SDL_AtariXbios_InstallVectors(ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS);
|
vectors_mask = ATARI_XBIOS_MOUSEEVENTS|ATARI_XBIOS_JOYSTICKEVENTS;
|
||||||
|
if (Getcookie(C_MiNT, &dummy)==C_FOUND) {
|
||||||
|
vectors_mask = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_AtariXbios_InstallVectors(vectors_mask);
|
||||||
|
|
||||||
device->free = GEM_DeleteDevice;
|
device->free = GEM_DeleteDevice;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue