diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/emu_window/emu_window_glfw.h | 4 | ||||
| -rw-r--r-- | src/citra_qt/bootmanager.cpp | 2 | ||||
| -rw-r--r-- | src/citra_qt/config/controller_config_util.cpp | 4 | ||||
| -rw-r--r-- | src/citra_qt/debugger/registers.cpp | 28 | ||||
| -rw-r--r-- | src/citra_qt/debugger/registers.hxx | 8 | ||||
| -rw-r--r-- | src/common/common_types.h | 4 | ||||
| -rw-r--r-- | src/common/file_util.h | 186 | ||||
| -rw-r--r-- | src/common/mem_arena.cpp | 10 | ||||
| -rw-r--r-- | src/core/core_timing.cpp | 48 | ||||
| -rw-r--r-- | src/core/system.h | 16 | ||||
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/utils.h | 20 |
14 files changed, 169 insertions, 169 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.h b/src/citra/emu_window/emu_window_glfw.h index 61cef4e65..5b04e87bb 100644 --- a/src/citra/emu_window/emu_window_glfw.h +++ b/src/citra/emu_window/emu_window_glfw.h | |||
| @@ -16,8 +16,8 @@ public: | |||
| 16 | /// Swap buffers to display the next frame | 16 | /// Swap buffers to display the next frame |
| 17 | void SwapBuffers() override; | 17 | void SwapBuffers() override; |
| 18 | 18 | ||
| 19 | /// Polls window events | 19 | /// Polls window events |
| 20 | void PollEvents() override; | 20 | void PollEvents() override; |
| 21 | 21 | ||
| 22 | /// Makes the graphics context current for the caller thread | 22 | /// Makes the graphics context current for the caller thread |
| 23 | void MakeCurrent() override; | 23 | void MakeCurrent() override; |
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 20623c939..9bf079919 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp | |||
| @@ -274,5 +274,5 @@ void GRenderWindow::OnClientAreaResized(unsigned width, unsigned height) | |||
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | void GRenderWindow::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) { | 276 | void GRenderWindow::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) { |
| 277 | setMinimumSize(minimal_size.first, minimal_size.second); | 277 | setMinimumSize(minimal_size.first, minimal_size.second); |
| 278 | } | 278 | } |
diff --git a/src/citra_qt/config/controller_config_util.cpp b/src/citra_qt/config/controller_config_util.cpp index c5426570b..aee3f8616 100644 --- a/src/citra_qt/config/controller_config_util.cpp +++ b/src/citra_qt/config/controller_config_util.cpp | |||
| @@ -48,7 +48,7 @@ void GKeyConfigButton::OnActivePortChanged(const common::Config::ControllerPort& | |||
| 48 | else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control"); | 48 | else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control"); |
| 49 | else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt"); | 49 | else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt"); |
| 50 | else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta"); | 50 | else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta"); |
| 51 | setText(text); | 51 | setText(text); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void GKeyConfigButton::OnClicked() | 54 | void GKeyConfigButton::OnClicked() |
| @@ -118,4 +118,4 @@ GButtonConfigGroup::GButtonConfigGroup(const QString& name, common::Config::Cont | |||
| 118 | setLayout(layout); | 118 | setLayout(layout); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | */ \ No newline at end of file | 121 | */ |
diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp index 96ceed480..ed17ee4b4 100644 --- a/src/citra_qt/debugger/registers.cpp +++ b/src/citra_qt/debugger/registers.cpp | |||
| @@ -46,18 +46,18 @@ void RegistersWidget::OnCPUStepped() | |||
| 46 | 46 | ||
| 47 | CSPR->setText(1, QString("0x%1").arg(app_core->GetCPSR(), 8, 16, QLatin1Char('0'))); | 47 | CSPR->setText(1, QString("0x%1").arg(app_core->GetCPSR(), 8, 16, QLatin1Char('0'))); |
| 48 | CSPR->child(0)->setText(1, QString("b%1").arg(app_core->GetCPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode | 48 | CSPR->child(0)->setText(1, QString("b%1").arg(app_core->GetCPSR() & 0x1F, 5, 2, QLatin1Char('0'))); // M - Mode |
| 49 | CSPR->child(1)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 5) & 0x1)); // T - State | 49 | CSPR->child(1)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 5) & 0x1)); // T - State |
| 50 | CSPR->child(2)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 6) & 0x1)); // F - FIQ disable | 50 | CSPR->child(2)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 6) & 0x1)); // F - FIQ disable |
| 51 | CSPR->child(3)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 7) & 0x1)); // I - IRQ disable | 51 | CSPR->child(3)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 7) & 0x1)); // I - IRQ disable |
| 52 | CSPR->child(4)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 8) & 0x1)); // A - Imprecise abort | 52 | CSPR->child(4)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 8) & 0x1)); // A - Imprecise abort |
| 53 | CSPR->child(5)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 9) & 0x1)); // E - Data endianess | 53 | CSPR->child(5)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 9) & 0x1)); // E - Data endianess |
| 54 | CSPR->child(6)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM) | 54 | CSPR->child(6)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 10) & 0x3F)); // IT - If-Then state (DNM) |
| 55 | CSPR->child(7)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal | 55 | CSPR->child(7)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 16) & 0xF)); // GE - Greater-than-or-Equal |
| 56 | CSPR->child(8)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 20) & 0xF)); // DNM - Do not modify | 56 | CSPR->child(8)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 20) & 0xF)); // DNM - Do not modify |
| 57 | CSPR->child(9)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 24) & 0x1)); // J - Java state | 57 | CSPR->child(9)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 24) & 0x1)); // J - Java state |
| 58 | CSPR->child(10)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 27) & 0x1)); // Q - Sticky overflow | 58 | CSPR->child(10)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 27) & 0x1)); // Q - Sticky overflow |
| 59 | CSPR->child(11)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 28) & 0x1)); // V - Overflow | 59 | CSPR->child(11)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 28) & 0x1)); // V - Overflow |
| 60 | CSPR->child(12)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend | 60 | CSPR->child(12)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 29) & 0x1)); // C - Carry/Borrow/Extend |
| 61 | CSPR->child(13)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 30) & 0x1)); // Z - Zero | 61 | CSPR->child(13)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 30) & 0x1)); // Z - Zero |
| 62 | CSPR->child(14)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 31) & 0x1)); // N - Negative/Less than | 62 | CSPR->child(14)->setText(1, QString("%1").arg((app_core->GetCPSR() >> 31) & 0x1)); // N - Negative/Less than |
| 63 | } | 63 | } |
diff --git a/src/citra_qt/debugger/registers.hxx b/src/citra_qt/debugger/registers.hxx index b525aa49e..4cca957ce 100644 --- a/src/citra_qt/debugger/registers.hxx +++ b/src/citra_qt/debugger/registers.hxx | |||
| @@ -16,10 +16,10 @@ public slots: | |||
| 16 | void OnCPUStepped(); | 16 | void OnCPUStepped(); |
| 17 | 17 | ||
| 18 | private: | 18 | private: |
| 19 | Ui::ARMRegisters cpu_regs_ui; | 19 | Ui::ARMRegisters cpu_regs_ui; |
| 20 | 20 | ||
| 21 | QTreeWidget* tree; | 21 | QTreeWidget* tree; |
| 22 | 22 | ||
| 23 | QTreeWidgetItem* registers; | 23 | QTreeWidgetItem* registers; |
| 24 | QTreeWidgetItem* CSPR; | 24 | QTreeWidgetItem* CSPR; |
| 25 | }; | 25 | }; |
diff --git a/src/common/common_types.h b/src/common/common_types.h index 6d432e462..fcc8b9a4e 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h | |||
| @@ -45,8 +45,8 @@ typedef double f64; ///< 64-bit floating point | |||
| 45 | 45 | ||
| 46 | /// Union for fast 16-bit type casting | 46 | /// Union for fast 16-bit type casting |
| 47 | union t16 { | 47 | union t16 { |
| 48 | u8 _u8[2]; ///< 8-bit unsigned char(s) | 48 | u8 _u8[2]; ///< 8-bit unsigned char(s) |
| 49 | u16 _u16; ///< 16-bit unsigned shorts(s) | 49 | u16 _u16; ///< 16-bit unsigned shorts(s) |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /// Union for fast 32-bit type casting | 52 | /// Union for fast 32-bit type casting |
diff --git a/src/common/file_util.h b/src/common/file_util.h index 173ce6623..72b80be8a 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -16,33 +16,33 @@ | |||
| 16 | 16 | ||
| 17 | // User directory indices for GetUserPath | 17 | // User directory indices for GetUserPath |
| 18 | enum { | 18 | enum { |
| 19 | D_USER_IDX, | 19 | D_USER_IDX, |
| 20 | D_ROOT_IDX, | 20 | D_ROOT_IDX, |
| 21 | D_CONFIG_IDX, | 21 | D_CONFIG_IDX, |
| 22 | D_GAMECONFIG_IDX, | 22 | D_GAMECONFIG_IDX, |
| 23 | D_MAPS_IDX, | 23 | D_MAPS_IDX, |
| 24 | D_CACHE_IDX, | 24 | D_CACHE_IDX, |
| 25 | D_SHADERCACHE_IDX, | 25 | D_SHADERCACHE_IDX, |
| 26 | D_SHADERS_IDX, | 26 | D_SHADERS_IDX, |
| 27 | D_STATESAVES_IDX, | 27 | D_STATESAVES_IDX, |
| 28 | D_SCREENSHOTS_IDX, | 28 | D_SCREENSHOTS_IDX, |
| 29 | D_SDMC_IDX, | 29 | D_SDMC_IDX, |
| 30 | D_HIRESTEXTURES_IDX, | 30 | D_HIRESTEXTURES_IDX, |
| 31 | D_DUMP_IDX, | 31 | D_DUMP_IDX, |
| 32 | D_DUMPFRAMES_IDX, | 32 | D_DUMPFRAMES_IDX, |
| 33 | D_DUMPAUDIO_IDX, | 33 | D_DUMPAUDIO_IDX, |
| 34 | D_DUMPTEXTURES_IDX, | 34 | D_DUMPTEXTURES_IDX, |
| 35 | D_DUMPDSP_IDX, | 35 | D_DUMPDSP_IDX, |
| 36 | D_LOGS_IDX, | 36 | D_LOGS_IDX, |
| 37 | D_SYSCONF_IDX, | 37 | D_SYSCONF_IDX, |
| 38 | F_EMUCONFIG_IDX, | 38 | F_EMUCONFIG_IDX, |
| 39 | F_DEBUGGERCONFIG_IDX, | 39 | F_DEBUGGERCONFIG_IDX, |
| 40 | F_LOGGERCONFIG_IDX, | 40 | F_LOGGERCONFIG_IDX, |
| 41 | F_MAINLOG_IDX, | 41 | F_MAINLOG_IDX, |
| 42 | F_RAMDUMP_IDX, | 42 | F_RAMDUMP_IDX, |
| 43 | F_ARAMDUMP_IDX, | 43 | F_ARAMDUMP_IDX, |
| 44 | F_SYSCONF_IDX, | 44 | F_SYSCONF_IDX, |
| 45 | NUM_PATH_INDICES | 45 | NUM_PATH_INDICES |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | namespace FileUtil | 48 | namespace FileUtil |
| @@ -51,11 +51,11 @@ namespace FileUtil | |||
| 51 | // FileSystem tree node/ | 51 | // FileSystem tree node/ |
| 52 | struct FSTEntry | 52 | struct FSTEntry |
| 53 | { | 53 | { |
| 54 | bool isDirectory; | 54 | bool isDirectory; |
| 55 | u64 size; // file length or number of entries from children | 55 | u64 size; // file length or number of entries from children |
| 56 | std::string physicalName; // name on disk | 56 | std::string physicalName; // name on disk |
| 57 | std::string virtualName; // name in FST names table | 57 | std::string virtualName; // name in FST names table |
| 58 | std::vector<FSTEntry> children; | 58 | std::vector<FSTEntry> children; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | // Returns true if file filename exists | 61 | // Returns true if file filename exists |
| @@ -148,86 +148,86 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam | |||
| 148 | class IOFile : public NonCopyable | 148 | class IOFile : public NonCopyable |
| 149 | { | 149 | { |
| 150 | public: | 150 | public: |
| 151 | IOFile(); | 151 | IOFile(); |
| 152 | IOFile(std::FILE* file); | 152 | IOFile(std::FILE* file); |
| 153 | IOFile(const std::string& filename, const char openmode[]); | 153 | IOFile(const std::string& filename, const char openmode[]); |
| 154 | 154 | ||
| 155 | ~IOFile(); | 155 | ~IOFile(); |
| 156 | 156 | ||
| 157 | IOFile(IOFile&& other); | 157 | IOFile(IOFile&& other); |
| 158 | IOFile& operator=(IOFile&& other); | 158 | IOFile& operator=(IOFile&& other); |
| 159 | 159 | ||
| 160 | void Swap(IOFile& other); | 160 | void Swap(IOFile& other); |
| 161 | 161 | ||
| 162 | bool Open(const std::string& filename, const char openmode[]); | 162 | bool Open(const std::string& filename, const char openmode[]); |
| 163 | bool Close(); | 163 | bool Close(); |
| 164 | 164 | ||
| 165 | template <typename T> | 165 | template <typename T> |
| 166 | size_t ReadArray(T* data, size_t length) | 166 | size_t ReadArray(T* data, size_t length) |
| 167 | { | 167 | { |
| 168 | if (!IsOpen()) { | 168 | if (!IsOpen()) { |
| 169 | m_good = false; | 169 | m_good = false; |
| 170 | return -1; | 170 | return -1; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | size_t items_read = std::fread(data, sizeof(T), length, m_file); | 173 | size_t items_read = std::fread(data, sizeof(T), length, m_file); |
| 174 | if (items_read != length) | 174 | if (items_read != length) |
| 175 | m_good = false; | 175 | m_good = false; |
| 176 | 176 | ||
| 177 | return items_read; | 177 | return items_read; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | template <typename T> | 180 | template <typename T> |
| 181 | size_t WriteArray(const T* data, size_t length) | 181 | size_t WriteArray(const T* data, size_t length) |
| 182 | { | 182 | { |
| 183 | if (!IsOpen()) { | 183 | if (!IsOpen()) { |
| 184 | m_good = false; | 184 | m_good = false; |
| 185 | return -1; | 185 | return -1; |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | size_t items_written = std::fwrite(data, sizeof(T), length, m_file); | 188 | size_t items_written = std::fwrite(data, sizeof(T), length, m_file); |
| 189 | if (items_written != length) | 189 | if (items_written != length) |
| 190 | m_good = false; | 190 | m_good = false; |
| 191 | 191 | ||
| 192 | return items_written; | 192 | return items_written; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | size_t ReadBytes(void* data, size_t length) | 195 | size_t ReadBytes(void* data, size_t length) |
| 196 | { | 196 | { |
| 197 | return ReadArray(reinterpret_cast<char*>(data), length); | 197 | return ReadArray(reinterpret_cast<char*>(data), length); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | size_t WriteBytes(const void* data, size_t length) | 200 | size_t WriteBytes(const void* data, size_t length) |
| 201 | { | 201 | { |
| 202 | return WriteArray(reinterpret_cast<const char*>(data), length); | 202 | return WriteArray(reinterpret_cast<const char*>(data), length); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | bool IsOpen() { return NULL != m_file; } | 205 | bool IsOpen() { return NULL != m_file; } |
| 206 | 206 | ||
| 207 | // m_good is set to false when a read, write or other function fails | 207 | // m_good is set to false when a read, write or other function fails |
| 208 | bool IsGood() { return m_good; } | 208 | bool IsGood() { return m_good; } |
| 209 | operator void*() { return m_good ? m_file : NULL; } | 209 | operator void*() { return m_good ? m_file : NULL; } |
| 210 | 210 | ||
| 211 | std::FILE* ReleaseHandle(); | 211 | std::FILE* ReleaseHandle(); |
| 212 | 212 | ||
| 213 | std::FILE* GetHandle() { return m_file; } | 213 | std::FILE* GetHandle() { return m_file; } |
| 214 | 214 | ||
| 215 | void SetHandle(std::FILE* file); | 215 | void SetHandle(std::FILE* file); |
| 216 | 216 | ||
| 217 | bool Seek(s64 off, int origin); | 217 | bool Seek(s64 off, int origin); |
| 218 | u64 Tell(); | 218 | u64 Tell(); |
| 219 | u64 GetSize(); | 219 | u64 GetSize(); |
| 220 | bool Resize(u64 size); | 220 | bool Resize(u64 size); |
| 221 | bool Flush(); | 221 | bool Flush(); |
| 222 | 222 | ||
| 223 | // clear error state | 223 | // clear error state |
| 224 | void Clear() { m_good = true; std::clearerr(m_file); } | 224 | void Clear() { m_good = true; std::clearerr(m_file); } |
| 225 | 225 | ||
| 226 | std::FILE* m_file; | 226 | std::FILE* m_file; |
| 227 | bool m_good; | 227 | bool m_good; |
| 228 | private: | 228 | private: |
| 229 | IOFile(IOFile&); | 229 | IOFile(IOFile&); |
| 230 | IOFile& operator=(IOFile& other); | 230 | IOFile& operator=(IOFile& other); |
| 231 | }; | 231 | }; |
| 232 | 232 | ||
| 233 | } // namespace | 233 | } // namespace |
| @@ -237,8 +237,8 @@ template <typename T> | |||
| 237 | void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) | 237 | void OpenFStream(T& fstream, const std::string& filename, std::ios_base::openmode openmode) |
| 238 | { | 238 | { |
| 239 | #ifdef _WIN32 | 239 | #ifdef _WIN32 |
| 240 | fstream.open(Common::UTF8ToTStr(filename).c_str(), openmode); | 240 | fstream.open(Common::UTF8ToTStr(filename).c_str(), openmode); |
| 241 | #else | 241 | #else |
| 242 | fstream.open(filename.c_str(), openmode); | 242 | fstream.open(filename.c_str(), openmode); |
| 243 | #endif | 243 | #endif |
| 244 | } | 244 | } |
diff --git a/src/common/mem_arena.cpp b/src/common/mem_arena.cpp index 31ca27b42..67dbaf509 100644 --- a/src/common/mem_arena.cpp +++ b/src/common/mem_arena.cpp | |||
| @@ -38,7 +38,7 @@ void* globalbase = NULL; | |||
| 38 | // Hopefully this ABI will never change... | 38 | // Hopefully this ABI will never change... |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | #define ASHMEM_DEVICE "/dev/ashmem" | 41 | #define ASHMEM_DEVICE "/dev/ashmem" |
| 42 | 42 | ||
| 43 | /* | 43 | /* |
| 44 | * ashmem_create_region - creates a new ashmem region and returns the file | 44 | * ashmem_create_region - creates a new ashmem region and returns the file |
| @@ -273,10 +273,10 @@ u8* MemArena::Find4GBBase() | |||
| 273 | 273 | ||
| 274 | // yeah, this could also be done in like two bitwise ops... | 274 | // yeah, this could also be done in like two bitwise ops... |
| 275 | #define SKIP(a_flags, b_flags) | 275 | #define SKIP(a_flags, b_flags) |
| 276 | // if (!(a_flags & MV_WII_ONLY) && (b_flags & MV_WII_ONLY)) | 276 | //if (!(a_flags & MV_WII_ONLY) && (b_flags & MV_WII_ONLY)) |
| 277 | // continue; | 277 | // continue; |
| 278 | // if (!(a_flags & MV_FAKE_VMEM) && (b_flags & MV_FAKE_VMEM)) | 278 | //if (!(a_flags & MV_FAKE_VMEM) && (b_flags & MV_FAKE_VMEM)) |
| 279 | // continue; | 279 | // continue; |
| 280 | 280 | ||
| 281 | static bool Memory_TryBase(u8 *base, const MemoryView *views, int num_views, u32 flags, MemArena *arena) { | 281 | static bool Memory_TryBase(u8 *base, const MemoryView *views, int num_views, u32 flags, MemArena *arena) { |
| 282 | // OK, we know where to find free space. Now grab it! | 282 | // OK, we know where to find free space. Now grab it! |
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index d6e9dc849..558c6cbf7 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -41,7 +41,7 @@ struct BaseEvent | |||
| 41 | s64 time; | 41 | s64 time; |
| 42 | u64 userdata; | 42 | u64 userdata; |
| 43 | int type; | 43 | int type; |
| 44 | // Event *next; | 44 | // Event *next; |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | typedef LinkedListItem<BaseEvent> Event; | 47 | typedef LinkedListItem<BaseEvent> Event; |
| @@ -469,8 +469,8 @@ void ProcessFifoWaitEvents() | |||
| 469 | { | 469 | { |
| 470 | if (first->time <= globalTimer) | 470 | if (first->time <= globalTimer) |
| 471 | { | 471 | { |
| 472 | // LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", | 472 | //LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", |
| 473 | // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); | 473 | // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); |
| 474 | Event* evt = first; | 474 | Event* evt = first; |
| 475 | first = first->next; | 475 | first = first->next; |
| 476 | event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); | 476 | event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); |
| @@ -516,23 +516,23 @@ void Advance() | |||
| 516 | //currentMIPS->downcount = slicelength; | 516 | //currentMIPS->downcount = slicelength; |
| 517 | 517 | ||
| 518 | //if (Common::AtomicLoadAcquire(hasTsEvents)) | 518 | //if (Common::AtomicLoadAcquire(hasTsEvents)) |
| 519 | // MoveEvents(); | 519 | // MoveEvents(); |
| 520 | //ProcessFifoWaitEvents(); | 520 | //ProcessFifoWaitEvents(); |
| 521 | 521 | ||
| 522 | //if (!first) | 522 | //if (!first) |
| 523 | //{ | 523 | //{ |
| 524 | // // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); | 524 | // // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); |
| 525 | // currentMIPS->downcount += 10000; | 525 | // currentMIPS->downcount += 10000; |
| 526 | //} | 526 | //} |
| 527 | //else | 527 | //else |
| 528 | //{ | 528 | //{ |
| 529 | // slicelength = (int)(first->time - globalTimer); | 529 | // slicelength = (int)(first->time - globalTimer); |
| 530 | // if (slicelength > MAX_SLICE_LENGTH) | 530 | // if (slicelength > MAX_SLICE_LENGTH) |
| 531 | // slicelength = MAX_SLICE_LENGTH; | 531 | // slicelength = MAX_SLICE_LENGTH; |
| 532 | // currentMIPS->downcount = slicelength; | 532 | // currentMIPS->downcount = slicelength; |
| 533 | //} | 533 | //} |
| 534 | //if (advanceCallback) | 534 | //if (advanceCallback) |
| 535 | // advanceCallback(cyclesExecuted); | 535 | // advanceCallback(cyclesExecuted); |
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | void LogPendingEvents() | 538 | void LogPendingEvents() |
| @@ -550,20 +550,20 @@ void Idle(int maxIdle) | |||
| 550 | ERROR_LOG(TIME, "Unimplemented function!"); | 550 | ERROR_LOG(TIME, "Unimplemented function!"); |
| 551 | //int cyclesDown = currentMIPS->downcount; | 551 | //int cyclesDown = currentMIPS->downcount; |
| 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) | 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) |
| 553 | // cyclesDown = maxIdle; | 553 | // cyclesDown = maxIdle; |
| 554 | 554 | ||
| 555 | //if (first && cyclesDown > 0) | 555 | //if (first && cyclesDown > 0) |
| 556 | //{ | 556 | //{ |
| 557 | // int cyclesExecuted = slicelength - currentMIPS->downcount; | 557 | // int cyclesExecuted = slicelength - currentMIPS->downcount; |
| 558 | // int cyclesNextEvent = (int) (first->time - globalTimer); | 558 | // int cyclesNextEvent = (int) (first->time - globalTimer); |
| 559 | 559 | ||
| 560 | // if (cyclesNextEvent < cyclesExecuted + cyclesDown) | 560 | // if (cyclesNextEvent < cyclesExecuted + cyclesDown) |
| 561 | // { | 561 | // { |
| 562 | // cyclesDown = cyclesNextEvent - cyclesExecuted; | 562 | // cyclesDown = cyclesNextEvent - cyclesExecuted; |
| 563 | // // Now, now... no time machines, please. | 563 | // // Now, now... no time machines, please. |
| 564 | // if (cyclesDown < 0) | 564 | // if (cyclesDown < 0) |
| 565 | // cyclesDown = 0; | 565 | // cyclesDown = 0; |
| 566 | // } | 566 | // } |
| 567 | //} | 567 | //} |
| 568 | 568 | ||
| 569 | //INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f)); | 569 | //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) | |||
| 571 | //idledCycles += cyclesDown; | 571 | //idledCycles += cyclesDown; |
| 572 | //currentMIPS->downcount -= cyclesDown; | 572 | //currentMIPS->downcount -= cyclesDown; |
| 573 | //if (currentMIPS->downcount == 0) | 573 | //if (currentMIPS->downcount == 0) |
| 574 | // currentMIPS->downcount = -1; | 574 | // currentMIPS->downcount = -1; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | std::string GetScheduledEventsSummary() | 577 | std::string GetScheduledEventsSummary() |
| @@ -623,4 +623,4 @@ void DoState(PointerWrap &p) | |||
| 623 | p.Do(idledCycles); | 623 | p.Do(idledCycles); |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | } // namespace | 626 | } // namespace |
diff --git a/src/core/system.h b/src/core/system.h index 0be8711e4..2bc2edc75 100644 --- a/src/core/system.h +++ b/src/core/system.h | |||
| @@ -12,14 +12,14 @@ namespace System { | |||
| 12 | 12 | ||
| 13 | // State of the full emulator | 13 | // State of the full emulator |
| 14 | enum State { | 14 | enum State { |
| 15 | STATE_NULL = 0, ///< System is in null state, nothing initialized | 15 | STATE_NULL = 0, ///< System is in null state, nothing initialized |
| 16 | STATE_IDLE, ///< System is in an initialized state, but not running | 16 | STATE_IDLE, ///< System is in an initialized state, but not running |
| 17 | STATE_RUNNING, ///< System is running | 17 | STATE_RUNNING, ///< System is running |
| 18 | STATE_LOADING, ///< System is loading a ROM | 18 | STATE_LOADING, ///< System is loading a ROM |
| 19 | STATE_HALTED, ///< System is halted (error) | 19 | STATE_HALTED, ///< System is halted (error) |
| 20 | STATE_STALLED, ///< System is stalled (unused) | 20 | STATE_STALLED, ///< System is stalled (unused) |
| 21 | STATE_DEBUG, ///< System is in a special debug mode (unused) | 21 | STATE_DEBUG, ///< System is in a special debug mode (unused) |
| 22 | STATE_DIE ///< System is shutting down | 22 | STATE_DIE ///< System is shutting down |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | extern volatile State g_state; | 25 | extern volatile State g_state; |
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 22b8e9950..275b06b7c 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -318,9 +318,9 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) { | |||
| 318 | return; | 318 | return; |
| 319 | 319 | ||
| 320 | #ifndef HAVE_PNG | 320 | #ifndef HAVE_PNG |
| 321 | return; | 321 | return; |
| 322 | #else | 322 | #else |
| 323 | if (!data) | 323 | if (!data) |
| 324 | return; | 324 | return; |
| 325 | 325 | ||
| 326 | // Write data to file | 326 | // Write data to file |
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h index 8b1499bf2..b1558cfae 100644 --- a/src/video_core/debug_utils/debug_utils.h +++ b/src/video_core/debug_utils/debug_utils.h | |||
| @@ -41,7 +41,7 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data | |||
| 41 | // Utility class to log Pica commands. | 41 | // Utility class to log Pica commands. |
| 42 | struct PicaTrace { | 42 | struct PicaTrace { |
| 43 | struct Write : public std::pair<u32,u32> { | 43 | struct Write : public std::pair<u32,u32> { |
| 44 | Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {} | 44 | Write(u32 id, u32 value) : std::pair<u32,u32>(id, value) {} |
| 45 | 45 | ||
| 46 | u32& Id() { return first; } | 46 | u32& Id() { return first; } |
| 47 | const u32& Id() const { return first; } | 47 | const u32& Id() const { return first; } |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 729e8e73d..abbb4c2cb 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -239,7 +239,7 @@ MathUtil::Rectangle<unsigned> RendererOpenGL::GetViewportExtent() { | |||
| 239 | 239 | ||
| 240 | MathUtil::Rectangle<unsigned> viewport_extent; | 240 | MathUtil::Rectangle<unsigned> viewport_extent; |
| 241 | if (window_aspect_ratio > emulation_aspect_ratio) { | 241 | if (window_aspect_ratio > emulation_aspect_ratio) { |
| 242 | // Window is narrower than the emulation content => apply borders to the top and bottom | 242 | // Window is narrower than the emulation content => apply borders to the top and bottom |
| 243 | unsigned viewport_height = emulation_aspect_ratio * framebuffer_width; | 243 | unsigned viewport_height = emulation_aspect_ratio * framebuffer_width; |
| 244 | viewport_extent.left = 0; | 244 | viewport_extent.left = 0; |
| 245 | viewport_extent.top = (framebuffer_height - viewport_height) / 2; | 245 | viewport_extent.top = (framebuffer_height - viewport_height) / 2; |
diff --git a/src/video_core/utils.h b/src/video_core/utils.h index 9cb3d4d43..21380a908 100644 --- a/src/video_core/utils.h +++ b/src/video_core/utils.h | |||
| @@ -12,24 +12,24 @@ namespace FormatPrecision { | |||
| 12 | 12 | ||
| 13 | /// Adjust RGBA8 color with RGBA6 precision | 13 | /// Adjust RGBA8 color with RGBA6 precision |
| 14 | static inline u32 rgba8_with_rgba6(u32 src) { | 14 | static inline u32 rgba8_with_rgba6(u32 src) { |
| 15 | u32 color = src; | 15 | u32 color = src; |
| 16 | color &= 0xFCFCFCFC; | 16 | color &= 0xFCFCFCFC; |
| 17 | color |= (color >> 6) & 0x03030303; | 17 | color |= (color >> 6) & 0x03030303; |
| 18 | return color; | 18 | return color; |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | /// Adjust RGBA8 color with RGB565 precision | 21 | /// Adjust RGBA8 color with RGB565 precision |
| 22 | static inline u32 rgba8_with_rgb565(u32 src) { | 22 | static inline u32 rgba8_with_rgb565(u32 src) { |
| 23 | u32 color = (src & 0xF8FCF8); | 23 | u32 color = (src & 0xF8FCF8); |
| 24 | color |= (color >> 5) & 0x070007; | 24 | color |= (color >> 5) & 0x070007; |
| 25 | color |= (color >> 6) & 0x000300; | 25 | color |= (color >> 6) & 0x000300; |
| 26 | color |= 0xFF000000; | 26 | color |= 0xFF000000; |
| 27 | return color; | 27 | return color; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | /// Adjust Z24 depth value with Z16 precision | 30 | /// Adjust Z24 depth value with Z16 precision |
| 31 | static inline u32 z24_with_z16(u32 src) { | 31 | static inline u32 z24_with_z16(u32 src) { |
| 32 | return (src & 0xFFFF00) | (src >> 16); | 32 | return (src & 0xFFFF00) | (src >> 16); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | } // namespace | 35 | } // namespace |