aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/defaultsettings.cpp4
-rw-r--r--src/main.cpp23
2 files changed, 23 insertions, 4 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 67f2e4055..ab6866cec 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -74,6 +74,10 @@ void set_default_settings(Settings *settings)
settings->setDefault("viewing_range_nodes_min", "35");
settings->setDefault("screenW", "800");
settings->setDefault("screenH", "600");
+ settings->setDefault("fullscreen", "false");
+ settings->setDefault("fullscreen_bpp", "24");
+ settings->setDefault("fsaa", "0");
+ settings->setDefault("vsync", "false");
settings->setDefault("address", "");
settings->setDefault("random_input", "false");
settings->setDefault("client_unload_unused_data_timeout", "600");
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.