Skip to content

Commit a9b6344

Browse files
DerThoreWDrijver
andauthored
Update RefreshGList to be more compatible (#126)
* Fixed Typo in copper.h * Add Interlace modes, prepare SuperHires * Implement setwritemask * Implement minterms * Implement minterms * Implement minterms * Implement minterms * Implement minterms * Implement minterms * Implement minterms * WritePixel rewrite * dragging and swapping screens * Show screens while dragging needs an "anti flicker" in future. * Repair requesters Show requesters with raster background correctly * Temp workaround for SysInfo * Temp workaround for SysInfo * Better detection of matching screenmode * Better detection of matching screenmode * Mouse Pointer visible in flipped screen * Better detection for CGX screens * Aktualisieren von bestmodeida.c * Aktualisieren von bestmodeida.c * Aktualisieren von bestmodeida.c * Update bestmodeida.c * Correcting parameter order * Update amigavideo_hiddclass.c Activate prepared SuperHires * Update videocontrol.c Correct some, added missing ones. * Update videocontrol.c added missing define * Remove RT from AllocMem * Remove RT from AllocMem * Enhance GELS with HWSprites * Update drawglist.c * Update start.c for new core * added missing pointer added missing pointer and BORDER collision preset * DA/DD bus * DA/DD IDE Bus * DA/DD IDE Bus * DA/DD IDE Bus * DD/DA IDE Bus * DA/DD IDE Bus * DA/DD IDE Bus * DA/DD Gayle * DA/DD Gayle * DA/DD Gayle * DA/DD Gayle * DA/DD Gayle * Add GadGImage --------- Co-authored-by: Willem Drijver <60568860+WDrijver@users.noreply.github.com>
1 parent 9350aa2 commit a9b6344

1 file changed

Lines changed: 27 additions & 14 deletions

File tree

rom/intuition/refreshglist.c

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ struct Gadget *findprevgadget(struct Gadget *gadget,struct Window *window,struct
9191
gadgets = requester->ReqGadget;
9292
}
9393

94-
#ifdef USEGADGETLOCK
94+
// Lock both in any way. If not correct, revert, but it seems fine
95+
//#ifdef USEGADGETLOCK
9596
LOCKGADGET(IntuitionBase)
96-
#else
97+
//#else
9798
LOCKWINDOWLAYERS(window);
98-
#endif
99+
//#endif
99100

100101
int_refreshglist(gadgets,
101102
window,
@@ -105,11 +106,11 @@ struct Gadget *findprevgadget(struct Gadget *gadget,struct Window *window,struct
105106
0,
106107
IntuitionBase);
107108

108-
#ifdef USEGADGETLOCK
109+
//#ifdef USEGADGETLOCK
109110
UNLOCKGADGET(IntuitionBase)
110-
#else
111+
//#else
111112
UNLOCKWINDOWLAYERS(window);
112-
#endif
113+
//#endif
113114

114115
ReturnVoid("RefreshGList");
115116

@@ -120,6 +121,10 @@ void int_refreshglist(struct Gadget *gadgets, struct Window *window,
120121
struct Requester *requester, LONG numGad, LONG mustbe, LONG mustnotbe,
121122
struct IntuitionBase *IntuitionBase)
122123
{
124+
125+
// Might help to undef this
126+
#undef GADTOOLSCOMPATIBLE
127+
123128
#ifdef GADTOOLSCOMPATIBLE
124129
struct Gadget *gadtoolsgadget = 0;
125130
#endif
@@ -131,15 +136,15 @@ void int_refreshglist(struct Gadget *gadgets, struct Window *window,
131136
gadgets, window, requester, numGad, mustbe, mustnotbe));
132137

133138
// in case we're not called from RefreshGList...
134-
#ifdef USEGADGETLOCK
139+
//#ifdef USEGADGETLOCK
135140
LOCKGADGET(IntuitionBase)
136-
#else
141+
//#else
137142
LOCKWINDOWLAYERS(window);
138-
#endif
143+
//#endif
139144

140145
for ( ; gadgets && numGad; gadgets=gadgets->NextGadget, numGad --)
141146
{
142-
if (gadgets->GadgetType == 0)
147+
if ((gadgets->GadgetType == 0) || (gadgets->GadgetType == 0x100) || (gadgets->GadgetType == 0x105) || (gadgets->Flags == 0x8007))
143148
{
144149
#ifdef GADTOOLSCOMPATIBLE
145150
if (gadgets->GadgetType & 0x100)
@@ -172,7 +177,7 @@ void int_refreshglist(struct Gadget *gadgets, struct Window *window,
172177
gadgets = firstgad;
173178
for ( ; gadgets && numGad; gadgets=gadgets->NextGadget, numGad --)
174179
{
175-
if (gadgets->GadgetType > 0)
180+
if ((gadgets->GadgetType > 0) && (gadgets->GadgetType != 0x100) && (gadgets->GadgetType != 0x105) && (gadgets->Flags != 0x8007))
176181
{
177182
#ifdef GADTOOLSCOMPATIBLE
178183
if (gadgets->GadgetType & 0x100)
@@ -213,11 +218,11 @@ void int_refreshglist(struct Gadget *gadgets, struct Window *window,
213218
}
214219
#endif
215220

216-
#ifdef USEGADGETLOCK
221+
//#ifdef USEGADGETLOCK
217222
UNLOCKGADGET(IntuitionBase)
218-
#else
223+
//#else
219224
UNLOCKWINDOWLAYERS(window);
220-
#endif
225+
//#endif
221226
}
222227

223228
BOOL qualifygadget(struct Gadget *gadgets,LONG mustbe, LONG mustnotbe,struct IntuitionBase *IntuitionBase)
@@ -271,6 +276,14 @@ BOOL qualifygadget(struct Gadget *gadgets,LONG mustbe, LONG mustnotbe,struct Int
271276
{
272277
if (mustbe & REFRESHGAD_BOOPSI) return FALSE; /* don't refresh if not boopsi gadget */
273278
}
279+
if (gadgets->Flags & (GFLG_GADGIMAGE|GFLG_GADGHNONE) == GFLG_GADGIMAGE|GFLG_GADGHNONE)
280+
{
281+
if (mustnotbe & REFRESHGAD_BOOPSI) return FALSE; /* don't refresh if boopsi gadget */
282+
}
283+
else
284+
{
285+
if (mustbe & REFRESHGAD_BOOPSI) return FALSE; /* don't refresh if not boopsi gadget */
286+
}
274287

275288
} /* if ((mustbe != 0) || (mustnotbe != 0)) */
276289
return TRUE;

0 commit comments

Comments
 (0)