Skip to content

Commit

Permalink
Can now cancel opening
Browse files Browse the repository at this point in the history
  • Loading branch information
neauoire committed Apr 26, 2020
1 parent 739354d commit 60ffb17
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
err: OSErr;
totalRead: Longint;
pnt: Point;
bmap: BitMap;

var { window }
windowRect: Rect;
Expand Down Expand Up @@ -114,6 +115,7 @@
prompt: Str255;
sfTypes: SFTypeList;
begin
Cleanup;
SFGetFile(pnt, prompt, nil, -1, sfTypes, nil, reply);
if not reply.good then
Exit(SelectInputFile);
Expand Down Expand Up @@ -157,7 +159,6 @@
{>>}
procedure DrawFile;
var
bmap: BitMap;
headerPtr: ^Longint;
header: Longint;
width, height: Integer;
Expand Down Expand Up @@ -185,7 +186,7 @@
ClosePicture;
ShowWindow(window);
DrawPicture(pic, clip);
Cleanup;
CloseFile;
end;

{ Window ---------------------------------------- }
Expand All @@ -206,7 +207,7 @@
{>>}
procedure Redraw;
begin
Writeln('REDRAW');
CopyBits(bmap, thePort^.portBits, bmap.bounds, bmap.bounds, srcCopy, nil);
end;

{>>}
Expand Down Expand Up @@ -286,9 +287,6 @@
{>>}
procedure HandleNull;
begin
GetDateTime(gCurrentTime);
if gCurrentTime <> gOldTime then
Writeln('something');
end;

{>>}
Expand Down

0 comments on commit 60ffb17

Please sign in to comment.