forked from cafeberry/cafeberry
merge upstream
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include "UIFontData.h"
|
||||
#ifdef __PSVITA__
|
||||
#include <message_dialog.h>
|
||||
#elif _WINDOWS64
|
||||
#include "Windows64\Windows64_Minecraft.h"
|
||||
#endif
|
||||
|
||||
// 4J Stu - Enable this to override the Iggy Allocator
|
||||
@@ -189,10 +191,17 @@ UIController::UIController()
|
||||
#endif
|
||||
|
||||
// 4J Stu - This is a bit of a hack until we change the Minecraft initialisation to store the proper screen size for other platforms
|
||||
#if defined _WINDOWS64 || defined _DURANGO || defined __ORBIS__
|
||||
#if defined _DURANGO || defined __ORBIS__
|
||||
m_fScreenWidth = 1920.0f;
|
||||
m_fScreenHeight = 1080.0f;
|
||||
m_bScreenWidthSetup = true;
|
||||
#elif _WINDOWS64
|
||||
m_fScreenWidth = g_iScreenWidth;
|
||||
m_fScreenHeight = g_iScreenHeight;
|
||||
m_bScreenWidthSetup = true;
|
||||
#ifdef _DEBUG
|
||||
app.DebugPrintf("[UIController] Width: %d, Height: %d\n", m_fScreenWidth, m_fScreenHeight);
|
||||
#endif
|
||||
#else
|
||||
m_fScreenWidth = 1280.0f;
|
||||
m_fScreenHeight = 720.0f;
|
||||
@@ -340,7 +349,7 @@ UIController::EFont UIController::getFontForLanguage(int language)
|
||||
switch(language)
|
||||
{
|
||||
case XC_LANGUAGE_JAPANESE: return eFont_Japanese;
|
||||
#ifdef _DURANGO
|
||||
#if defined(_DURANGO) || defined(_WINDOWS64)
|
||||
case XC_LANGUAGE_SCHINESE: return eFont_SimpChinese;
|
||||
#endif
|
||||
case XC_LANGUAGE_TCHINESE: return eFont_TradChinese;
|
||||
@@ -355,12 +364,11 @@ UITTFFont *UIController::createFont(EFont fontLanguage)
|
||||
{
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
case eFont_Japanese: return new UITTFFont("Mojangles_TTF_jaJP", "Common/Media/font/JPN/DF-DotDotGothic16.ttf", 0x203B); // JPN
|
||||
// case eFont_SimpChinese: Simplified Chinese is unsupported.
|
||||
case eFont_TradChinese: return new UITTFFont("Mojangles_TTF_cnTD", "Common/Media/font/CHT/DFTT_R5.TTC", 0x203B); // CHT
|
||||
case eFont_Korean: return new UITTFFont("Mojangles_TTF_koKR", "Common/Media/font/KOR/candadite2.ttf", 0x203B); // KOR
|
||||
#else
|
||||
case eFont_Japanese: return new UITTFFont("Mojangles_TTF_jaJP", "Common/Media/font/JPN/DFGMaruGothic-Md.ttf", 0x2022); // JPN
|
||||
#ifdef _DURANGO
|
||||
#if defined(_DURANGO) || defined(_WINDOWS64)
|
||||
case eFont_SimpChinese: return new UITTFFont("Mojangled_TTF_cnCN", "Common/Media/font/CHS/MSYH.ttf", 0x2022); // CHS
|
||||
#endif
|
||||
case eFont_TradChinese: return new UITTFFont("Mojangles_TTF_cnTD", "Common/Media/font/CHT/DFHeiMedium-B5.ttf", 0x2022); // CHT
|
||||
@@ -628,7 +636,7 @@ void UIController::loadSkins()
|
||||
#elif defined __PSVITA__
|
||||
platformSkinPath = L"skinVita.swf";
|
||||
#elif defined _WINDOWS64
|
||||
if(m_fScreenHeight >= 1080.0f)
|
||||
if(m_fScreenWidth >= 1920.0f)
|
||||
{
|
||||
platformSkinPath = L"skinHDWin.swf";
|
||||
controlTooltipsPath = GetControlTooltipsPath();
|
||||
@@ -661,7 +669,7 @@ void UIController::loadSkins()
|
||||
|
||||
// str1k3r - Fixes 720p/480p Crashes on Windows64, also allows this to be used on 1080p consoles instead of just Windows64
|
||||
// This also cleans up some 4J code and turns 3 if statements into 1.
|
||||
if (m_fScreenHeight >= 1080.0f)
|
||||
if (m_fScreenWidth >= 1920.0f)
|
||||
{
|
||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
|
||||
m_iggyLibraries[eLibrary_GraphicsDefault] = loadSkin(L"skinHDGraphics.swf", L"skinHDGraphics.swf");
|
||||
@@ -1568,6 +1576,17 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void *
|
||||
#if (defined __ORBIS__ || defined _DURANGO )
|
||||
*width = 96;
|
||||
*height = 96;
|
||||
#elif _WINDOWS64
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
*width = 96;
|
||||
*height = 96;
|
||||
}
|
||||
else
|
||||
{
|
||||
*width = 64;
|
||||
*height = 64;
|
||||
}
|
||||
#else
|
||||
*width = 64;
|
||||
*height = 64;
|
||||
|
||||
Reference in New Issue
Block a user