comparison render_sdl.c @ 1596:437e80a700aa

Initial heuristics for detecting controller types and showing different labels in UI. Modified controller settings view to first display a list of controllers, only showing mapping after selecting controller
author Michael Pavone <pavone@retrodev.com>
date Sun, 22 Jul 2018 17:48:46 -0700
parents 24508cb54f87
children 7f39c40b4b25
comparison
equal deleted inserted replaced
1595:360d5bab199f 1596:437e80a700aa
803 } 803 }
804 } 804 }
805 return -1; 805 return -1;
806 } 806 }
807 807
808 SDL_Joystick *render_get_joystick(int index)
809 {
810 if (index >= MAX_JOYSTICKS) {
811 return NULL;
812 }
813 return joysticks[index];
814 }
815
816 SDL_GameController *render_get_controller(int index)
817 {
818 if (index >= MAX_JOYSTICKS) {
819 return NULL;
820 }
821 return SDL_GameControllerOpen(joystick_sdl_index[index]);
822 }
823
808 static uint32_t overscan_top[NUM_VID_STD] = {2, 21}; 824 static uint32_t overscan_top[NUM_VID_STD] = {2, 21};
809 static uint32_t overscan_bot[NUM_VID_STD] = {1, 17}; 825 static uint32_t overscan_bot[NUM_VID_STD] = {1, 17};
810 static uint32_t overscan_left[NUM_VID_STD] = {13, 13}; 826 static uint32_t overscan_left[NUM_VID_STD] = {13, 13};
811 static uint32_t overscan_right[NUM_VID_STD] = {14, 14}; 827 static uint32_t overscan_right[NUM_VID_STD] = {14, 14};
812 static vid_std video_standard = VID_NTSC; 828 static vid_std video_standard = VID_NTSC;