Alan Buckley wrote:


> Richard Spencer wrote:> > Alan Buckley wrote:
>> 
> It seems the the OS_Mouse SWI is not working when called





>> > from C code with RPCEmu 0.88 on Windows 7.
 
>> > _kernel_swi_regs regs;
 
>>  > while (1)
>>  > {
>>  >  if (_kernel_swi(OS_Mouse, &regs, &regs) == 
0)
>>  > {
>> >       printf("\004%d,%d\n\005", 
regs.r[0], regs.r[1]);
>> >    }
>> >   }
 [snip] 
> I was originally running the program in the WIMP so the pointer was being 
shown. But I repeated the test after using > F12 and typing *pointer. The 
result 
is the same - the mouse pointer moves with the mouse as expected, but the 
values 
> returned from OS_Mouse do not vary.
 
[snip] 
> I’m using RISC OS 4.02 (the nearly free 
version from RISC OS) and Strong ARM 128MB with 2MB VRAM.
 StrongARM model here too, and I've just tested my compilation of the above 
code on vfree402 and it works perfectly outside the desktop and in an Edit 
Taskwindow, both on interpreter and dynarec. 
> *pointer does not seem to make a difference. The pointer seems to be 
working and displaying fine in normal use > anyway.
 Ah, different issue then. 
> > Also, what happens if you use _swix?
 
> I’ve rewritten the program to use _swix and I get the same result. Screen 
mode 800x600 256 colours always reports > 640,480 for the coordinates. Note: 
I’ve 
just tried it in a variety of screen modes and always get the same result.
 FWIW the code I compiled under GCC, but if the rest of your program works as 
desired it seems unlikely to be a C-veneer issue.  It is odd though that 
OS_Mouse works from BASIC which is why I hesitate to call it a Windows 7 
oddity, and I'm afraid I can't help with either testing or solving there.  What 
happens if you use OS_Word to read the 'unbuffered' mouse position?  A bit of a 
shot in the dark here, but maybe worth a try of the pointer moves but can't be 
read by normal means.  The details are on page PRM1-718. Regards, Richard

                                          
_______________________________________________
Rpcemu mailing list
[email protected]
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

Reply via email to