Removed wx implementation and added Windows only implementation

This commit is contained in:
Raul Tambre 2014-09-28 19:42:37 +03:00
commit 2e29348b9c

View file

@ -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;
} }