Welcome, Guest. Please login or register.

Author Topic: SOLVED_GfxLibrary madness.. stack overflow WTF ?!!  (Read 4265 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: SOLVED_GfxLibrary madness.. stack overflow WTF ?!!
« on: February 27, 2007, 01:29:38 AM »
Quote

int main (int argc, char **argv)
{ LONG RtVl;

  if (RtVl = OpenStuff())
    ProcErr(RtVl);


This part is completely broken.
 
Quote

  /* Preserve old view 2 restore it on exit */
  oldVw = GfxBase->ActiView;


Is this safe?

Quote

  if (RtVl = MkScrn ())
    ProcErr(RtVl);
  else
    { Delay (6 * TICKS_PER_SECOND);
    }


This too.

Quote

  END:
  LoadView(oldVw);
  WaitTOF();
  DestroyScrn();
  CloseStuff();
  exit(0);
}


I would just use OpenScreen() or other not so low level gfx api function...
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: GfxLibrary madness.. stack overflow WTF ?!!
« Reply #1 on: February 27, 2007, 01:32:00 AM »
Quote

Yeah, 2 is very likely. I read the Gfx library on the RKM's a few times and today I finally rushed to mess with it Ironically there was a forum post today by the Friedens that it will be completely replaced on OS4...


No worries since your code probably would not work on anything else than AGA :-P Planar bitmaps, wtf ;-)
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: SOLVED_GfxLibrary madness.. stack overflow WTF ?!!
« Reply #2 on: March 01, 2007, 01:24:32 AM »
Quote

I want to preserve as much chip ram as possible, I'm assuming this will allow me to do that better (will also have to kill other screens too).
But probably the additional space that intuition takes is not much bigger (or at least not in chip ram). Will have to look at this in more detail later...


Intuition screens take the same amount if chip ram. You could call CloseWorkbench() to get rid of Workbench screen but usually it is not desired and such techniques are usable only on floppy systems...

Or just kill the OS and bang HW directly :-)
My Amigas: A500, Mac Mini and PowerBook