Sdl only support fullscreen on embedded platform?

Hi

there is a test application named testbitmap in SDL’s /test folder.
In the source file testbitmap.c ,there is a section which sets the video
mode:

/* Set 640x480 video mode */
if ( (screen=SDL_SetVideoMode(640,480,video_bpp,videoflags)) == NULL )
{
fprintf(stderr, “Couldn’t set 640x480x%d video mode: %s\n”,
video_bpp, SDL_GetError());
quit(2);
}

I cross compile this application and run it on a 640x480 LCD. It works well
with fullscreen scale. Then I wanted to test the non-fullscreen mode to see
if sdl application can work well with framebuffer. A change was made to the
video set section like:
(screen=SDL_SetVideoMode(320,240,video_bpp,videoflags)
The screen turns black as long as the changed application runs on board.

on desktop platform I could set the video mode in any way I want, so I don’t
know why this application could only be set exactly as the same size as the
LCD screen on board.

anyone could help?

sorry for thr poor English.

I cross compile this application and run it on a 640x480 LCD. It works
well with fullscreen scale. Then I wanted to test the non-fullscreen
mode to see if sdl application can work well with framebuffer. A
change was made to the video set section like:
(screen=SDL_SetVideoMode(320,240,video_bpp,videoflags)
The screen turns black as long as the changed application runs on board.

I assume this is Linux, using the fbcon driver.

Always use fullscreen on an embedded device that doesn’t have a window
manager…if you set a 320x240 fullscreen mode on hardware that only
does 640x480, SDL will make a 320x240 window in the center of the
640x480 display, and put a black border around it.

Arguably, the fbcon target should just return NULL from
SDL_SetVideoMode() if you don’t request SDL_FULLSCREEN or just force it
to fullscreen. I’ll have to check that.

–ryan.

SDL-announce)"

I cross compile this application and run it on a 640x480 LCD. It works
well with fullscreen scale. Then I wanted to test the non-fullscreen
mode to see if sdl application can work well with framebuffer. A
change was made to the video set section like:
(screen=SDL_SetVideoMode(320,240,video_bpp,videoflags)
The screen turns black as long as the changed application runs on
board.

I assume this is Linux, using the fbcon driver.

Always use fullscreen on an embedded device that doesn’t have a window
manager…if you set a 320x240 fullscreen mode on hardware that only
does 640x480, SDL will make a 320x240 window in the center of the
640x480 display, and put a black border around it.

Arguably, the fbcon target should just return NULL from
SDL_SetVideoMode() if you don’t request SDL_FULLSCREEN or just force it
to fullscreen. I’ll have to check that.

I have the same problem.
If I use SDL to play video, SDL will put a black border around the LCD.
Then I can not control the display of video.
Have any method to solve the problem?
Thanks in advance and apologize to my poor english.>From: “Ryan C. Gordon”

Reply-To: "A list for developers using the SDL library. (includes
To: "A list for developers using the SDL library. (includes SDL-announce)"
Subject: Re: [SDL] sdl only support fullscreen on embedded platform?
Date: Wed, 28 Feb 2007 15:32:50 -0500


?? 2GB ??? Windows Live Mail ???
http://ideas.live.com/programpage.aspx?versionid=5d21c51a-b161-4314-9b0e-4911fb2b2e6d

If I use SDL to play video, SDL will put a black border around the LCD.
Then I can not control the display of video.
Have any method to solve the problem?

There’s no way to get rid of the border, short of choosing a bigger
resolution…the border is there because the hardware can’t offer the
resolution you want, so SDL is trying to accommodate you anyhow by
choosing the closest hardware resolution and putting your SDL_Surface in
the middle of it.

If you want to get rid of the black border, pick a resolution that the
LCD supports (SDL_ListModes() can usually determine these for you).

–ryan.

Hi

Ryan wrote:

I cross compile this application and run it on a 640x480 LCD. It works
well with fullscreen scale. Then I wanted to test the non-fullscreen
mode to see if sdl application can work well with framebuffer. A
change was made to the video set section like:
(screen=SDL_SetVideoMode(320,240,video_bpp,videoflags)
The screen turns black as long as the changed application runs on board.

I assume this is Linux, using the fbcon driver.

Yes,it is.

Always use fullscreen on an embedded device that doesn’t have a window

manager…if you set a 320x240 fullscreen mode on hardware that only
does 640x480, SDL will make a 320x240 window in the center of the
640x480 display, and put a black border around it.

Right.
If you try the test applications such as testbitmap, testwin…on desktop
platform
with changes to SDL_SetVideoMode as you like (you can even set it as
176x144,I’ve tried that), and the SDL will show the pic or video right in
the center of the CRT. It really works.

But on my S3C2410 arm9 board, things get weird-----I have to set the ‘x’ and
’y’ in the same size as my actual LCD, which means all SDL-based
applications only support fullscreen now…
I don’t want to use the fullscreen mode…

Arguably, the fbcon target should just return NULL from

SDL_SetVideoMode() if you don’t request SDL_FULLSCREEN or just force it
to fullscreen. I’ll have to check that.

I will check the SDL_SetVideoMode() too.
thank you for your reply.–
Liu Bo
Sichuan University

Hi

ruihong wrote:

I cross compile this application and run it on a 640x480 LCD. It works
well with fullscreen scale. Then I wanted to test the non-fullscreen
mode to see if sdl application can work well with framebuffer. A
change was made to the video set section like:
(screen=SDL_SetVideoMode(320,240,video_bpp,videoflags)
The screen turns black as long as the changed application runs on
board.

I assume this is Linux, using the fbcon driver.

Always use fullscreen on an embedded device that doesn’t have a window
manager…if you set a 320x240 fullscreen mode on hardware that only
does 640x480, SDL will make a 320x240 window in the center of the
640x480 display, and put a black border around it.

Arguably, the fbcon target should just return NULL from
SDL_SetVideoMode() if you don’t request SDL_FULLSCREEN or just force it
to fullscreen. I’ll have to check that.

I have the same problem.
If I use SDL to play video, SDL will put a black border around the LCD.
Then I can not control the display of video.
Have any method to solve the problem?
Thanks in advance and apologize to my poor english.

thanks for the reply.
what do you mean by “I can not control the display of video”?
now you can see the video or not?
what are the ‘x’ and ‘y’ value of your video file?–
platinum.liu
Sichuan University

Hi~ Bo Liu

What I do is that I use ffplay to display my video.
And ffplay use the SDL library.
When I use ffplay to play video, the widget of the ffplay can’t be shown.
So, I can’t control the display while the video file is playing.

now you can see the video or not?

Yes, I can see the video. But cant control it.
Before, I want to build SDL + qtopia to make the widget show.
But I always failed.
Anyone kowns how to make the SDK + qtopia work?

Thaks for your replay : )>

thanks for the reply.
what do you mean by “I can not control the display of video”?
now you can see the video or not?
what are the ‘x’ and ‘y’ value of your video file?


platinum.liu
Sichuan University


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Windows Live Messenger ???
http://get.live.com/messenger/overview

hello,

I want to build ffplay on the device (architecture is arm).
In my device, the gui environment is qt-embedded.
I hope that ffplay runs by SDL with qtopia video driver,
but when I run it on the device, it doesn’t work!

I trace the code, and it stop at the code :
SDL_qtopia_main.cc :
app = new QPEApplication(argc, argv);

when the program runs to the code, it will stop!
Does anyone know what to do?
If I don’t use qtopia as the SDL video driver, I can’t control the video
while playing.

Thanks in advance,and sorry for my poor English._________________________________________________________________
?? 2GB ??? Windows Live Mail ???
http://ideas.live.com/programpage.aspx?versionid=5d21c51a-b161-4314-9b0e-4911fb2b2e6d

Hi

I assume this is Linux, using the fbcon driver.

Always use fullscreen on an embedded device that doesn’t have a window
manager…if you set a 320x240 fullscreen mode on hardware that only
does 640x480, SDL will make a 320x240 window in the center of the
640x480 display, and put a black border around it.

Arguably, the fbcon target should just return NULL from
SDL_SetVideoMode() if you don’t request SDL_FULLSCREEN or just force it
to fullscreen. I’ll have to check that.

–ryan.

I have tested the application again. SDL_SetVideoMode() does not return NULL
no matter how I set the ‘x’ and ‘y’. The application is running well BUT
screen turns white for about 3 seconds and then turns black…

platinum.liu
Sichuan University