mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Bugfixes
This commit is contained in:
parent
96c4ae4457
commit
9fb97add3f
@ -62,4 +62,4 @@ void ReportMessage(const char *message, ...);
|
|||||||
// The same, but with a preformatted version (message is still the key.)
|
// The same, but with a preformatted version (message is still the key.)
|
||||||
void ReportMessageFormatted(const char *message, const char *formatted);
|
void ReportMessageFormatted(const char *message, const char *formatted);
|
||||||
|
|
||||||
}
|
} // namespace Reporting
|
||||||
|
@ -160,14 +160,14 @@ void yield() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeSpan::TimeSpan() {
|
Instant::Instant() {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
nativeStart_ = ts.tv_sec;
|
nativeStart_ = ts.tv_sec;
|
||||||
nsecs_ = ts.tv_nsec;
|
nsecs_ = ts.tv_nsec;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t TimeSpan::ElapsedNanos() const {
|
int64_t Instant::ElapsedNanos() const {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
int64_t secs = ts.tv_sec - nativeStart_;
|
int64_t secs = ts.tv_sec - nativeStart_;
|
||||||
@ -179,7 +179,7 @@ int64_t TimeSpan::ElapsedNanos() const {
|
|||||||
return secs * 1000000000ULL + nsecs;
|
return secs * 1000000000ULL + nsecs;
|
||||||
}
|
}
|
||||||
|
|
||||||
double TimeSpan::ElapsedSeconds() const {
|
double Instant::ElapsedSeconds() const {
|
||||||
return (double)ElapsedNanos() * (1.0 / nanos);
|
return (double)ElapsedNanos() * (1.0 / nanos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,14 +223,14 @@ double time_now_unix_utc() {
|
|||||||
return time_now_raw();
|
return time_now_raw();
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeSpan::TimeSpan() {
|
Instant::Instant() {
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, nullptr);
|
gettimeofday(&tv, nullptr);
|
||||||
nativeStart_ = tv.tv_sec;
|
nativeStart_ = tv.tv_sec;
|
||||||
nsecs_ = tv.tv_usec;
|
nsecs_ = tv.tv_usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t TimeSpan::ElapsedNanos() const {
|
int64_t Instant::ElapsedNanos() const {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ int64_t TimeSpan::ElapsedNanos() const {
|
|||||||
return secs * 1000000000 + usecs * 1000;
|
return secs * 1000000000 + usecs * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
double TimeSpan::ElapsedSeconds() const {
|
double Instant::ElapsedSeconds() const {
|
||||||
return (double)ElapsedNanos() * (1.0 / 1000000000.0);
|
return (double)ElapsedNanos() * (1.0 / 1000000000.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#include "Common/Net/Resolve.h"
|
#include "Common/Net/Resolve.h"
|
||||||
#include "Common/Serialize/Serializer.h"
|
#include "Common/Serialize/Serializer.h"
|
||||||
|
@ -15,7 +15,10 @@
|
|||||||
// Official git repository and contact information can be found at
|
// Official git repository and contact information can be found at
|
||||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||||
|
|
||||||
|
#include <string> // for some reason required for the 'new'.
|
||||||
|
|
||||||
#include "Common/Data/Random/Rng.h"
|
#include "Common/Data/Random/Rng.h"
|
||||||
|
#include "Common/CommonTypes.h"
|
||||||
#include "Core/HLE/HLE.h"
|
#include "Core/HLE/HLE.h"
|
||||||
#include "Core/HLE/FunctionWrappers.h"
|
#include "Core/HLE/FunctionWrappers.h"
|
||||||
#include "Core/HLE/sceMt19937.h"
|
#include "Core/HLE/sceMt19937.h"
|
||||||
|
@ -200,7 +200,7 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst) {
|
|||||||
mips->r[inst->dest] = mips->r[inst->src1] ^ inst->constant;
|
mips->r[inst->dest] = mips->r[inst->src1] ^ inst->constant;
|
||||||
break;
|
break;
|
||||||
case IROp::Neg:
|
case IROp::Neg:
|
||||||
mips->r[inst->dest] = -(s32)mips->r[inst->src1];
|
mips->r[inst->dest] = (u32)(-(s32)mips->r[inst->src1]);
|
||||||
break;
|
break;
|
||||||
case IROp::Not:
|
case IROp::Not:
|
||||||
mips->r[inst->dest] = ~mips->r[inst->src1];
|
mips->r[inst->dest] = ~mips->r[inst->src1];
|
||||||
|
Loading…
Reference in New Issue
Block a user