enumerate resolutions
use mixed case for prefs values
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageDisplay.h"
|
||||
#include "DisplayResolutions.h"
|
||||
#include "archutils/Win32/AppInstance.h"
|
||||
#include "archutils/Win32/WindowIcon.h"
|
||||
#include "archutils/Win32/GetFileInformation.h"
|
||||
@@ -468,6 +469,23 @@ HWND GraphicsWindow::GetHwnd()
|
||||
return g_hWndMain;
|
||||
}
|
||||
|
||||
void GraphicsWindow::GetDisplayResolutions( DisplayResolutions &out )
|
||||
{
|
||||
DEVMODE dm;
|
||||
ZERO( dm );
|
||||
dm.dmSize = sizeof(dm);
|
||||
int i=0;
|
||||
while(EnumDisplaySettings(NULL, i++, &dm))
|
||||
{
|
||||
if(ChangeDisplaySettings(&dm, CDS_TEST)==DISP_CHANGE_SUCCESSFUL)
|
||||
{
|
||||
DisplayResolution res = { dm.dmPelsWidth, dm.dmPelsHeight };
|
||||
out.s.insert( res );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (c) 2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#define GRAPHICS_WINDOW_H
|
||||
|
||||
#include <windows.h>
|
||||
struct VideoModeParams; // for VideoModeParams
|
||||
class VideoModeParams;
|
||||
class DisplayResolutions;
|
||||
|
||||
namespace GraphicsWindow
|
||||
{
|
||||
@@ -20,6 +21,8 @@ namespace GraphicsWindow
|
||||
void DestroyGraphicsWindow();
|
||||
void ConfigureGraphicsWindow( const VideoModeParams &p );
|
||||
|
||||
void GetDisplayResolutions( DisplayResolutions &out );
|
||||
|
||||
LRESULT CALLBACK GraphicsWindow_WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
void GetParams( VideoModeParams ¶msOut );
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RageDisplay.h"
|
||||
class VideoModeParams;
|
||||
|
||||
namespace GraphicsWindow
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user