mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-22 21:09:52 +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.)
|
||||
void ReportMessageFormatted(const char *message, const char *formatted);
|
||||
|
||||
}
|
||||
} // namespace Reporting
|
||||
|
@ -160,14 +160,14 @@ void yield() {
|
||||
#endif
|
||||
}
|
||||
|
||||
TimeSpan::TimeSpan() {
|
||||
Instant::Instant() {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
nativeStart_ = ts.tv_sec;
|
||||
nsecs_ = ts.tv_nsec;
|
||||
}
|
||||
|
||||
int64_t TimeSpan::ElapsedNanos() const {
|
||||
int64_t Instant::ElapsedNanos() const {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
int64_t secs = ts.tv_sec - nativeStart_;
|
||||
@ -179,7 +179,7 @@ int64_t TimeSpan::ElapsedNanos() const {
|
||||
return secs * 1000000000ULL + nsecs;
|
||||
}
|
||||
|
||||
double TimeSpan::ElapsedSeconds() const {
|
||||
double Instant::ElapsedSeconds() const {
|
||||
return (double)ElapsedNanos() * (1.0 / nanos);
|
||||
}
|
||||
|
||||
@ -223,14 +223,14 @@ double time_now_unix_utc() {
|
||||
return time_now_raw();
|
||||
}
|
||||
|
||||
TimeSpan::TimeSpan() {
|
||||
Instant::Instant() {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, nullptr);
|
||||
nativeStart_ = tv.tv_sec;
|
||||
nsecs_ = tv.tv_usec;
|
||||
}
|
||||
|
||||
int64_t TimeSpan::ElapsedNanos() const {
|
||||
int64_t Instant::ElapsedNanos() const {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
@ -243,7 +243,7 @@ int64_t TimeSpan::ElapsedNanos() const {
|
||||
return secs * 1000000000 + usecs * 1000;
|
||||
}
|
||||
|
||||
double TimeSpan::ElapsedSeconds() const {
|
||||
double Instant::ElapsedSeconds() const {
|
||||
return (double)ElapsedNanos() * (1.0 / 1000000000.0);
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/Net/Resolve.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
|
@ -15,7 +15,10 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// 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/CommonTypes.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/FunctionWrappers.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;
|
||||
break;
|
||||
case IROp::Neg:
|
||||
mips->r[inst->dest] = -(s32)mips->r[inst->src1];
|
||||
mips->r[inst->dest] = (u32)(-(s32)mips->r[inst->src1]);
|
||||
break;
|
||||
case IROp::Not:
|
||||
mips->r[inst->dest] = ~mips->r[inst->src1];
|
||||
|
Loading…
Reference in New Issue
Block a user