summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/file_sys/disk_filesystem.cpp6
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp4
-rw-r--r--src/core/hle/service/sockets/bsd.cpp3
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp11
4 files changed, 15 insertions, 9 deletions
diff --git a/src/core/file_sys/disk_filesystem.cpp b/src/core/file_sys/disk_filesystem.cpp
index 8c6f15bb5..d248c2df4 100644
--- a/src/core/file_sys/disk_filesystem.cpp
+++ b/src/core/file_sys/disk_filesystem.cpp
@@ -58,11 +58,13 @@ ResultVal<std::unique_ptr<StorageBackend>> Disk_FileSystem::OpenFile(const std::
}
ResultCode Disk_FileSystem::DeleteFile(const std::string& path) const {
- if (!FileUtil::Exists(path)) {
+ std::string full_path = base_directory + path;
+
+ if (!FileUtil::Exists(full_path)) {
return ERROR_PATH_NOT_FOUND;
}
- FileUtil::Delete(path);
+ FileUtil::Delete(full_path);
return RESULT_SUCCESS;
}
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index 609cdbff2..2532dd450 100644
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -214,8 +214,8 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(Thread& thread) {
(sizeof(IPC::CommandHeader) + sizeof(IPC::HandleDescriptorHeader)) / sizeof(u32);
ASSERT_MSG(!handle_descriptor_header->send_current_pid, "Sending PID is not implemented");
- ASSERT_MSG(copy_objects.size() == handle_descriptor_header->num_handles_to_copy);
- ASSERT_MSG(move_objects.size() == handle_descriptor_header->num_handles_to_move);
+ ASSERT(copy_objects.size() == handle_descriptor_header->num_handles_to_copy);
+ ASSERT(move_objects.size() == handle_descriptor_header->num_handles_to_move);
// We don't make a distinction between copy and move handles when translating since HLE
// services don't deal with handles directly. However, the guest applications might check
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 32648bdd9..6aa1e2511 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -19,10 +19,9 @@ void BSD::RegisterClient(Kernel::HLERequestContext& ctx) {
void BSD::StartMonitoring(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
- IPC::ResponseBuilder rb{ctx, 3};
+ IPC::ResponseBuilder rb{ctx, 2};
rb.Push(RESULT_SUCCESS);
- rb.Push<u32>(0); // bsd errno
}
void BSD::Socket(Kernel::HLERequestContext& ctx) {
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 2e91a43e3..eecbc5ff0 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -324,9 +324,6 @@ std::pair<Surface, Surface> RasterizerOpenGL::ConfigureFramebuffers(bool using_c
bool using_depth_fb) {
const auto& regs = Core::System().GetInstance().GPU().Maxwell3D().regs;
- // Sync the depth test state before configuring the framebuffer surfaces.
- SyncDepthTestState();
-
// TODO(bunnei): Implement this
const bool has_stencil = false;
@@ -391,6 +388,13 @@ void RasterizerOpenGL::Clear() {
if (regs.clear_buffers.Z) {
clear_mask |= GL_DEPTH_BUFFER_BIT;
use_depth_fb = true;
+
+ // Always enable the depth write when clearing the depth buffer. The depth write mask is
+ // ignored when clearing the buffer in the Switch, but OpenGL obeys it so we set it to true.
+ state.depth.test_enabled = true;
+ state.depth.write_mask = GL_TRUE;
+ state.depth.test_func = GL_ALWAYS;
+ state.Apply();
}
if (clear_mask == 0)
@@ -429,6 +433,7 @@ void RasterizerOpenGL::DrawArrays() {
auto [dirty_color_surface, dirty_depth_surface] =
ConfigureFramebuffers(true, regs.zeta.Address() != 0);
+ SyncDepthTestState();
SyncBlendState();
SyncCullMode();