mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Allow unloading video drivers.
This commit is contained in:
parent
6037babcbf
commit
754a10e274
1 changed files with 9 additions and 0 deletions
|
@ -386,6 +386,15 @@ bool SwitchMode(const char* mode)
|
|||
UpdateModes();
|
||||
char* drivername = NULL;
|
||||
if ( !ReadParamString(mode, "driver", &drivername, NULL) ) { return false; }
|
||||
if ( !strcmp(drivername, "none") )
|
||||
{
|
||||
DriverEntry* driverentry = CurrentDriverEntry();
|
||||
if ( !driverentry )
|
||||
return true;
|
||||
ShutDownDriver(driverentry->driver, driverentry->name);
|
||||
currentdrvid = SIZE_MAX;
|
||||
return true;
|
||||
}
|
||||
DriverEntry* drvent = GetDriverEntry(drivername);
|
||||
delete[] drivername;
|
||||
if ( !drvent ) { return false; }
|
||||
|
|
Loading…
Reference in a new issue