| 19 | GameConfiguration g_Configuration; |
| 20 | |
| 21 | void LoadResolutionsInCombobox(HWND handle) |
| 22 | { |
| 23 | HWND cbHandle = GetDlgItem(handle, IDC_RESOLUTION); |
| 24 | |
| 25 | SendMessageA(cbHandle, CB_RESETCONTENT, 0, 0); |
| 26 | |
| 27 | for (int i = 0; i < g_Configuration.SupportedScreenResolutions.size(); i++) |
| 28 | { |
| 29 | auto screenResolution = g_Configuration.SupportedScreenResolutions[i]; |
| 30 | |
| 31 | char* str = (char*)malloc(255); |
| 32 | ZeroMemory(str, 255); |
| 33 | sprintf(str, "%d x %d", screenResolution.x, screenResolution.y); |
| 34 | |
| 35 | SendMessageA(cbHandle, CB_ADDSTRING, i, (LPARAM)(str)); |
| 36 | |
| 37 | free(str); |
| 38 | } |
| 39 | |
| 40 | SendMessageA(cbHandle, CB_SETCURSEL, 0, 0); |
| 41 | SendMessageA(cbHandle, CB_SETMINVISIBLE, 20, 0); |
| 42 | } |
| 43 | |
| 44 | void LoadSoundDevicesInCombobox(HWND handle) |
| 45 | { |
no test coverage detected