diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index 11783199b1..d9be62ef84 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -463,6 +463,10 @@ static int sceRtcConvertLocalTimeToUTC(u32 tickLocalPtr,u32 tickUTCPtr) time_t timezone = 0; tm *time = localtime(&timezone); srcTick -= time->tm_gmtoff*1000000ULL; +#elif defined(_MSC_VER) + long timezone_val; + _get_timezone(&timezone_val); + srcTick -= -timezone_val * 1000000ULL; #else srcTick -= -timezone * 1000000ULL; #endif @@ -486,6 +490,10 @@ static int sceRtcConvertUtcToLocalTime(u32 tickUTCPtr,u32 tickLocalPtr) time_t timezone = 0; tm *time = localtime(&timezone); srcTick += time->tm_gmtoff*1000000ULL; +#elif defined(_MSC_VER) + long timezone_val; + _get_timezone(&timezone_val); + srcTick += -timezone_val * 1000000ULL; #else srcTick += -timezone * 1000000ULL; #endif @@ -1019,6 +1027,10 @@ static int sceRtcFormatRFC2822LocalTime(u32 outPtr, u32 srcTickPtr) time_t timezone = 0; tm *time = localtime(&timezone); tz_seconds = time->tm_gmtoff; +#elif defined(_MSC_VER) + long timezone_val; + _get_timezone(&timezone_val); + tz_seconds = -timezone_val; #else tz_seconds = -timezone; #endif @@ -1054,6 +1066,10 @@ static int sceRtcFormatRFC3339LocalTime(u32 outPtr, u32 srcTickPtr) time_t timezone = 0; tm *time = localtime(&timezone); tz_seconds = time->tm_gmtoff; +#elif defined(_MSC_VER) + long timezone_val; + _get_timezone(&timezone_val); + tz_seconds = -timezone_val; #else tz_seconds = -timezone; #endif diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index a113dcea2b..e02e2b225d 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -1309,14 +1309,24 @@ void DrawTriangle(const VertexData& v0, const VertexData& v1, const VertexData& int range = (maxY - minY) / 16 + 1; if (gstate.isModeClear()) { if (range >= 24 && (maxX - minX) >= 24 * 16) - GlobalThreadPool::Loop(std::bind(&DrawTriangleSlice, v0, v1, v2, minX, minY, maxX, maxY, placeholder::_1, placeholder::_2), 0, range); + { + auto bound = [=](int a, int b) -> void {DrawTriangleSlice(v0, v1, v2, minX, minY, maxX, maxY, a, b); }; + GlobalThreadPool::Loop(bound, 0, range); + } else + { DrawTriangleSlice(v0, v1, v2, minX, minY, maxX, maxY, 0, range); + } } else { if (range >= 24 && (maxX - minX) >= 24 * 16) - GlobalThreadPool::Loop(std::bind(&DrawTriangleSlice, v0, v1, v2, minX, minY, maxX, maxY, placeholder::_1, placeholder::_2), 0, range); + { + auto bound = [=](int a, int b) -> void {DrawTriangleSlice(v0, v1, v2, minX, minY, maxX, maxY, a, b); }; + GlobalThreadPool::Loop(bound, 0, range); + } else + { DrawTriangleSlice(v0, v1, v2, minX, minY, maxX, maxY, 0, range); + } } }