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;
|
||||
|
||||
@@ -285,17 +285,17 @@ void UIScene::loadMovie()
|
||||
moviePath.append(L"Vita.swf");
|
||||
m_loadedResolution = eSceneResolution_Vita;
|
||||
#elif defined _WINDOWS64
|
||||
if(ui.getScreenHeight() >= 1080)
|
||||
if(ui.getScreenWidth() >= 1920)
|
||||
{
|
||||
moviePath.append(L"1080.swf");
|
||||
m_loadedResolution = eSceneResolution_1080;
|
||||
}
|
||||
else if(ui.getScreenHeight() >= 720)
|
||||
else if(ui.getScreenWidth() >= 1280)
|
||||
{
|
||||
moviePath.append(L"720.swf");
|
||||
m_loadedResolution = eSceneResolution_720;
|
||||
}
|
||||
else if(ui.getScreenHeight() >= 544)
|
||||
else if(ui.getScreenWidth() >= 960)
|
||||
{
|
||||
moviePath.append(L"Vita.swf");
|
||||
m_loadedResolution = eSceneResolution_Vita;
|
||||
|
||||
@@ -636,15 +636,20 @@ void UIScene_LoadOrJoinMenu::tick()
|
||||
#elif defined(_WINDOWS64)
|
||||
ZeroMemory(m_saveDetails[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH);
|
||||
memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
|
||||
wstring filePath = wstring(L"Windows64\\GameHDD\\") + app.UTF8ToWide(m_saveDetails[i].UTF8SaveFilename) + wstring(L"\\saveData.ms");
|
||||
wstring folderPath = wstring(L"Windows64\\GameHDD\\") + app.UTF8ToWide(m_saveDetails[i].UTF8SaveFilename) + L"\\*";
|
||||
|
||||
DWORD fileSize = 0;
|
||||
WIN32_FIND_DATAW findData;
|
||||
HANDLE hFile = FindFirstFileW(filePath.c_str(), &findData);
|
||||
HANDLE hFile = FindFirstFileW(folderPath.c_str(), &findData);
|
||||
|
||||
if (hFile != INVALID_HANDLE_VALUE) {
|
||||
if (findData.nFileSizeHigh == 0 && findData.nFileSizeLow >= 12)
|
||||
fileSize = findData.nFileSizeLow;
|
||||
do {
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
fileSize = findData.nFileSizeLow;
|
||||
break;
|
||||
}
|
||||
} while (FindNextFileW(hFile, &findData));
|
||||
FindClose(hFile);
|
||||
}
|
||||
m_spaceIndicatorSaves.addSave(fileSize);
|
||||
|
||||
@@ -359,7 +359,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
|
||||
m_eAction=eAction_RunUnlockOrDLC;
|
||||
signInReturnedFunc = &UIScene_MainMenu::UnlockFullGame_SignInReturned;
|
||||
break;
|
||||
#if defined _XBOX
|
||||
#if defined(_XBOX) || defined(_WINDOWS64)
|
||||
case eControl_Exit:
|
||||
if( ProfileManager.IsFullVersion() )
|
||||
{
|
||||
@@ -370,9 +370,6 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _XBOX_ONE
|
||||
ui.ShowPlayerDisplayname(true);
|
||||
#endif
|
||||
ui.NavigateToScene(primaryPad,eUIScene_TrialExitUpsell);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user