enumerate resolutions

use mixed case for prefs values
This commit is contained in:
Chris Danford
2005-11-26 07:22:33 +00:00
parent b948f686cc
commit 730a113ed6
22 changed files with 246 additions and 103 deletions
@@ -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 &paramsOut );
@@ -4,7 +4,7 @@
#pragma once
#include "RageDisplay.h"
class VideoModeParams;
namespace GraphicsWindow
{