Remove tabs in all files except in skyeye imports and in generated GL code
This commit is contained in:
parent
f5d38649c7
commit
739bb58c3a
|
@ -16,8 +16,8 @@ public:
|
||||||
/// Swap buffers to display the next frame
|
/// Swap buffers to display the next frame
|
||||||
void SwapBuffers() override;
|
void SwapBuffers() override;
|
||||||
|
|
||||||
/// Polls window events
|
/// Polls window events
|
||||||
void PollEvents() override;
|
void PollEvents() override;
|
||||||
|
|
||||||
/// Makes the graphics context current for the caller thread
|
/// Makes the graphics context current for the caller thread
|
||||||
void MakeCurrent() override;
|
void MakeCurrent() override;
|
||||||
|
|
|
@ -274,5 +274,5 @@ void GRenderWindow::OnClientAreaResized(unsigned width, unsigned height)
|
||||||
}
|
}
|
||||||
|
|
||||||
void GRenderWindow::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) {
|
void GRenderWindow::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) {
|
||||||
setMinimumSize(minimal_size.first, minimal_size.second);
|
setMinimumSize(minimal_size.first, minimal_size.second);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ void GKeyConfigButton::OnActivePortChanged(const common::Config::ControllerPort&
|
||||||
else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control");
|
else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control");
|
||||||
else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt");
|
else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt");
|
||||||
else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta");
|
else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta");
|
||||||
setText(text);
|
setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GKeyConfigButton::OnClicked()
|
void GKeyConfigButton::OnClicked()
|
||||||
|
@ -118,4 +118,4 @@ GButtonConfigGroup::GButtonConfigGroup(const QString& name, common::Config::Cont
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -46,18 +46,18 @@ void RegistersWidget::OnCPUStepped()
|
||||||
|
|
||||||
CSPR->setText(1, QString("0x%1").arg(app_core->GetCPSR(), 8, 16, QLatin1Char('0')));
|
CSPR->setText(1, QString("0x%1").arg(app_core->GetCPSR(), 8, 16, QLatin1Char('0')));
|
||||||
CSPR->child(0)->setText(1, QString("b%1").arg(app_core->GetCPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode
|
CSPR->child(0)->setText(1, QString("b%1").arg(app_core->GetCPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode
|
||||||
CSPR->child(1)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 5) & 0x1)); // T - State
|
CSPR->child(1)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 5) & 0x1)); // T - State
|
||||||
CSPR->child(2)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 6) & 0x1)); // F - FIQ disable
|
CSPR->child(2)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 6) & 0x1)); // F - FIQ disable
|
||||||
CSPR->child(3)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 7) & 0x1)); // I - IRQ disable
|
CSPR->child(3)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 7) & 0x1)); // I - IRQ disable
|
||||||
CSPR->child(4)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 8) & 0x1)); // A - Imprecise abort
|
CSPR->child(4)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 8) & 0x1)); // A - Imprecise abort
|
||||||
CSPR->child(5)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 9) & 0x1)); // E - Data endianess
|
CSPR->child(5)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 9) & 0x1)); // E - Data endianess
|
||||||
CSPR->child(6)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM)
|
CSPR->child(6)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM)
|
||||||
CSPR->child(7)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal
|
CSPR->child(7)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal
|
||||||
CSPR->child(8)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 20) & 0xF)); // DNM - Do not modify
|
CSPR->child(8)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 20) & 0xF)); // DNM - Do not modify
|
||||||
CSPR->child(9)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 24) & 0x1)); // J - Java state
|
CSPR->child(9)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 24) & 0x1)); // J - Java state
|
||||||
CSPR->child(10)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 27) & 0x1)); // Q - Sticky overflow
|
CSPR->child(10)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 27) & 0x1)); // Q - Sticky overflow
|
||||||
CSPR->child(11)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 28) & 0x1)); // V - Overflow
|
CSPR->child(11)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 28) & 0x1)); // V - Overflow
|
||||||
CSPR->child(12)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend
|
CSPR->child(12)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend
|
||||||
CSPR->child(13)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 30) & 0x1)); // Z - Zero
|
CSPR->child(13)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 30) & 0x1)); // Z - Zero
|
||||||
CSPR->child(14)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 31) & 0x1)); // N - Negative/Less than
|
CSPR->child(14)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 31) & 0x1)); // N - Negative/Less than
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,10 @@ public slots:
|
||||||
void OnCPUStepped();
|
void OnCPUStepped();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ARMRegisters cpu_regs_ui;
|
Ui::ARMRegisters cpu_regs_ui;
|
||||||
|
|
||||||
QTreeWidget* tree;
|
QTreeWidget* tree;
|
||||||
|
|
||||||
QTreeWidgetItem* registers;
|
QTreeWidgetItem* registers;
|
||||||
QTreeWidgetItem* CSPR;
|
QTreeWidgetItem* CSPR;
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,8 +45,8 @@ typedef double f64; ///< 64-bit floating point
|
||||||
|
|
||||||
/// Union for fast 16-bit type casting
|
/// Union for fast 16-bit type casting
|
||||||
union t16 {
|
union t16 {
|
||||||
u8 _u8[2]; ///< 8-bit unsigned char(s)
|
u8 _u8[2]; ///< 8-bit unsigned char(s)
|
||||||
u16 _u16; ///< 16-bit unsigned shorts(s)
|
u16 _u16; ///< 16-bit unsigned shorts(s)
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Union for fast 32-bit type casting
|
/// Union for fast 32-bit type casting
|
||||||
|
|
|
@ -16,33 +16,33 @@
|
||||||
|
|
||||||
// User directory indices for GetUserPath
|
// User directory indices for GetUserPath
|
||||||
enum {
|
enum {
|
||||||
D_USER_IDX,
|
D_USER_IDX,
|
||||||
D_ROOT_IDX,
|
D_ROOT_IDX,
|
||||||
D_CONFIG_IDX,
|
D_CONFIG_IDX,
|
||||||
D_GAMECONFIG_IDX,
|
D_GAMECONFIG_IDX,
|
||||||
D_MAPS_IDX,
|
D_MAPS_IDX,
|
||||||
D_CACHE_IDX,
|
D_CACHE_IDX,
|
||||||
D_SHADERCACHE_IDX,
|
D_SHADERCACHE_IDX,
|
||||||
D_SHADERS_IDX,
|
D_SHADERS_IDX,
|
||||||
D_STATESAVES_IDX,
|
D_STATESAVES_IDX,
|
||||||
D_SCREENSHOTS_IDX,
|
D_SCREENSHOTS_IDX,
|
||||||
D_SDMC_IDX,
|
D_SDMC_IDX,
|
||||||
D_HIRESTEXTURES_IDX,
|
D_HIRESTEXTURES_IDX,
|
||||||
D_DUMP_IDX,
|
D_DUMP_IDX,
|
||||||
D_DUMPFRAMES_IDX,
|
D_DUMPFRAMES_IDX,
|
||||||
D_DUMPAUDIO_IDX,
|
D_DUMPAUDIO_IDX,
|
||||||
D_DUMPTEXTURES_IDX,
|
D_DUMPTEXTURES_IDX,
|
||||||
D_DUMPDSP_IDX,
|
D_DUMPDSP_IDX,
|
||||||
D_LOGS_IDX,
|
D_LOGS_IDX,
|
||||||
D_SYSCONF_IDX,
|
D_SYSCONF_IDX,
|
||||||
F_EMUCONFIG_IDX,
|
F_EMUCONFIG_IDX,
|
||||||
F_DEBUGGERCONFIG_IDX,
|
F_DEBUGGERCONFIG_IDX,
|
||||||
F_LOGGERCONFIG_IDX,
|
F_LOGGERCONFIG_IDX,
|
||||||
F_MAINLOG_IDX,
|
F_MAINLOG_IDX,
|
||||||
F_RAMDUMP_IDX,
|
F_RAMDUMP_IDX,
|
||||||
F_ARAMDUMP_IDX,
|
F_ARAMDUMP_IDX,
|
||||||
F_SYSCONF_IDX,
|
F_SYSCONF_IDX,
|
||||||
NUM_PATH_INDICES
|
NUM_PATH_INDICES
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace FileUtil
|
namespace FileUtil
|
||||||
|
@ -51,11 +51,11 @@ namespace FileUtil
|
||||||
// FileSystem tree node/
|
// FileSystem tree node/
|
||||||
struct FSTEntry
|
struct FSTEntry
|
||||||
{
|
{
|
||||||
bool isDirectory;
|
bool isDirectory;
|
||||||
u64 size; // file length or number of entries from children
|
u64 size; // file length or number of entries from children
|
||||||
std::string physicalName; // name on disk
|
std::string physicalName; // name on disk
|
||||||
std::string virtualName; // name in FST names table
|
std::string virtualName; // name in FST names table
|
||||||
std::vector<FSTEntry> children;
|
std::vector<FSTEntry> children;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns true if file filename exists
|
// Returns true if file filename exists
|
||||||
|
@ -148,86 +148,86 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam
|
||||||
class IOFile : public NonCopyable
|
class IOFile : public NonCopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IOFile();
|
IOFile();
|
||||||
IOFile(std::FILE* file);
|
IOFile(std::FILE* file);
|
||||||
IOFile(const std::string& filename, const char openmode[]);
|
IOFile(const std::string& filename, const char openmode[]);
|
||||||
|
|
||||||
~IOFile();
|
~IOFile();
|
||||||
|
|
||||||
IOFile(IOFile&& other);
|
IOFile(IOFile&& other);
|
||||||
IOFile& operator=(IOFile&& other);
|
IOFile& operator=(IOFile&& other);
|
||||||
|
|
||||||
void Swap(IOFile& other);
|
void Swap(IOFile& other);
|
||||||
|
|
||||||
bool Open(const std::string& filename, const char openmode[]);
|
bool Open(const std::string& filename, const char openmode[]);
|
||||||
bool Close();
|
bool Close();
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
size_t ReadArray(T* data, size_t length)
|
size_t ReadArray(T* data, size_t length)
|
||||||
{
|
{
|
||||||
if (!IsOpen()) {
|
if (!IsOpen()) {
|
||||||
m_good = false;
|
m_good = false;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t items_read = std::fread(data, sizeof(T), length, m_file);
|
size_t items_read = std::fread(data, sizeof(T), length, m_file);
|
||||||
if (items_read != length)
|
if (items_read != length)
|
||||||
m_good = false;
|
m_good = false;
|
||||||
|
|
||||||
return items_read;
|
return items_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
size_t WriteArray(const T* data, size_t length)
|
size_t WriteArray(const T* data, size_t length)
|
||||||
{
|
{
|
||||||
if (!IsOpen()) {
|
if (!IsOpen()) {
|
||||||
m_good = false;
|
m_good = false;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t items_written = std::fwrite(data, sizeof(T), length, m_file);
|
size_t items_written = std::fwrite(data, sizeof(T), length, m_file);
|
||||||
if (items_written != length)
|
if (items_written != length)
|
||||||
m_good = false;
|
m_good = false;
|
||||||
|
|
||||||
return items_written;
|
return items_written;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ReadBytes(void* data, size_t length)
|
size_t ReadBytes(void* data, size_t length)
|
||||||
{
|
{
|
||||||
return ReadArray(reinterpret_cast<char*>(data), length);
|
return ReadArray(reinterpret_cast<char*>(data), length);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t WriteBytes(const void* data, size_t length)
|
size_t WriteBytes(const void* data, size_t length)
|
||||||
{
|
{
|
||||||
return WriteArray(reinterpret_cast<const char*>(data), length);
|
return WriteArray(reinterpret_cast<const char*>(data), length);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsOpen() { return NULL != m_file; }
|
bool IsOpen() { return NULL != m_file; }
|
||||||
|
|
||||||
// m_good is set to false when a read, write or other function fails
|
// m_good is set to false when a read, write or other function fails
|
||||||
bool IsGood() { return m_good; }
|
bool IsGood() { return m_good; }
|
||||||
operator void*() { return m_good ? m_file : NULL; }
|
operator void*() { return m_good ? m_file : NULL; }
|
||||||
|
|
||||||
std::FILE* ReleaseHandle();
|
std::FILE* ReleaseHandle();
|
||||||
|
|
||||||
std::FILE* GetHandle() { return m_file; }
|
std::FILE* GetHandle() { return m_file; }
|
||||||
|
|
||||||
void SetHandle(std::FILE* file);
|
void SetHandle(std::FILE* file);
|
||||||
|
|
||||||
bool Seek(s64 off, int origin);
|
bool Seek(s64 off, int origin);
|
||||||
u64 Tell();
|
u64 Tell();
|
||||||
u64 GetSize();
|
u64 GetSize();
|
||||||
bool Resize(u64 size);
|
bool Resize(u64 size);
|
||||||
bool Flush();
|
bool Flush();
|
||||||
|
|
||||||
// clear error state
|
// clear error state
|
||||||
void Clear() { m_good = true; std::clearerr(m_file); }
|
void Clear() { m_good = true; std::clearerr(m_file); }
|
||||||
|
|
||||||
std::FILE* m_file;
|
std::FILE* m_file;
|
||||||
bool m_good;
|
bool m_good;
|
||||||
private:
|
private:
|
||||||
IOFile(IOFile&);
|
IOFile(IOFile&);
|
||||||
IOFile& operator=(IOFile& other);
|
IOFile& operator=(IOFile& other);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -237,8 +237,8 @@ template <typename T>
|
||||||
void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode)
|
void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
fstream.open(Common::UTF8ToTStr(filename).c_str(), openmode);
|
fstream.open(Common::UTF8ToTStr(filename).c_str(), openmode);
|
||||||
#else
|
#else
|
||||||
fstream.open(filename.c_str(), openmode);
|
fstream.open(filename.c_str(), openmode);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ void* globalbase = NULL;
|
||||||
// Hopefully this ABI will never change...
|
// Hopefully this ABI will never change...
|
||||||
|
|
||||||
|
|
||||||
#define ASHMEM_DEVICE "/dev/ashmem"
|
#define ASHMEM_DEVICE "/dev/ashmem"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ashmem_create_region - creates a new ashmem region and returns the file
|
* ashmem_create_region - creates a new ashmem region and returns the file
|
||||||
|
@ -273,10 +273,10 @@ u8* MemArena::Find4GBBase()
|
||||||
|
|
||||||
// yeah, this could also be done in like two bitwise ops...
|
// yeah, this could also be done in like two bitwise ops...
|
||||||
#define SKIP(a_flags, b_flags)
|
#define SKIP(a_flags, b_flags)
|
||||||
// if (!(a_flags & MV_WII_ONLY) && (b_flags & MV_WII_ONLY))
|
//if (!(a_flags & MV_WII_ONLY) && (b_flags & MV_WII_ONLY))
|
||||||
// continue;
|
// continue;
|
||||||
// if (!(a_flags & MV_FAKE_VMEM) && (b_flags & MV_FAKE_VMEM))
|
//if (!(a_flags & MV_FAKE_VMEM) && (b_flags & MV_FAKE_VMEM))
|
||||||
// continue;
|
// continue;
|
||||||
|
|
||||||
static bool Memory_TryBase(u8 *base, const MemoryView *views, int num_views, u32 flags, MemArena *arena) {
|
static bool Memory_TryBase(u8 *base, const MemoryView *views, int num_views, u32 flags, MemArena *arena) {
|
||||||
// OK, we know where to find free space. Now grab it!
|
// OK, we know where to find free space. Now grab it!
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct BaseEvent
|
||||||
s64 time;
|
s64 time;
|
||||||
u64 userdata;
|
u64 userdata;
|
||||||
int type;
|
int type;
|
||||||
// Event *next;
|
// Event *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef LinkedListItem<BaseEvent> Event;
|
typedef LinkedListItem<BaseEvent> Event;
|
||||||
|
@ -469,8 +469,8 @@ void ProcessFifoWaitEvents()
|
||||||
{
|
{
|
||||||
if (first->time <= globalTimer)
|
if (first->time <= globalTimer)
|
||||||
{
|
{
|
||||||
// LOG(TIMER, "[Scheduler] %s (%lld, %lld) ",
|
//LOG(TIMER, "[Scheduler] %s (%lld, %lld) ",
|
||||||
// first->name ? first->name : "?", (u64)globalTimer, (u64)first->time);
|
// first->name ? first->name : "?", (u64)globalTimer, (u64)first->time);
|
||||||
Event* evt = first;
|
Event* evt = first;
|
||||||
first = first->next;
|
first = first->next;
|
||||||
event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time));
|
event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time));
|
||||||
|
@ -516,23 +516,23 @@ void Advance()
|
||||||
//currentMIPS->downcount = slicelength;
|
//currentMIPS->downcount = slicelength;
|
||||||
|
|
||||||
//if (Common::AtomicLoadAcquire(hasTsEvents))
|
//if (Common::AtomicLoadAcquire(hasTsEvents))
|
||||||
// MoveEvents();
|
// MoveEvents();
|
||||||
//ProcessFifoWaitEvents();
|
//ProcessFifoWaitEvents();
|
||||||
|
|
||||||
//if (!first)
|
//if (!first)
|
||||||
//{
|
//{
|
||||||
// // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000");
|
// // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000");
|
||||||
// currentMIPS->downcount += 10000;
|
// currentMIPS->downcount += 10000;
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
// slicelength = (int)(first->time - globalTimer);
|
// slicelength = (int)(first->time - globalTimer);
|
||||||
// if (slicelength > MAX_SLICE_LENGTH)
|
// if (slicelength > MAX_SLICE_LENGTH)
|
||||||
// slicelength = MAX_SLICE_LENGTH;
|
// slicelength = MAX_SLICE_LENGTH;
|
||||||
// currentMIPS->downcount = slicelength;
|
// currentMIPS->downcount = slicelength;
|
||||||
//}
|
//}
|
||||||
//if (advanceCallback)
|
//if (advanceCallback)
|
||||||
// advanceCallback(cyclesExecuted);
|
// advanceCallback(cyclesExecuted);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogPendingEvents()
|
void LogPendingEvents()
|
||||||
|
@ -550,20 +550,20 @@ void Idle(int maxIdle)
|
||||||
ERROR_LOG(TIME, "Unimplemented function!");
|
ERROR_LOG(TIME, "Unimplemented function!");
|
||||||
//int cyclesDown = currentMIPS->downcount;
|
//int cyclesDown = currentMIPS->downcount;
|
||||||
//if (maxIdle != 0 && cyclesDown > maxIdle)
|
//if (maxIdle != 0 && cyclesDown > maxIdle)
|
||||||
// cyclesDown = maxIdle;
|
// cyclesDown = maxIdle;
|
||||||
|
|
||||||
//if (first && cyclesDown > 0)
|
//if (first && cyclesDown > 0)
|
||||||
//{
|
//{
|
||||||
// int cyclesExecuted = slicelength - currentMIPS->downcount;
|
// int cyclesExecuted = slicelength - currentMIPS->downcount;
|
||||||
// int cyclesNextEvent = (int) (first->time - globalTimer);
|
// int cyclesNextEvent = (int) (first->time - globalTimer);
|
||||||
|
|
||||||
// if (cyclesNextEvent < cyclesExecuted + cyclesDown)
|
// if (cyclesNextEvent < cyclesExecuted + cyclesDown)
|
||||||
// {
|
// {
|
||||||
// cyclesDown = cyclesNextEvent - cyclesExecuted;
|
// cyclesDown = cyclesNextEvent - cyclesExecuted;
|
||||||
// // Now, now... no time machines, please.
|
// // Now, now... no time machines, please.
|
||||||
// if (cyclesDown < 0)
|
// if (cyclesDown < 0)
|
||||||
// cyclesDown = 0;
|
// cyclesDown = 0;
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f));
|
//INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f));
|
||||||
|
@ -571,7 +571,7 @@ void Idle(int maxIdle)
|
||||||
//idledCycles += cyclesDown;
|
//idledCycles += cyclesDown;
|
||||||
//currentMIPS->downcount -= cyclesDown;
|
//currentMIPS->downcount -= cyclesDown;
|
||||||
//if (currentMIPS->downcount == 0)
|
//if (currentMIPS->downcount == 0)
|
||||||
// currentMIPS->downcount = -1;
|
// currentMIPS->downcount = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetScheduledEventsSummary()
|
std::string GetScheduledEventsSummary()
|
||||||
|
@ -623,4 +623,4 @@ void DoState(PointerWrap &p)
|
||||||
p.Do(idledCycles);
|
p.Do(idledCycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -12,14 +12,14 @@ namespace System {
|
||||||
|
|
||||||
// State of the full emulator
|
// State of the full emulator
|
||||||
enum State {
|
enum State {
|
||||||
STATE_NULL = 0, ///< System is in null state, nothing initialized
|
STATE_NULL = 0, ///< System is in null state, nothing initialized
|
||||||
STATE_IDLE, ///< System is in an initialized state, but not running
|
STATE_IDLE, ///< System is in an initialized state, but not running
|
||||||
STATE_RUNNING, ///< System is running
|
STATE_RUNNING, ///< System is running
|
||||||
STATE_LOADING, ///< System is loading a ROM
|
STATE_LOADING, ///< System is loading a ROM
|
||||||
STATE_HALTED, ///< System is halted (error)
|
STATE_HALTED, ///< System is halted (error)
|
||||||
STATE_STALLED, ///< System is stalled (unused)
|
STATE_STALLED, ///< System is stalled (unused)
|
||||||
STATE_DEBUG, ///< System is in a special debug mode (unused)
|
STATE_DEBUG, ///< System is in a special debug mode (unused)
|
||||||
STATE_DIE ///< System is shutting down
|
STATE_DIE ///< System is shutting down
|
||||||
};
|
};
|
||||||
|
|
||||||
extern volatile State g_state;
|
extern volatile State g_state;
|
||||||
|
|
|
@ -318,9 +318,9 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef HAVE_PNG
|
#ifndef HAVE_PNG
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Write data to file
|
// Write data to file
|
||||||
|
|
|
@ -41,7 +41,7 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data
|
||||||
// Utility class to log Pica commands.
|
// Utility class to log Pica commands.
|
||||||
struct PicaTrace {
|
struct PicaTrace {
|
||||||
struct Write : public std::pair<u32,u32> {
|
struct Write : public std::pair<u32,u32> {
|
||||||
Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {}
|
Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {}
|
||||||
|
|
||||||
u32& Id() { return first; }
|
u32& Id() { return first; }
|
||||||
const u32& Id() const { return first; }
|
const u32& Id() const { return first; }
|
||||||
|
|
|
@ -239,7 +239,7 @@ MathUtil::Rectangle<unsigned> RendererOpenGL::GetViewportExtent() {
|
||||||
|
|
||||||
MathUtil::Rectangle<unsigned> viewport_extent;
|
MathUtil::Rectangle<unsigned> viewport_extent;
|
||||||
if (window_aspect_ratio > emulation_aspect_ratio) {
|
if (window_aspect_ratio > emulation_aspect_ratio) {
|
||||||
// Window is narrower than the emulation content => apply borders to the top and bottom
|
// Window is narrower than the emulation content => apply borders to the top and bottom
|
||||||
unsigned viewport_height = emulation_aspect_ratio * framebuffer_width;
|
unsigned viewport_height = emulation_aspect_ratio * framebuffer_width;
|
||||||
viewport_extent.left = 0;
|
viewport_extent.left = 0;
|
||||||
viewport_extent.top = (framebuffer_height - viewport_height) / 2;
|
viewport_extent.top = (framebuffer_height - viewport_height) / 2;
|
||||||
|
|
|
@ -12,24 +12,24 @@ namespace FormatPrecision {
|
||||||
|
|
||||||
/// Adjust RGBA8 color with RGBA6 precision
|
/// Adjust RGBA8 color with RGBA6 precision
|
||||||
static inline u32 rgba8_with_rgba6(u32 src) {
|
static inline u32 rgba8_with_rgba6(u32 src) {
|
||||||
u32 color = src;
|
u32 color = src;
|
||||||
color &= 0xFCFCFCFC;
|
color &= 0xFCFCFCFC;
|
||||||
color |= (color >> 6) & 0x03030303;
|
color |= (color >> 6) & 0x03030303;
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adjust RGBA8 color with RGB565 precision
|
/// Adjust RGBA8 color with RGB565 precision
|
||||||
static inline u32 rgba8_with_rgb565(u32 src) {
|
static inline u32 rgba8_with_rgb565(u32 src) {
|
||||||
u32 color = (src & 0xF8FCF8);
|
u32 color = (src & 0xF8FCF8);
|
||||||
color |= (color >> 5) & 0x070007;
|
color |= (color >> 5) & 0x070007;
|
||||||
color |= (color >> 6) & 0x000300;
|
color |= (color >> 6) & 0x000300;
|
||||||
color |= 0xFF000000;
|
color |= 0xFF000000;
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adjust Z24 depth value with Z16 precision
|
/// Adjust Z24 depth value with Z16 precision
|
||||||
static inline u32 z24_with_z16(u32 src) {
|
static inline u32 z24_with_z16(u32 src) {
|
||||||
return (src & 0xFFFF00) | (src >> 16);
|
return (src & 0xFFFF00) | (src >> 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in a new issue