Allow abbreviated strings to be used for driver names.
This allows people to use "pulse" with both SDL 1.2 and 2.0
This commit is contained in:
parent
6e147b2087
commit
7da5b83b75
2 changed files with 3 additions and 3 deletions
|
@ -437,7 +437,7 @@ SDL_VideoInit(const char *driver_name)
|
|||
}
|
||||
if (driver_name != NULL) {
|
||||
for (i = 0; bootstrap[i]; ++i) {
|
||||
if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) {
|
||||
if (SDL_strncasecmp(bootstrap[i]->name, driver_name, SDL_strlen(driver_name)) == 0) {
|
||||
video = bootstrap[i]->create(index);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue