增加显示器尺寸输出
This commit is contained in:
parent
b7248b3e97
commit
696b1f9e7d
@ -1,5 +1,6 @@
|
|||||||
#include<hgl/render/device/RenderDevice.h>
|
#include<hgl/render/device/RenderDevice.h>
|
||||||
#include<iostream>
|
#include<iostream>
|
||||||
|
#include<math.h>
|
||||||
|
|
||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
|
|
||||||
@ -10,7 +11,9 @@ void put(const struct VideoMode *vm)
|
|||||||
|
|
||||||
void put(const struct Display *disp)
|
void put(const struct Display *disp)
|
||||||
{
|
{
|
||||||
std::cout<<"["<<disp->name.c_str()<<"]["<<disp->width<<"x"<<disp->height<<"]["<<disp->x<<","<<disp->y<<"]"<<std::endl;
|
const int inch=sqrt((disp->width*disp->width)+(disp->height*disp->height))*0.03937008;
|
||||||
|
|
||||||
|
std::cout<<"["<<disp->name.c_str()<<"]["<<disp->width<<"x"<<disp->height<<" mm,"<<inch<<" inch][offset "<<disp->x<<","<<disp->y<<"]"<<std::endl;
|
||||||
|
|
||||||
std::cout<<"\tcurrent video mode: ";
|
std::cout<<"\tcurrent video mode: ";
|
||||||
put(disp->GetCurVideoMode());
|
put(disp->GetCurVideoMode());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user