static void init_scalers( void ) { scaler_register_clear(); scaler_register( SCALER_NORMAL ); scaler_register( SCALER_DOUBLESIZE ); scaler_register( SCALER_TRIPLESIZE ); scaler_register( SCALER_2XSAI ); scaler_register( SCALER_SUPER2XSAI ); scaler_register( SCALER_SUPEREAGLE ); scaler_register( SCALER_ADVMAME2X ); scaler_register( SCALER_ADVMAME3X ); scaler_register( SCALER_DOTMATRIX ); scaler_register( SCALER_PALTV ); scaler_register( SCALER_HQ2X ); if( machine_current->timex ) { scaler_register( SCALER_HALF ); scaler_register( SCALER_HALFSKIP ); scaler_register( SCALER_TIMEXTV ); scaler_register( SCALER_TIMEX1_5X ); } else { scaler_register( SCALER_TV2X ); scaler_register( SCALER_TV3X ); scaler_register( SCALER_PALTV2X ); scaler_register( SCALER_PALTV3X ); scaler_register( SCALER_HQ3X ); } if( scaler_is_supported( current_scaler ) ) { scaler_select_scaler( current_scaler ); } else { scaler_select_scaler( SCALER_NORMAL ); } }
static void register_scalers( int force_scaler ) { scaler_type scaler; scaler_register_clear(); if( machine_current->timex ) { scaler_register( SCALER_HALF ); scaler_register( SCALER_HALFSKIP ); scaler_register( SCALER_TIMEXTV ); scaler_register( SCALER_TIMEX1_5X ); } else { scaler_register( SCALER_DOUBLESIZE ); scaler_register( SCALER_TRIPLESIZE ); scaler_register( SCALER_TV2X ); scaler_register( SCALER_TV3X ); scaler_register( SCALER_PALTV2X ); scaler_register( SCALER_PALTV3X ); scaler_register( SCALER_HQ2X ); scaler_register( SCALER_HQ3X ); scaler_register( SCALER_ADVMAME2X ); scaler_register( SCALER_ADVMAME3X ); scaler_register( SCALER_2XSAI ); scaler_register( SCALER_SUPER2XSAI ); scaler_register( SCALER_SUPEREAGLE ); scaler_register( SCALER_DOTMATRIX ); } scaler_register( SCALER_NORMAL ); scaler_register( SCALER_PALTV ); scaler = scaler_is_supported( current_scaler ) ? current_scaler : SCALER_NORMAL; if( force_scaler ) { switch( gtkdisplay_current_size ) { case 1: scaler = machine_current->timex ? SCALER_HALF : SCALER_NORMAL; break; case 2: scaler = machine_current->timex ? SCALER_NORMAL : SCALER_DOUBLESIZE; break; case 3: scaler = machine_current->timex ? SCALER_TIMEX1_5X : SCALER_TRIPLESIZE; break; } } scaler_select_scaler( scaler ); }
int uidisplay_init( int width, int height ) { int error; scaler_register_clear(); image_width = width; image_height = height; image_scale = width / DISPLAY_ASPECT_WIDTH; error = register_scalers(); if( error ) return error; display_ui_initialised = 1; display_refresh_all(); return 0; }
static int register_scalers( void ) { scaler_register_clear(); switch( hires + 1 ) { case 1: switch( image_scale ) { case 1: scaler_register( SCALER_NORMAL ); scaler_select_scaler( SCALER_NORMAL ); return 0; case 2: scaler_register( SCALER_HALFSKIP ); scaler_select_scaler( SCALER_HALFSKIP ); return 0; } case 2: switch( image_scale ) { case 1: scaler_register( SCALER_DOUBLESIZE ); scaler_register( SCALER_ADVMAME2X ); scaler_select_scaler( SCALER_DOUBLESIZE ); return 0; case 2: scaler_register( SCALER_NORMAL ); scaler_select_scaler( SCALER_NORMAL ); return 0; } } ui_error( UI_ERROR_ERROR, "Unknown display size/image size %d/%d", hires + 1, image_scale ); return 1; }
static int register_scalers( void ) { scaler_register_clear(); switch( wiidisplay_current_size ) { case 1: switch( image_scale ) { case 1: scaler_register( SCALER_NORMAL ); scaler_register( SCALER_PALTV ); if( !scaler_is_supported( current_scaler ) ) scaler_select_scaler( SCALER_NORMAL ); return 0; case 2: scaler_register( SCALER_HALF ); scaler_register( SCALER_HALFSKIP ); if( !scaler_is_supported( current_scaler ) ) scaler_select_scaler( SCALER_HALF ); return 0; } case 2: switch( image_scale ) { case 1: scaler_register( SCALER_DOUBLESIZE ); scaler_register( SCALER_TV2X ); scaler_register( SCALER_ADVMAME2X ); scaler_register( SCALER_2XSAI ); scaler_register( SCALER_SUPER2XSAI ); scaler_register( SCALER_SUPEREAGLE ); scaler_register( SCALER_DOTMATRIX ); scaler_register( SCALER_PALTV2X ); scaler_register( SCALER_HQ2X ); if( !scaler_is_supported( current_scaler ) ) scaler_select_scaler( SCALER_DOUBLESIZE ); return 0; case 2: scaler_register( SCALER_NORMAL ); scaler_register( SCALER_TIMEXTV ); scaler_register( SCALER_PALTV ); if( !scaler_is_supported( current_scaler ) ) scaler_select_scaler( SCALER_NORMAL ); return 0; } case 3: switch( image_scale ) { case 1: scaler_register( SCALER_TRIPLESIZE ); scaler_register( SCALER_TV3X ); scaler_register( SCALER_ADVMAME3X ); scaler_register( SCALER_PALTV3X ); scaler_register( SCALER_HQ3X ); if( !scaler_is_supported( current_scaler ) ) scaler_select_scaler( SCALER_TRIPLESIZE ); return 0; case 2: scaler_register( SCALER_TIMEX1_5X ); if( !scaler_is_supported( current_scaler ) ) scaler_select_scaler( SCALER_TIMEX1_5X ); return 0; } } ui_error( UI_ERROR_ERROR, "Unknown display size/image size %d/%d", wiidisplay_current_size, image_scale ); return 1; }