* Changes the Display Height option. * @param action Pointer to an action. */
| 413 | * @param action Pointer to an action. |
| 414 | */ |
| 415 | void OptionsVideoState::txtDisplayHeightChange(Action *) |
| 416 | { |
| 417 | std::wstringstream ss; |
| 418 | int height = 0; |
| 419 | ss << std::dec << _txtDisplayHeight->getText(); |
| 420 | ss >> std::dec >> height; |
| 421 | Options::newDisplayHeight = height; |
| 422 | // Update resolution mode |
| 423 | if (_res != (SDL_Rect**)-1 && _res != (SDL_Rect**)0) |
| 424 | { |
| 425 | int i; |
| 426 | _resCurrent = -1; |
| 427 | for (i = 0; _res[i]; ++i) |
| 428 | { |
| 429 | if (_resCurrent == -1 && |
| 430 | ((_res[i]->w == Options::newDisplayWidth && _res[i]->h <= Options::newDisplayHeight) || _res[i]->w < Options::newDisplayWidth)) |
| 431 | { |
| 432 | _resCurrent = i; |
| 433 | } |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | /** |
| 439 | * Changes the Language option. |