mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 18:50:55 +00:00
Removed wx implementation and added Windows only implementation
This commit is contained in:
parent
b9e7e46198
commit
2e29348b9c
1 changed files with 9 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Ini.h"
|
#include "Ini.h"
|
||||||
#include "rpcs3.h"
|
|
||||||
#include "Emu/Memory/Memory.h"
|
#include "Emu/Memory/Memory.h"
|
||||||
#include "Emu/SysCalls/Modules.h"
|
#include "Emu/SysCalls/Modules.h"
|
||||||
#include "Emu/RSX/sysutil_video.h"
|
#include "Emu/RSX/sysutil_video.h"
|
||||||
|
@ -20,12 +19,19 @@ int cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
|
||||||
if (!videoOut == CELL_VIDEO_OUT_PRIMARY)
|
if (!videoOut == CELL_VIDEO_OUT_PRIMARY)
|
||||||
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
return CELL_VIDEO_OUT_ERROR_UNSUPPORTED_VIDEO_OUT;
|
||||||
|
|
||||||
// Calculate screen's diagonal size in inches
|
#ifdef _WIN32
|
||||||
u32 diagonal = round(sqrt((pow(wxGetDisplaySizeMM().GetWidth(), 2) + pow(wxGetDisplaySizeMM().GetHeight(), 2))) * 0.0393);
|
HDC screen = GetDC(NULL);
|
||||||
|
u32 diagonal = round(sqrt((pow(GetDeviceCaps(screen, HORZSIZE), 2) + pow(GetDeviceCaps(screen, VERTSIZE), 2))) * 0.0393);
|
||||||
|
#else
|
||||||
|
// TODO: Linux implementation, without using wx
|
||||||
|
// u32 diagonal = round(sqrt((pow(wxGetDisplaySizeMM().GetWidth(), 2) + pow(wxGetDisplaySizeMM().GetHeight(), 2))) * 0.0393);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (Ini.GS3DTV.GetValue())
|
if (Ini.GS3DTV.GetValue())
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
*screenSize = diagonal;
|
*screenSize = diagonal;
|
||||||
|
#endif
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue