Don't prepare to fetch translations unless we actually are going to use them.. In a couple of places in the code.

This commit is contained in:
Henrik Rydgard 2015-02-04 13:41:21 +01:00
parent a8a7adc85f
commit f18f54fa5a
3 changed files with 6 additions and 5 deletions

View File

@ -1398,7 +1398,6 @@ int getPTPSocketCount(void) {
}
int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
I18NCategory *n = GetI18NCategory("Networking");
int iResult = 0;
metasocket = (int)INVALID_SOCKET;
metasocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
@ -1412,8 +1411,8 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
// Resolve dns
addrinfo * resultAddr;
addrinfo * ptr;
in_addr serverIp;
addrinfo * ptr;
in_addr serverIp;
serverIp.s_addr = INADDR_NONE;
iResult = getaddrinfo(g_Config.proAdhocServer.c_str(),0,NULL,&resultAddr);
@ -1456,7 +1455,8 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
memcpy(packet.game.data, adhoc_id->data, ADHOCCTL_ADHOCID_LEN);
int sent = send(metasocket, (char*)&packet, sizeof(packet), 0);
changeBlockingMode(metasocket, 1); // Change to non-blocking
if (sent > 0){
if (sent > 0) {
I18NCategory *n = GetI18NCategory("Networking");
osm.Show(n->T("Network Initialized"), 1.0);
return 0;
}

View File

@ -738,7 +738,6 @@ Shader *ShaderManager::ApplyVertexShader(int prim, u32 vertType) {
// if (g_Config.bPrescaleUV)
// globalDirty_ &= ~DIRTY_UVSCALEOFFSET;
I18NCategory *gs = GetI18NCategory("Graphics");
if (globalDirty_) {
if (lastShader_)
lastShader_->dirtyUniforms |= globalDirty_;
@ -769,6 +768,7 @@ Shader *ShaderManager::ApplyVertexShader(int prim, u32 vertType) {
vs = new Shader(codeBuffer_, GL_VERTEX_SHADER, useHWTransform, VSID);
if (vs->Failed()) {
I18NCategory *gs = GetI18NCategory("Graphics");
ERROR_LOG(G3D, "Shader compilation failed, falling back to software transform");
osm.Show(gs->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF, -1, true);
delete vs;

View File

@ -331,6 +331,7 @@ void TransformDrawEngine::SubmitPrim(void *verts, void *inds, GEPrimitiveType pr
Flush();
}
}
Flush();
}
void TransformDrawEngine::DecodeVerts() {