Skip to content

Commit 80159bc

Browse files
authored
Merge pull request 86Box#5264 from Cacodemon345/os2-mga-fix
OS/2 3.0 icon backgrounds are now drawn properly
2 parents d7644a9 + 86342bf commit 80159bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/video/vid_mga.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4677,6 +4677,7 @@ blit_trap(mystique_t *mystique)
46774677
int err_l = (int32_t)mystique->dwgreg.ar[1];
46784678
int err_r = (int32_t)mystique->dwgreg.ar[4];
46794679
const int trans_sel = (mystique->dwgreg.dwgctrl_running & DWGCTRL_TRANS_MASK) >> DWGCTRL_TRANS_SHIFT;
4680+
bool transc = !!(mystique->dwgreg.dwgctrl_running & DWGCTRL_TRANSC);
46804681

46814682
switch (mystique->dwgreg.dwgctrl_running & DWGCTRL_ATYPE_MASK) {
46824683
case DWGCTRL_ATYPE_BLK:
@@ -4699,6 +4700,7 @@ blit_trap(mystique_t *mystique)
46994700
int pattern = mystique->dwgreg.pattern[yoff][xoff];
47004701
uint32_t dst;
47014702

4703+
if (!transc || (transc && pattern))
47024704
switch (mystique->maccess_running & MACCESS_PWIDTH_MASK) {
47034705
case MACCESS_PWIDTH_8:
47044706
svga->vram[(mystique->dwgreg.ydst_lin + x_l) & mystique->vram_mask] = (pattern ? mystique->dwgreg.fcol : mystique->dwgreg.bcol) & 0xff;
@@ -4770,6 +4772,7 @@ blit_trap(mystique_t *mystique)
47704772
uint32_t dst;
47714773
uint32_t old_dst;
47724774

4775+
if (!transc || (transc && pattern))
47734776
switch (mystique->maccess_running & MACCESS_PWIDTH_MASK) {
47744777
case MACCESS_PWIDTH_8:
47754778
dst = svga->vram[(mystique->dwgreg.ydst_lin + x_l) & mystique->vram_mask];

0 commit comments

Comments
 (0)