feat: GetScreenSize
This commit is contained in:
@@ -52,6 +52,29 @@ int C4JRender::GetVSync()
|
||||
return m_VSyncState ? 1 : 0;
|
||||
}
|
||||
|
||||
//str1k3r - gonna be useful one day, kinda made this then didnt have to use it :sob:
|
||||
EScreenSize C4JRender::GetScreenSize()
|
||||
{
|
||||
int width = InternalRenderManager.kScreenWidth;
|
||||
|
||||
if(width >= 1920)
|
||||
{
|
||||
return EScreenSize_1080P;
|
||||
}
|
||||
else if(width >= 1280 && width > 960)
|
||||
{
|
||||
return EScreenSize_720P;
|
||||
}
|
||||
else if(width >= 960 && width > 640)
|
||||
{
|
||||
return EScreenSize_544P;
|
||||
}
|
||||
else
|
||||
{
|
||||
return EScreenSize_480P;
|
||||
}
|
||||
}
|
||||
|
||||
void C4JRender::MatrixMode(int type)
|
||||
{
|
||||
InternalRenderManager.MatrixMode(type);
|
||||
|
||||
@@ -49,12 +49,18 @@ SOFTWARE.
|
||||
#define NUM_COMMAND_HANDLES 0x800000
|
||||
#define MAX_COMMAND_BUFFERS 16000
|
||||
|
||||
extern int kScreenWidth;
|
||||
extern int kScreenHeight;
|
||||
|
||||
class Renderer
|
||||
{
|
||||
public:
|
||||
struct Context;
|
||||
struct CommandBuffer;
|
||||
|
||||
int kScreenHeight;
|
||||
int kScreenWidth;
|
||||
|
||||
void UpdateGamma(unsigned short usGamma);
|
||||
void MatrixMode(int type);
|
||||
void MatrixSetIdentity();
|
||||
|
||||
@@ -54,9 +54,9 @@ D3D11_PRIMITIVE_TOPOLOGY Renderer::g_topologies[C4JRender::PRIMITIVE_TYPE_COUNT]
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, D3D11_PRIMITIVE_TOPOLOGY_LINELIST, D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP,
|
||||
};
|
||||
|
||||
int kScreenWidth = 1920;
|
||||
int kScreenHeight = 1080;
|
||||
static const unsigned int kVertexBufferSize = 0x100000;
|
||||
static unsigned int kScreenWidth = 1920;
|
||||
static unsigned int kScreenHeight = 1080;
|
||||
static const unsigned int kThumbnailSize = 64;
|
||||
|
||||
static const unsigned int g_vertexStrides[C4JRender::VERTEX_TYPE_COUNT] = { 32, 16, 32, 32 };
|
||||
|
||||
@@ -51,6 +51,15 @@ typedef struct _XSOCIAL_PREVIEWIMAGE
|
||||
// D3DFORMAT Format;
|
||||
} XSOCIAL_PREVIEWIMAGE, *PXSOCIAL_PREVIEWIMAGE;
|
||||
|
||||
//str1k3r - EScreenSize is a windows64 exclusive thingy
|
||||
enum EScreenSize
|
||||
{
|
||||
EScreenSize_1080P,
|
||||
EScreenSize_720P,
|
||||
EScreenSize_544P, //str1k3r - vita screen size
|
||||
EScreenSize_480P
|
||||
};
|
||||
|
||||
class C4JRender
|
||||
{
|
||||
public:
|
||||
@@ -62,6 +71,9 @@ public:
|
||||
static void SetVSync(bool vs);
|
||||
static int GetVSync();
|
||||
|
||||
// Screen Size
|
||||
EScreenSize GetScreenSize();
|
||||
|
||||
// Matrix stack
|
||||
void MatrixMode(int type);
|
||||
void MatrixSetIdentity();
|
||||
|
||||
Reference in New Issue
Block a user