video_switch

Posted By: Excessus

video_switch - 03/16/04 05:37

some time ago when i chose the resolution i chose 1280x980, i made a panel that covers the whole screen, but i didnt saw the down side, so i made it smaller in height and it looked good. later i realized it was hidden under the windows taskbar, so i decided to use fullscreenmode with the large panel.
first i tried to say(in the beginning of my script):
var video_screen = 1;
it has no result. then i tried:
video_switch(0,0,1);
it seems to switch to fullscreen(the screen becomes black for a sec and i hear my monitor "click") but then it switches to WED again and when i click it again in the taskbar it becomes black again for a sec or so and then it switches back to WED.

whats wrong?
Posted By: jono

Re: video_switch - 03/18/04 20:12

sorry, I can't test it, but does it generally work to give 0,0,1 ?!
The 2nd value should either 16 or 32 , shouldn't it ?!
Posted By: Christoph_B

Re: video_switch - 03/18/04 23:27

its "(resolution, color_depth, fullscreen/windowmode)"
e.g.: for a resolution of 1280x960, 16bit and fullscreen

switch_video (9, 16, 1);

the command is "switch_video", but not "video_switch".
or maybe your screen doesnīt support a resolution of 1280x960.

Posted By: Excessus

Re: video_switch - 03/19/04 00:46

ok, i got it to work now, but i have another question, how can i detect the windows resolution setting, because if i have 1280x960 and i make my view larger than that, the window will become minimized, and when my view is to small, the places in the window that are not covered with the view are flickering between black and WED(the program "under" A6 engine)
ofcourse i can set the resolution right for my comp, but others might have problems with it.

BTW do i have to make new panels for other resolutions or can i scale them at runtime? and how can i make sure they are placed right?
Posted By: Christoph_B

Re: video_switch - 03/19/04 02:50

i think a6 isnīt yet able to scale/load panels at runtime.
watch the "forecast" site for more information: http://www.conitec.net/forecast.htm
Posted By: Excessus

Re: video_switch - 03/20/04 02:18

and what about checking for the windows resolution setting?
is it even possible in script? or do i need SDK?
Posted By: Fudgit

Re: video_switch - 04/08/04 12:02

I don't know if you still need to know this, but you can get the screen resolution inside a script using these two variables:

screen_size.x
screen_size.y

These will tell you how many pixels in width and height your screen is (which is the resolution).
Posted By: Anonymous

Re: video_switch - 04/09/04 23:07

I don't think that the variables you mentioned can access the Windows resolution settings / 3D video card driver(s).

To access the Windows/3D Card Configuration you will need to use an A5 SDK to access the Win32 API functions and gather the resolution and color depth from Windows at which resolution/color depth you're on.. Then, you can compile the code as an A5 DLL (be sure you link your A5 header, C++, and library files (lib) if 3DGS SDK comes with a lib file but I don't have an SDK)) and in C-Script, you create a DLL handle, open your newly created DLL, and call the function to get the resolution/color depth information from Windows.

I have little or no knowledge of C++ so I can't help you out with it but I hope this helps anyway. I only have experience with C# which is part of .net Framework but just to let you know (probably as a reminder), SDK doesn't support C#.
Posted By: myrlyn68

Re: video_switch - 04/09/04 23:28

Or...

You could use the new sys_metrics command and avoid the DLL...

The screen info from above will work as well.
Posted By: Excessus

Re: video_switch - 04/10/04 01:11

@myrlyn68

i checked the manual for sys_metrics, but didnt find anything. Is it a C-script command? please clarify that, thx
Posted By: myrlyn68

Re: video_switch - 04/10/04 01:23

See the Beta.txt
© 2024 lite-C Forums