commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
62
include/platform/video/video_mode.cpp
Normal file
62
include/platform/video/video_mode.cpp
Normal file
@ -0,0 +1,62 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "video/video_mode.h"
|
||||
|
||||
using namespace nVideoMode;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Mode nVideoMode::mode_desc[NameLast] =
|
||||
{
|
||||
{ "CGA", 320, 200, 32, true },
|
||||
{ "QVGA", 320, 240, 32, true },
|
||||
{ "WQVGA", 480, 272, 32, true },
|
||||
{ "VGA", 640, 480, 32, true },
|
||||
{ "SVGA", 800, 600, 32, true },
|
||||
|
||||
{ "XGA", 1024, 768, 32, true },
|
||||
{ "XGAPlus", 1152, 864, 32, true },
|
||||
|
||||
{ "HD", 1366, 768, 32, true },
|
||||
{ "WXGA_922K", 1280, 720, 32, false },
|
||||
{ "WXGA_1024K", 1280, 800, 32, true },
|
||||
{ "HDPlus", 1600, 900, 32, true },
|
||||
{ "SXGA", 1280, 1024, 32, true },
|
||||
{ "WXGAPlus", 1440, 900, 32, true },
|
||||
|
||||
{ "UXGA", 1600, 1200, 32, true },
|
||||
{ "WSXGAPlus", 1680, 1050, 32, true },
|
||||
{ "FullHD", 1920, 1080, 32, false },
|
||||
{ "WUXGA", 1920, 1200, 32, true },
|
||||
|
||||
{ "QXGA", 2048, 1536, 32, true },
|
||||
{ "QWXGA", 2048, 1152, 32, true },
|
||||
{ "WQHD", 2560, 1440, 32, true },
|
||||
{ "WQXGA", 2560, 1600, 32, true }
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
AspectRatio nVideoMode::GetModeAspectRatio(const Mode &mode)
|
||||
{
|
||||
if (((mode.width * 3) / 4) == mode.height)
|
||||
return AR_4_3;
|
||||
if (((mode.width * 9) / 16) == mode.height)
|
||||
return AR_16_9;
|
||||
if (((mode.width * 10) / 16) == mode.height)
|
||||
return AR_16_10;
|
||||
|
||||
return AR_Unknown;
|
||||
}
|
||||
Mode *nVideoMode::GetMode(uint w, uint h)
|
||||
{
|
||||
for (uint n = 0; n < NameLast; ++n)
|
||||
if ((mode_desc[n].width == w) && (mode_desc[n].height == h))
|
||||
return &mode_desc[n];
|
||||
return NULL;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user