//#define Z80_NMI 0x0066
#define MD_BPP 32
-#define md_maprgb15(R,G,B) (((R)<<19)|((G)<<11)|((B)<<3))
+#if defined(USE_QT) || defined(_USE_QT) // Using Shader
+# define md_maprgb15(R,G,B) RGB_COLOR((R << 3), (G << 3), (B << 3))
+#else
+# define md_maprgb15(R,G,B) (((R)<<19)|((G)<<11)|((B)<<3))
+#endif
#define md_video_pixbytes(n) (n*32/8)
#define md_refresh_sync() (TRUE)
#define md_video_defaultopt() (0)
int y = 0;
int h = SCREEN_HEIGHT;
for(;h>0; h-=2) {
- dst = emu->screen_buffer(y);
- memcpy(dst, screen+y*SCREEN_WIDTH, SCREEN_WIDTH*4);
- dst = emu->screen_buffer(y+1);
- memcpy(dst, screen+y*SCREEN_WIDTH, SCREEN_WIDTH*4);
+ if((dst = emu->screen_buffer(y)) != NULL) {
+ memcpy(dst, screen+y*SCREEN_WIDTH, SCREEN_WIDTH*4);
+ }
+ if((dst = emu->screen_buffer(y + 1)) != NULL) {
+ memcpy(dst, screen+y*SCREEN_WIDTH, SCREEN_WIDTH*4);
+ }
y+=2;
}
}