RETVAL
int
-init_subsystem ( flags )
+init_sub_system ( flags )
Uint32 flags
CODE:
RETVAL = SDL_InitSubSystem(flags);
RETVAL
void
-quit_subsystem ( flags )
+quit_sub_system ( flags )
Uint32 flags
CODE:
SDL_QuitSubSystem(flags);
use SDL::Video;
use Test::More;
-plan ( tests => 11 );
+plan ( tests => 13 );
my @done =qw/
init
quit
linked_version
putenv
getenv
+ init_sub_system
+ quit_sub_system
/;
use_ok( 'SDL' );
isnt( SDL::get_error(), '', '[get_error] got error '.SDL::get_error() );
+SDL::quit_sub_system(SDL_INIT_VIDEO);
+isnt( SDL::was_init( SDL_INIT_VIDEO ), SDL_INIT_VIDEO, '[was_init] recognizes turned off sub system');
+SDL::init_sub_system(SDL_INIT_VIDEO);
+is( SDL::was_init( SDL_INIT_VIDEO ), SDL_INIT_VIDEO, '[was_init] recognizes turned back on sub system');
+
SDL::quit(); pass '[quit] SDL quit with out segfaults or errors';
isnt( SDL::was_init( 0 ), SDL_INIT_VIDEO, '[was_init] recognizes turned off flags');
is(SDL::getenv('PERLSDL_TEST'), 'hello', '[getenv] returns hello');
my @left = qw/
- init_sub_system
- quit_sub_system
set_error
error
clear_error