aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpu_neon/psx_gpu_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gpu_neon/psx_gpu_if.c')
-rw-r--r--plugins/gpu_neon/psx_gpu_if.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/gpu_neon/psx_gpu_if.c b/plugins/gpu_neon/psx_gpu_if.c
index ad01761..3f3805a 100644
--- a/plugins/gpu_neon/psx_gpu_if.c
+++ b/plugins/gpu_neon/psx_gpu_if.c
@@ -9,7 +9,12 @@
*/
#include <stdio.h>
+
+#ifdef _WIN32
+#include <mman.h>
+#else
#include <sys/mman.h>
+#endif
extern const unsigned char cmd_lengths[256];
#define command_lengths cmd_lengths
@@ -184,4 +189,18 @@ void renderer_set_config(const struct rearmed_cbs *cbs)
map_enhancement_buffer();
if (cbs->pl_set_gpu_caps)
cbs->pl_set_gpu_caps(GPU_CAP_SUPPORTS_2X);
+
+ egpu.use_dithering = cbs->gpu_neon.allow_dithering;
+ if(!egpu.use_dithering) {
+ egpu.dither_table[0] = dither_table_row(0, 0, 0, 0);
+ egpu.dither_table[1] = dither_table_row(0, 0, 0, 0);
+ egpu.dither_table[2] = dither_table_row(0, 0, 0, 0);
+ egpu.dither_table[3] = dither_table_row(0, 0, 0, 0);
+ } else {
+ egpu.dither_table[0] = dither_table_row(-4, 0, -3, 1);
+ egpu.dither_table[1] = dither_table_row(2, -2, 3, -1);
+ egpu.dither_table[2] = dither_table_row(-3, 1, -4, 0);
+ egpu.dither_table[3] = dither_table_row(3, -1, 2, -2);
+ }
+
}