diff options
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 4 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics_framebuffer.cpp | 16 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics_framebuffer.hxx | 4 | ||||
| -rw-r--r-- | src/core/hle/service/soc_u.cpp | 8 |
4 files changed, 16 insertions, 16 deletions
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 753cc25da..708b805a7 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -229,7 +229,7 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace& | |||
| 229 | cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) | 229 | cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4) |
| 230 | 230 | ||
| 231 | void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { | 231 | void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { |
| 232 | const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); | 232 | const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt(); |
| 233 | if (COMMAND_IN_RANGE(command_id, texture0) || | 233 | if (COMMAND_IN_RANGE(command_id, texture0) || |
| 234 | COMMAND_IN_RANGE(command_id, texture1) || | 234 | COMMAND_IN_RANGE(command_id, texture1) || |
| 235 | COMMAND_IN_RANGE(command_id, texture2)) { | 235 | COMMAND_IN_RANGE(command_id, texture2)) { |
| @@ -255,7 +255,7 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) { | |||
| 255 | void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { | 255 | void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) { |
| 256 | QWidget* new_info_widget; | 256 | QWidget* new_info_widget; |
| 257 | 257 | ||
| 258 | const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt(); | 258 | const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt(); |
| 259 | if (COMMAND_IN_RANGE(command_id, texture0) || | 259 | if (COMMAND_IN_RANGE(command_id, texture0) || |
| 260 | COMMAND_IN_RANGE(command_id, texture1) || | 260 | COMMAND_IN_RANGE(command_id, texture1) || |
| 261 | COMMAND_IN_RANGE(command_id, texture2)) { | 261 | COMMAND_IN_RANGE(command_id, texture2)) { |
diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp index dd41c3880..b4e585c2b 100644 --- a/src/citra_qt/debugger/graphics_framebuffer.cpp +++ b/src/citra_qt/debugger/graphics_framebuffer.cpp | |||
| @@ -157,7 +157,7 @@ void GraphicsFramebufferWidget::OnFramebufferAddressChanged(qint64 new_value) | |||
| 157 | } | 157 | } |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | void GraphicsFramebufferWidget::OnFramebufferWidthChanged(int new_value) | 160 | void GraphicsFramebufferWidget::OnFramebufferWidthChanged(unsigned int new_value) |
| 161 | { | 161 | { |
| 162 | if (framebuffer_width != new_value) { | 162 | if (framebuffer_width != new_value) { |
| 163 | framebuffer_width = new_value; | 163 | framebuffer_width = new_value; |
| @@ -167,7 +167,7 @@ void GraphicsFramebufferWidget::OnFramebufferWidthChanged(int new_value) | |||
| 167 | } | 167 | } |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | void GraphicsFramebufferWidget::OnFramebufferHeightChanged(int new_value) | 170 | void GraphicsFramebufferWidget::OnFramebufferHeightChanged(unsigned int new_value) |
| 171 | { | 171 | { |
| 172 | if (framebuffer_height != new_value) { | 172 | if (framebuffer_height != new_value) { |
| 173 | framebuffer_height = new_value; | 173 | framebuffer_height = new_value; |
| @@ -225,8 +225,8 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 225 | { | 225 | { |
| 226 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); | 226 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); |
| 227 | u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); | 227 | u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); |
| 228 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 228 | for (unsigned int y = 0; y < framebuffer_height; ++y) { |
| 229 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 229 | for (unsigned int x = 0; x < framebuffer_width; ++x) { |
| 230 | u32 value = *(color_buffer + x + y * framebuffer_width); | 230 | u32 value = *(color_buffer + x + y * framebuffer_width); |
| 231 | 231 | ||
| 232 | decoded_image.setPixel(x, y, qRgba((value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, 255/*value >> 24*/)); | 232 | decoded_image.setPixel(x, y, qRgba((value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, 255/*value >> 24*/)); |
| @@ -240,8 +240,8 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 240 | { | 240 | { |
| 241 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); | 241 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); |
| 242 | u8* color_buffer = Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); | 242 | u8* color_buffer = Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); |
| 243 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 243 | for (unsigned int y = 0; y < framebuffer_height; ++y) { |
| 244 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 244 | for (unsigned int x = 0; x < framebuffer_width; ++x) { |
| 245 | u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width; | 245 | u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width; |
| 246 | 246 | ||
| 247 | decoded_image.setPixel(x, y, qRgba(pixel_pointer[0], pixel_pointer[1], pixel_pointer[2], 255/*value >> 24*/)); | 247 | decoded_image.setPixel(x, y, qRgba(pixel_pointer[0], pixel_pointer[1], pixel_pointer[2], 255/*value >> 24*/)); |
| @@ -255,8 +255,8 @@ void GraphicsFramebufferWidget::OnUpdate() | |||
| 255 | { | 255 | { |
| 256 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); | 256 | QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32); |
| 257 | u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); | 257 | u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address)); |
| 258 | for (unsigned y = 0; y < framebuffer_height; ++y) { | 258 | for (unsigned int y = 0; y < framebuffer_height; ++y) { |
| 259 | for (unsigned x = 0; x < framebuffer_width; ++x) { | 259 | for (unsigned int x = 0; x < framebuffer_width; ++x) { |
| 260 | u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); | 260 | u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2); |
| 261 | u8 r = (value >> 11) & 0x1F; | 261 | u8 r = (value >> 11) & 0x1F; |
| 262 | u8 g = (value >> 6) & 0x1F; | 262 | u8 g = (value >> 6) & 0x1F; |
diff --git a/src/citra_qt/debugger/graphics_framebuffer.hxx b/src/citra_qt/debugger/graphics_framebuffer.hxx index 56215761e..02813525c 100644 --- a/src/citra_qt/debugger/graphics_framebuffer.hxx +++ b/src/citra_qt/debugger/graphics_framebuffer.hxx | |||
| @@ -62,8 +62,8 @@ public: | |||
| 62 | public slots: | 62 | public slots: |
| 63 | void OnFramebufferSourceChanged(int new_value); | 63 | void OnFramebufferSourceChanged(int new_value); |
| 64 | void OnFramebufferAddressChanged(qint64 new_value); | 64 | void OnFramebufferAddressChanged(qint64 new_value); |
| 65 | void OnFramebufferWidthChanged(int new_value); | 65 | void OnFramebufferWidthChanged(unsigned int new_value); |
| 66 | void OnFramebufferHeightChanged(int new_value); | 66 | void OnFramebufferHeightChanged(unsigned int new_value); |
| 67 | void OnFramebufferFormatChanged(int new_value); | 67 | void OnFramebufferFormatChanged(int new_value); |
| 68 | void OnUpdate(); | 68 | void OnUpdate(); |
| 69 | 69 | ||
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp index 9fbf18b26..3baf8908f 100644 --- a/src/core/hle/service/soc_u.cpp +++ b/src/core/hle/service/soc_u.cpp | |||
| @@ -308,11 +308,11 @@ static void Socket(Service::Interface* self) { | |||
| 308 | 308 | ||
| 309 | u32 socket_handle = static_cast<u32>(::socket(domain, type, protocol)); | 309 | u32 socket_handle = static_cast<u32>(::socket(domain, type, protocol)); |
| 310 | 310 | ||
| 311 | if (socket_handle != SOCKET_ERROR_VALUE) | 311 | if ((s32)socket_handle != SOCKET_ERROR_VALUE) |
| 312 | open_sockets[socket_handle] = { socket_handle, true }; | 312 | open_sockets[socket_handle] = { socket_handle, true }; |
| 313 | 313 | ||
| 314 | int result = 0; | 314 | int result = 0; |
| 315 | if (socket_handle == SOCKET_ERROR_VALUE) | 315 | if ((s32)socket_handle == SOCKET_ERROR_VALUE) |
| 316 | result = TranslateError(GET_ERRNO); | 316 | result = TranslateError(GET_ERRNO); |
| 317 | 317 | ||
| 318 | cmd_buffer[1] = result; | 318 | cmd_buffer[1] = result; |
| @@ -436,11 +436,11 @@ static void Accept(Service::Interface* self) { | |||
| 436 | socklen_t addr_len = sizeof(addr); | 436 | socklen_t addr_len = sizeof(addr); |
| 437 | u32 ret = static_cast<u32>(::accept(socket_handle, &addr, &addr_len)); | 437 | u32 ret = static_cast<u32>(::accept(socket_handle, &addr, &addr_len)); |
| 438 | 438 | ||
| 439 | if (ret != SOCKET_ERROR_VALUE) | 439 | if ((s32)ret != SOCKET_ERROR_VALUE) |
| 440 | open_sockets[ret] = { ret, true }; | 440 | open_sockets[ret] = { ret, true }; |
| 441 | 441 | ||
| 442 | int result = 0; | 442 | int result = 0; |
| 443 | if (ret == SOCKET_ERROR_VALUE) { | 443 | if ((s32)ret == SOCKET_ERROR_VALUE) { |
| 444 | result = TranslateError(GET_ERRNO); | 444 | result = TranslateError(GET_ERRNO); |
| 445 | } else { | 445 | } else { |
| 446 | CTRSockAddr ctr_addr = CTRSockAddr::FromPlatform(addr); | 446 | CTRSockAddr ctr_addr = CTRSockAddr::FromPlatform(addr); |