mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:53:51 +00:00
small fixes
This commit is contained in:
parent
dbfc39468b
commit
6abb5d5f75
2 changed files with 5 additions and 5 deletions
|
@ -155,7 +155,7 @@ bool GraphicsPage::setupSDL()
|
||||||
{
|
{
|
||||||
int displays = SDL_GetNumVideoDisplays();
|
int displays = SDL_GetNumVideoDisplays();
|
||||||
|
|
||||||
if(displays < 0)
|
if (displays < 0)
|
||||||
{
|
{
|
||||||
qDebug() << "SDL_GetNumVideoDisplays failed: " << QString::fromStdString(SDL_GetError());
|
qDebug() << "SDL_GetNumVideoDisplays failed: " << QString::fromStdString(SDL_GetError());
|
||||||
return false;
|
return false;
|
||||||
|
@ -235,7 +235,7 @@ void GraphicsPage::saveSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
QRegExp screenRe(QString(".*(\\d+)"));
|
QRegExp screenRe(QString(".*(\\d+)"));
|
||||||
if(screenRe.exactMatch(screenComboBox->currentText())) {
|
if (screenRe.exactMatch(screenComboBox->currentText())) {
|
||||||
mGraphicsSettings.setValue(QString("Video/screen"), screenRe.cap(1));
|
mGraphicsSettings.setValue(QString("Video/screen"), screenRe.cap(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ QStringList GraphicsPage::getAvailableResolutions(int screen)
|
||||||
SDL_DisplayMode mode;
|
SDL_DisplayMode mode;
|
||||||
int modeIndex, modes = SDL_GetNumDisplayModes(screen);
|
int modeIndex, modes = SDL_GetNumDisplayModes(screen);
|
||||||
|
|
||||||
if(modes < 0)
|
if (modes < 0)
|
||||||
{
|
{
|
||||||
qDebug() << "SDL_GetNumDisplayModes failed: " << QString::fromStdString(SDL_GetError());
|
qDebug() << "SDL_GetNumDisplayModes failed: " << QString::fromStdString(SDL_GetError());
|
||||||
return result;
|
return result;
|
||||||
|
@ -351,7 +351,7 @@ void GraphicsPage::rendererChanged(const QString &renderer)
|
||||||
void GraphicsPage::screenChanged(const QString &screen)
|
void GraphicsPage::screenChanged(const QString &screen)
|
||||||
{
|
{
|
||||||
QRegExp screenRe(QString(".*(\\d+)"));
|
QRegExp screenRe(QString(".*(\\d+)"));
|
||||||
if(screenRe.exactMatch(screen)) {
|
if (screenRe.exactMatch(screen)) {
|
||||||
resolutionComboBox->clear();
|
resolutionComboBox->clear();
|
||||||
resolutionComboBox->addItems(getAvailableResolutions(screenRe.cap(1).toInt() - 1));
|
resolutionComboBox->addItems(getAvailableResolutions(screenRe.cap(1).toInt() - 1));
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ int main(int argc, char *argv[])
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||||
{
|
{
|
||||||
qDebug() << "SDL_Init failed: " << QString::fromStdString(SDL_GetError());
|
qDebug() << "SDL_Init failed: " << QString::fromStdString(SDL_GetError());
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
Loading…
Reference in a new issue