Skip to content

Commit 2bab758

Browse files
committed
is_16_9_mode --> is_widescreen [skip ci]
1 parent d68024c commit 2bab758

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

ogsr_engine/xrGame/UICustomItem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ void CUICustomItem::Render(const Fvector2& pos_ns, u32 color, float angle)
117117
LTt.set (iOriginalRect.x1/ts.x+hp.x, iOriginalRect.y1/ts.y+hp.y);
118118
RBt.set (iOriginalRect.x2/ts.x+hp.x, iOriginalRect.y2/ts.y+hp.y);
119119

120-
// float kx = (UI()->is_16_9_mode())?0.8333f: 1.0f;
121-
float kx = UI()->is_16_9_mode() ? UI()->get_current_kx() : 1.0f;
120+
// float kx = (UI()->is_widescreen())?0.8333f: 1.0f;
121+
float kx = UI()->is_widescreen() ? UI()->get_current_kx() : 1.0f;
122122
// clip poly
123123
sPoly2D S; S.resize(4);
124124
// LT

ogsr_engine/xrGame/ui/UIGameTutorialVideoItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void CUISequenceVideoItem::Load(CUIXml* xml, int idx)
7171
m_wnd->SetAlignment (waCenter);
7272
Frect texture_coords = m_wnd->GetUIStaticItem().GetOriginalRect();
7373

74-
bool is_16_9 = UI()->is_16_9_mode();
74+
bool is_16_9 = UI()->is_widescreen();
7575
float kw_image = UI_BASE_WIDTH / texture_coords.width();
7676

7777
Fvector2 wnd_size;

ogsr_engine/xrGame/ui/UIMMShniaga.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void CUIMMShniaga::Init(CUIXml& xml_doc, LPCSTR path)
107107

108108
void CUIMMShniaga::OnDeviceReset()
109109
{
110-
if(UI()->is_16_9_mode())
110+
if(UI()->is_widescreen())
111111
{
112112
m_anims[0]->SetWndSize(m_wheel_size[1]);
113113
m_anims[1]->SetWndSize(m_wheel_size[1]);

ogsr_engine/xrGame/ui_base.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,10 @@ void ui_core::RenderFont()
264264
Font()->Render();
265265
}
266266

267-
bool ui_core::is_16_9_mode()
268-
{
269-
return float(Device.dwWidth) / float(Device.dwHeight) > (UI_BASE_WIDTH / UI_BASE_HEIGHT + 0.01f);
270-
}
271-
272267
shared_str ui_core::get_xml_name(LPCSTR fn)
273268
{
274269
string_path str;
275-
if(!is_16_9_mode()){
270+
if(!is_widescreen()){
276271
sprintf_s(str, "%s", fn);
277272
if ( NULL==strext(fn) ) strcat_s(str, ".xml");
278273
}else{
@@ -300,5 +295,5 @@ shared_str ui_core::get_xml_name(LPCSTR fn)
300295

301296
bool ui_core::is_widescreen()
302297
{
303-
return (Device.dwWidth) / float(Device.dwHeight) > (UI_BASE_WIDTH / UI_BASE_HEIGHT + 0.01f);
298+
return float(Device.dwWidth) / float(Device.dwHeight) > (UI_BASE_WIDTH / UI_BASE_HEIGHT + 0.01f);
304299
}

ogsr_engine/xrGame/ui_base.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ class ui_core: public CDeviceResetNotifier
8282
void RenderFont ();
8383

8484
virtual void OnDeviceReset ();
85-
static bool is_16_9_mode ();
8685
shared_str get_xml_name (LPCSTR fn);
8786
float get_current_kx ();
8887

0 commit comments

Comments
 (0)