A problem with ptcmouse lazarus / 39-Graphics ---------------------------------------------------------------------- TBMan · 2025-05-14 18:50 If you change the code to anything but 320x200 there isn't a problem, the circle draws at the point of the left mouse button click. In 320x200 mode all bets are off. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program play15;uses ptcgraph,ptccrt,ptcmouse;  var   gm,gd:smallint;  mx,my,mb:longint;   begin   gd := vesa;  Gm := installusermode(320, 200, 256, 2, 8000, 6000);  initgraph(gd, gm, '');  initmouse;  showmouse;   mx := 0; my := 0;repeat  getmousestate(mx,my,mb);   if lpressed then     begin       setcolor(14);       circle(mx,my,8);     while lpressed do begin end;     end;until keypressed;closegraph;end. ---------------------------------------------------------------------- TRon · 2025-05-14 19:08 Confirmed for Linux. Because a lot of changes happened with ptc in trunk (kvm units) it should really be checked against that as well but am not able to do so myself atm (maybe tomorrow). I haven't looked at the implementation either so for that also atm, no clue as of why. ---------------------------------------------------------------------- TBMan · 2025-05-15 17:46 It's odd. Hopefully someone can provide a fix. ---------------------------------------------------------------------- TRon · 2025-05-15 19:13 @TBMan It has something to do with scaling. Not sure if it was done intentional (e.g. even while sounding perhaps strange there might be an argument to justify this behaviour). Until cleared/fixed, perhaps you can use following workaround ?: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program play15; uses  {$ifdef linux}  cthreads, // *nix platforms require this  {$endif}  sysutils,  ptcgraph,ptccrt,ptcmouse; var  gm,gd:smallint;  mx,my,mb:longint;  txt:string;begin  gd := vesa;  Gm := installusermode(320, 200, 256, 2, 8000, 6000);   initgraph(gd, gm, '');  initmouse;  showmouse;   mx := 0; my := 0;   repeat    getmousestate(mx, my, mb);     // workaround    mx := mx shr 1;    my := my shr 1;     // verify coords    bar(10, 10, 160, 30);    writestr(txt, 'mx = ', mx, ', my = ', my);    outTextXY(10,10, txt);     if lpressed then    begin      setcolor(14);      circle(mx,my,8);    while lpressed do begin end;    end;    // prevent hoggin' cpu    sleep(2);  until keypressed;   closegraph;end. ---------------------------------------------------------------------- TBMan · 2025-05-15 19:40 That's fine for now, thanks.