OUTPUT:
RETVAL
-char *
-video_video_driver_name( maxlen )
- int maxlen
+SV *
+video_video_driver_name( )
+
CODE:
- char* buffer = safemalloc(sizeof(char) * maxlen);
- char* str = SvPV( newSVpvn( buffer , maxlen), maxlen );
-
- RETVAL = (char* )SDL_VideoDriverName( str , maxlen);
- sv_2mortal(buffer);
- sv_2mortal(str);
-
+ char buffer[1024];
+ if ( SDL_VideoDriverName(buffer, 1024) != NULL )
+ {
+ RETVAL = newSVpv(buffer, 0);
+ }
+ else
+ XSRETURN_UNDEF;
OUTPUT:
RETVAL
use strict;
use SDL;
use SDL::Config;
-
+use Devel::Peek;
use Test::More;
plan ( tests => 6 );
isa_ok(SDL::Video::get_video_info(), 'SDL::VideoInfo', 'Checking if we get videoinfo ref back');
-pass 'This is your driver name: '.SDL::Video::video_driver_name(10);
+my $driver_name = SDL::Video::video_driver_name();
+
+pass 'This is your driver name: '.$driver_name;
+
+#Dump( $driver_name);
+
pass "Are we still alive?";
=skip