Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 909484 Details for
Bug 981243
SDLx::App->new() does not work on frame buffer console
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Reproducer
test (text/plain), 1.61 KB, created by
Petr Pisar
on 2014-06-17 08:59:35 UTC
(
hide
)
Description:
Reproducer
Filename:
MIME Type:
Creator:
Petr Pisar
Created:
2014-06-17 08:59:35 UTC
Size:
1.61 KB
patch
obsolete
>#!/usr/bin/perl >use strict; >use warnings; > >use SDL; >use Getopt::Long; > >my $width; >my $height; >my $depth; > >sub auto { > my $directory = '/sys/class/graphics/fb0/'; > my $file = $directory . '/modes'; > if (-e $file) { > my ($fh, $modes); > open($fh, '<', $file) and $modes = <$fh>; > close $fh; > if (defined $modes and $modes =~ /(\d+)x(\d+)/) { > ($width, $height) = ($1, $2); > } > } > $file = $directory . '/bits_per_pixel'; > if (-e $file) { > my ($fh, $bits); > open($fh, '<', $file) and $bits = <$fh>; > close $fh; > if (defined $bits) { > chomp $bits; > $depth = $bits; > } > } >} > >GetOptions('auto' => \&auto, 'width=i' => \$width, 'height=i' => \$height, > 'depth=i' => \$depth) or die "Could not parse options"; >printf "Requested video will be %sx%s at %s bps\n", > $width // 'undef', $height // 'undef', $depth // 'undef'; >print "Use --auto, --width, --height, --depth options to override.\n"; > >{ > print "Testing plain SDL:\n"; > if (SDL::init(SDL_INIT_VIDEO)) { > die "Could not initialize SDL with video"; > } > > use SDL::Video; > my $surface = SDL::Video::set_video_mode($width, $height, $depth, 0) or > die SDL::get_error(); > print "Plain SDL::Video::set_video_mode() is Ok.\n"; > > print "Width is ", $surface->w, "\n"; >} > >{ > print "Testing SDLx::App:\n"; > use SDLx::App; > my $app = SDLx::App->new(width => $width, height => $height, > depth => $depth) or > die "SDL::App::new() failed"; > print "SDL::App::new() is Ok.\n"; > > print "Width is ", $app->width, "\n"; >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 981243
:
768694
|
909426
|
909443
| 909484 |
909487