UbuntuでSDL MESS/MAMEその4

まずはUbuntuでMESS/MAMEをビルドします

$ mkdir mess

$ cd mess

$ unzip ../mess0144s.zip

$ make DEBUG=1 SYMBOLS=1 TARGET=mess SDL_INSTALL_ROOT=/usr/local

いくつかのエラーが出るの修正します

Compiling src/osd/sdl/input.c...

src/osd/sdl/input.c: 関数 ‘void sdlinput_register_keyboards(running_machine&)’ 内:

src/osd/sdl/input.c:1016:70: エラー: ‘SDL_GetNumKeyboards’ was not declared in this scope

src/osd/sdl/input.c:1020:95: エラー: ‘SDL_GetKeyboard’ was not declared in this scope

src/osd/sdl/input.c:1020:97: エラー: ‘SDL_GetKeyboardName’ was not declared in this scope

src/osd/sdl/input.c: 関数 ‘void sdlinput_poll(running_machine&)’ 内:

src/osd/sdl/input.c:1309:87: エラー: ‘SDL_KeyboardEvent’ has no member named ‘which’

src/osd/sdl/input.c:1317:87: エラー: ‘SDL_KeyboardEvent’ has no member named ‘which’

src/osd/sdl/input.c:1392:83: エラー: ‘SDL_MouseButtonEvent’ has no member named ‘which’

src/osd/sdl/input.c:1425:83: エラー: ‘SDL_MouseButtonEvent’ has no member named ‘which’

src/osd/sdl/input.c:1441:83: エラー: ‘SDL_MouseMotionEvent’ has no member named ‘which’

make: *** [obj/sdl/messd/osd/sdl/input.o] エラー 1

1016c1016
< 	for (physical_keyboard = 0; physical_keyboard < SDL_GetNumKeyboards(); physical_keyboard++)
---
> 	for (physical_keyboard = 0; physical_keyboard < 1; physical_keyboard++)
1018,1020c1018,1020
< 		//char defname[90];
< 		//snprintf(defname, sizeof(defname)-1, "Keyboard #%d", physical_keyboard + 1);
< 		char *defname = remove_spaces(machine, SDL_GetKeyboardName(SDL_GetKeyboard(physical_keyboard) ));
---
> 		char defname[90];
> 		snprintf(defname, sizeof(defname)-1, "Keyboard #%d", physical_keyboard + 1);
> 		//char *defname = remove_spaces(machine, SDL_GetKeyboardName(SDL_GetKeyboard(physical_keyboard) ));
1309c1309
< 			devinfo = generic_device_find_index( keyboard_list, keyboard_map.logical[event.key.which]);
---
> 			devinfo = generic_device_find_index( keyboard_list, keyboard_map.logical[0]);//event.key.which]);
1317c1317
< 			devinfo = generic_device_find_index( keyboard_list, keyboard_map.logical[event.key.which]);
---
> 			devinfo = generic_device_find_index( keyboard_list, keyboard_map.logical[0]);//event.key.which]);
1392c1392
< 			devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.button.which]);
---
> 			devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]);//event.button.which]);
1425c1425
< 			devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.button.which]);
---
> 			devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]);//event.button.which]);
1441c1441
< 			devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.motion.which]);
---
> 			devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]);//event.motion.which]);