File: 1.pl

package info (click to toggle)
libsdl-perl 2.548-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,972 kB
  • sloc: perl: 13,985; ansic: 583; makefile: 35
file content (27 lines) | stat: -rw-r--r-- 415 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use warnings;

use SDL;
use SDL::Rect;
use SDL::Event;
use SDL::Video;
use SDL::Events;
use SDL::Surface;

SDL::init(SDL_INIT_VIDEO);

my $display = SDL::Video::set_video_mode( 320, 320, 32, SDL_SWSURFACE );

my $quit = 0;
while ( !$quit ) {
	my $event = SDL::Event->new();

	SDL::Events::pump_events();

	while ( SDL::Events::poll_event($event) ) {

		$quit = 1 if ( $event->type == SDL_QUIT );

	}

}