Which Function For Scaling/zooming?


notaz said:
Maybe it sill switches the resolution to 640x480 then? Run the game and on another terminal run "fbset -fb /dev/fb1" so that it prints current geometry. It's important that game sets the fb resolution to 320x240 and not something else.
SDL_SetVideoMode(320, 240, 16, SDL_SWSURFACE);
Is all that is used...
 
Last edited by a moderator:
sebt3 said:
notaz said:
Maybe it sill switches the resolution to 640x480 then? Run the game and on another terminal run "fbset -fb /dev/fb1" so that it prints current geometry. It's important that game sets the fb resolution to 320x240 and not something else.
SDL_SetVideoMode(320, 240, 16, SDL_SWSURFACE);
More tests, less results :(


1) I digged a bit more why it work as root and not as user :
I just :
sudo chmod 622 /dev/tty0
sudo chmod 666 /dev/tty2
to fix the permission...
And now I get :
ioctl(4, KDGKBMODE, 0xbed9853c) = -1 EINVAL (Invalid argument)
while as root, the result is 0. (file 4 is /dev/tty2)
:(

2) I tried to get fullscreen with root.
But I'm not even able to the vertical scalling i got yesterday night. So no scalling at all :(
My lastest test was using :
Code:
export SDL_FBDEV=/dev/fb1
ofbset -fb $SDL_FBDEV -pos 80 0 -size 640 480 -mem $((320*240*8)) -en 1
fbset -fb $SDL_FBDEV -g 320 240 320 480 16
sudo SDL_VIDEODRIVER=fbcon SDL_FBDEV=/dev/fb1 op_runfbapp ./Zelda3T_US
ofbset -fb /dev/fb1 -pos 0 0 -size 0 0 -mem 0 -en 0

The code only containt : SDL_SetVideoMode(320, 240, 16, SDL_SWSURFACE) (i tried to add fullscreen, without success) and if i try without the framebuffer stuff, I get a nice sdl window of 320*240.

Here is the result of "fbset" :

Code:
mode "800x384-73"
    # D: 36.001 MHz, H: 33.242 kHz, V: 72.581 Hz
    geometry 800 384 800 384 16
    timings 27777 68 214 39 34 1 1
    rgba 5/11,6/5,5/0,0/0
endmode
:blink:

Anyway, thanks for your input notaz.
 
Last edited by a moderator:
As nobody stepped up for so long hacked SDL is in the works now that should allow what you want. It will allow doublebuffering and scaling, but won't have any cool hardware acceleration things that I heard Paeryn was working on. Hope to have something for testing over the weekend.
 
as promised it's here:
http://www.gp32x.de/board/index.php?/topic/57506-improved-sdl

let me know where it crashes ;)
 
Last edited by a moderator:
Back
Top