mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-02 12:24:15 +00:00
(svn r16702) -Change: don't implicitly fall back to the null/dedicated (video) drivers, but show an error message that no driver could be found. You can still explicitly start the null drivers thought.
This commit is contained in:
parent
b7c8026a3d
commit
65191b077d
@ -61,8 +61,8 @@ Driver *DriverFactoryBase::SelectDriver(const char *name, Driver::Type type)
|
||||
if (GetDrivers().size() == 0) return NULL;
|
||||
|
||||
if (StrEmpty(name)) {
|
||||
/* Probe for this driver */
|
||||
for (int priority = 10; priority >= 0; priority--) {
|
||||
/* Probe for this driver, but do not fall back to dedicated/null! */
|
||||
for (int priority = 10; priority > 0; priority--) {
|
||||
Drivers::iterator it = GetDrivers().begin();
|
||||
for (; it != GetDrivers().end(); ++it) {
|
||||
DriverFactoryBase *d = (*it).second;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
|
||||
class FVideoDriver_Null: public VideoDriverFactory<FVideoDriver_Null> {
|
||||
public:
|
||||
static const int priority = 1;
|
||||
static const int priority = 0;
|
||||
/* virtual */ const char *GetName() { return "null"; }
|
||||
/* virtual */ const char *GetDescription() { return "Null Video Driver"; }
|
||||
/* virtual */ Driver *CreateInstance() { return new VideoDriver_Null(); }
|
||||
|
Loading…
Reference in New Issue
Block a user