window: add window_dpi()
parent
8c05030d48
commit
a0aa0a1d3d
|
@ -1505,6 +1505,9 @@ ffi.cdef([[
|
||||||
//lcpp INF [0000] vec2: macro name but used as C declaration in:API vec2 window_canvas();
|
//lcpp INF [0000] vec2: macro name but used as C declaration in:API vec2 window_canvas();
|
||||||
//lcpp INF [0000] vec2: macro name but used as C declaration in:STATIC vec2 window_canvas();
|
//lcpp INF [0000] vec2: macro name but used as C declaration in:STATIC vec2 window_canvas();
|
||||||
//lcpp INF [0000] vec2: macro name but used as C declaration in: vec2 window_canvas();
|
//lcpp INF [0000] vec2: macro name but used as C declaration in: vec2 window_canvas();
|
||||||
|
//lcpp INF [0000] vec2: macro name but used as C declaration in:API vec2 window_dpi();
|
||||||
|
//lcpp INF [0000] vec2: macro name but used as C declaration in:STATIC vec2 window_dpi();
|
||||||
|
//lcpp INF [0000] vec2: macro name but used as C declaration in: vec2 window_dpi();
|
||||||
typedef struct FILE FILE;
|
typedef struct FILE FILE;
|
||||||
typedef long int ptrdiff_t;
|
typedef long int ptrdiff_t;
|
||||||
typedef long unsigned int size_t;
|
typedef long unsigned int size_t;
|
||||||
|
@ -3190,6 +3193,7 @@ WINDOW_VSYNC_DISABLED =8192,
|
||||||
uint64_t window_frame();
|
uint64_t window_frame();
|
||||||
int window_width();
|
int window_width();
|
||||||
int window_height();
|
int window_height();
|
||||||
|
vec2 window_dpi();
|
||||||
double window_time();
|
double window_time();
|
||||||
double window_delta();
|
double window_delta();
|
||||||
void window_focus();
|
void window_focus();
|
||||||
|
|
|
@ -17984,6 +17984,7 @@ API char* window_stats();
|
||||||
API uint64_t window_frame();
|
API uint64_t window_frame();
|
||||||
API int window_width();
|
API int window_width();
|
||||||
API int window_height();
|
API int window_height();
|
||||||
|
API vec2 window_dpi();
|
||||||
API double window_time();
|
API double window_time();
|
||||||
API double window_delta();
|
API double window_delta();
|
||||||
|
|
||||||
|
@ -605770,6 +605771,12 @@ double window_time() {
|
||||||
double window_delta() {
|
double window_delta() {
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
vec2 window_dpi() {
|
||||||
|
float x=0.0f;
|
||||||
|
float y=0.0f;
|
||||||
|
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &x, &y);
|
||||||
|
return vec2(x,y);
|
||||||
|
}
|
||||||
|
|
||||||
double window_fps() {
|
double window_fps() {
|
||||||
return fps;
|
return fps;
|
||||||
|
|
|
@ -813,6 +813,12 @@ double window_time() {
|
||||||
double window_delta() {
|
double window_delta() {
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
vec2 window_dpi() {
|
||||||
|
float x=0.0f;
|
||||||
|
float y=0.0f;
|
||||||
|
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &x, &y);
|
||||||
|
return vec2(x,y);
|
||||||
|
}
|
||||||
|
|
||||||
double window_fps() {
|
double window_fps() {
|
||||||
return fps;
|
return fps;
|
||||||
|
|
|
@ -45,6 +45,7 @@ API char* window_stats();
|
||||||
API uint64_t window_frame();
|
API uint64_t window_frame();
|
||||||
API int window_width();
|
API int window_width();
|
||||||
API int window_height();
|
API int window_height();
|
||||||
|
API vec2 window_dpi();
|
||||||
API double window_time();
|
API double window_time();
|
||||||
API double window_delta();
|
API double window_delta();
|
||||||
|
|
||||||
|
|
|
@ -23944,6 +23944,12 @@ double window_time() {
|
||||||
double window_delta() {
|
double window_delta() {
|
||||||
return dt;
|
return dt;
|
||||||
}
|
}
|
||||||
|
vec2 window_dpi() {
|
||||||
|
float x=0.0f;
|
||||||
|
float y=0.0f;
|
||||||
|
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &x, &y);
|
||||||
|
return vec2(x,y);
|
||||||
|
}
|
||||||
|
|
||||||
double window_fps() {
|
double window_fps() {
|
||||||
return fps;
|
return fps;
|
||||||
|
|
|
@ -4051,6 +4051,7 @@ API char* window_stats();
|
||||||
API uint64_t window_frame();
|
API uint64_t window_frame();
|
||||||
API int window_width();
|
API int window_width();
|
||||||
API int window_height();
|
API int window_height();
|
||||||
|
API vec2 window_dpi();
|
||||||
API double window_time();
|
API double window_time();
|
||||||
API double window_delta();
|
API double window_delta();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue