aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8.1/include/driverChoice.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-01-13 19:47:58 +1000
committerDavid Walter Seikel2014-01-13 19:47:58 +1000
commitf9158592e1478b2013afc7041d9ed041cf2d2f4a (patch)
treeb16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8.1/include/driverChoice.h
parentLibraries readme updated with change markers and more of the Irrlicht changes. (diff)
downloadSledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip
SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz
SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2
SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8.1/include/driverChoice.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/include/driverChoice.h b/libraries/irrlicht-1.8.1/include/driverChoice.h
new file mode 100644
index 0000000..d418ba8
--- /dev/null
+++ b/libraries/irrlicht-1.8.1/include/driverChoice.h
@@ -0,0 +1,45 @@
1// Copyright (C) 2009-2012 Christian Stehno
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __E_DRIVER_CHOICE_H_INCLUDED__
6#define __E_DRIVER_CHOICE_H_INCLUDED__
7
8#include <iostream>
9#include <cstdio>
10#include "EDriverTypes.h"
11#include "irrTypes.h"
12#include "IrrlichtDevice.h"
13
14namespace irr
15{
16
17//! ask user for driver
18static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=true)
19{
20 const char* const names[] = {"NullDriver","Software Renderer","Burning's Video","Direct3D 8.1","Direct3D 9.0c","OpenGL 1.x/2.x/3.x"};
21 printf("Please select the driver you want:\n");
22 irr::u32 i=0;
23 for (i=irr::video::EDT_COUNT; i>0; --i)
24 {
25 if (allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1))))
26 printf(" (%c) %s\n", 'a'+irr::video::EDT_COUNT-i, names[i-1]);
27 }
28
29 char c;
30 std::cin >> c;
31 c = irr::video::EDT_COUNT+'a'-c;
32
33 for (i=irr::video::EDT_COUNT; i>0; --i)
34 {
35 if (!(allDrivers || (irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1)))))
36 --c;
37 if ((char)i==c)
38 return irr::video::E_DRIVER_TYPE(i-1);
39 }
40 return irr::video::EDT_COUNT;
41}
42
43} // end namespace irr
44
45#endif