aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-26 05:07:59 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-02-26 05:07:59 +0000
commit318eae8dadf86fe5b64697775ebea6ad7f748c96 (patch)
treed7c56a3575d616ebd7824f82b81f9c71dc04a8db /Game/Code/Classes
parent27b7ee9941234aacc46d7bbc8aaa049e2ed81ce7 (diff)
downloadusdx-318eae8dadf86fe5b64697775ebea6ad7f748c96.tar.gz
usdx-318eae8dadf86fe5b64697775ebea6ad7f748c96.tar.xz
usdx-318eae8dadf86fe5b64697775ebea6ad7f748c96.zip
Implemented resizable windowed mode..
thanks for the idea rheo git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@887 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UGraphic.pas4
-rw-r--r--Game/Code/Classes/UMain.pas9
2 files changed, 10 insertions, 3 deletions
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index 38ae707c..dfcec7cc 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -612,12 +612,12 @@ begin
if (Ini.FullScreen = 0) and (Not Params.FullScreen) then
begin
Log.LogStatus('SDL_SetVideoMode', 'Set Video Mode... Windowed');
- screen := SDL_SetVideoMode(W, H, (Depth+1) * 16, SDL_OPENGL)
+ screen := SDL_SetVideoMode(W, H, (Depth+1) * 16, SDL_OPENGL or SDL_RESIZABLE)
end
else
begin
Log.LogStatus('SDL_SetVideoMode', 'Set Video Mode... Full Screen');
- screen := SDL_SetVideoMode(W, H, (Depth+1) * 16, SDL_OPENGL or SDL_FULLSCREEN);
+ screen := SDL_SetVideoMode(W, H, (Depth+1) * 16, SDL_OPENGL or SDL_FULLSCREEN );
SDL_ShowCursor(0);
end;
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index b6e151eb..6f336c50 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -443,7 +443,14 @@ Begin
Begin
//
End;
- End; // With}
+ End; // With}
+ SDL_VIDEORESIZE:
+ begin
+ ScreenW := Event.resize.w;
+ ScreenH := Event.resize.h;
+
+ screen := SDL_SetVideoMode(ScreenW, ScreenH, (Ini.Depth+1) * 16, SDL_OPENGL or SDL_RESIZABLE);
+ end;
SDL_KEYDOWN:
begin
// remap the "keypad enter" key to the "standard enter" key