aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorq66 <quaker66@gmail.com>2012-04-03 13:59:02 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-04-07 23:23:00 +0300
commite8e73d37fb1834208dabac207593030b87db135a (patch)
tree9ef55ddc3616573285fb10d8f860b26a8fb9eb40 /src/main.cpp
parent2eec7885441932a572bec9cc0093af20ecfa04cf (diff)
downloadminetest-e8e73d37fb1834208dabac207593030b87db135a.tar.gz
minetest-e8e73d37fb1834208dabac207593030b87db135a.tar.bz2
minetest-e8e73d37fb1834208dabac207593030b87db135a.zip
Fullscreen, vsync, fullscreen_bpp and fsaa options in the config; fsaa is experimental atm, causes visible spaces between blocks.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8a6504194..8ec4c2632 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1213,10 +1213,16 @@ int main(int argc, char *argv[])
// Resolution selection
- bool fullscreen = false;
+ bool fullscreen = g_settings->getBool("fullscreen");
u16 screenW = g_settings->getU16("screenW");
u16 screenH = g_settings->getU16("screenH");
+ // bpp, fsaa, vsync
+
+ bool vsync = g_settings->getBool("vsync");
+ u16 bits = g_settings->getU16("fullscreen_bpp");
+ u16 fsaa = g_settings->getU16("fsaa");
+
// Determine driver
video::E_DRIVER_TYPE driverType;
@@ -1249,9 +1255,18 @@ int main(int argc, char *argv[])
MyEventReceiver receiver;
IrrlichtDevice *device;
- device = createDevice(driverType,
- core::dimension2d<u32>(screenW, screenH),
- 16, fullscreen, false, false, &receiver);
+
+ SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
+ params.DriverType = driverType;
+ params.WindowSize = core::dimension2d<u32>(screenW, screenH);
+ params.Bits = bits;
+ params.AntiAlias = fsaa;
+ params.Fullscreen = fullscreen;
+ params.Stencilbuffer = false;
+ params.Vsync = vsync;
+ params.EventReceiver = &receiver;
+
+ device = createDeviceEx(params);
if (device == 0)
return 1; // could not create selected driver.