Is there a function in SDL that will tell me if a mouse is plugged in? The only thing I could find was actual mouse code. Anyone know if there's such a function?
I haven't touched mouse SDL code that much but If I recall well there was one, anyway the KOS init tells what peripherals are connected through console
Enable/disable keyboard emulation. By default, emulation is enabled when dreamcast keyboard not present.
This function needs SDL_OpenJoystick call for working.
SDL_DC_EmulateMouse(SDL_bool value)
Enable/disable mouse emulation using analog pad and buttons X & Y (only for first joystick found). By default, emulation is enabled when dreamcast mouse not present.
This function needs SDL_OpenJoystick call for working.
if (SDL_NumJoysticks() >= 1) {
joystick = SDL_JoystickOpen(0);
SDL_JoystickEventState(SDL_ENABLE);
}
SDL_ShowCursor(0);
by this way I can use the pad like the mouse, you wouldn't need to check if the mouse is connected, will be emulated by sdl and the pad. Anyway you can see in te code :
Checking this I think so you should know where the mouse is connected, in case of, but this routine what does is to emulate itself in case of non exist.
puede ver todos los hilos de discusión en este foro. puede iniciar un nuevo hilo de discusión en este foro. no puede responder en este hilo de discusión. no puede empezar en una encuesta en este foro. puede cargar archivos adjuntos en este foro. no puede descargar archivos adjuntos en este foro.