Moving mouse makes cosmos restart?

Developer
Feb 4, 2012 at 6:38 AM

Hello everyone!

I was just testing a small demo that I created that draws to the screen whenever the left mouse button is down, though cosmos seems to randomly restart.

Does anyone know why?

Thanks

CMan332

Feb 4, 2012 at 7:18 AM
Cman332 wrote:

Hello everyone!

I was just testing a small demo that I created that draws to the screen whenever the left mouse button is down, though cosmos seems to randomly restart.

Does anyone know why?

Thanks

CMan332

I know the issue! Ok so I assume you are drawing the Cursor correct? If so, when we were working on the mouse in Pear we found that if you were to move the mouse to the bottom of the screen it would do that, so just keep the cursor from being drawn past the screen, look at: pearos.codeplex.com under Core > Mouse you will see what I did to fix it. Hope it helps - Matt

Developer
Feb 4, 2012 at 10:29 AM

I was doing this. VGAScreen.SetPixel320x200x8(Mouse.X,Mouse.Y,0); (simplified, where 0 is red)

I'm guessing thats probably wrong ha ha ha and I might need to add things like bounds checking as demonstrated in your PearOS thingy.

Feb 4, 2012 at 5:37 PM
CMan332 wrote:

I was doing this. VGAScreen.SetPixel320x200x8(Mouse.X,Mouse.Y,0); (simplified, where 0 is red)

I'm guessing thats probably wrong ha ha ha and I might need to add things like bounds checking as demonstrated in your PearOS thingy.

Yeah, I found that out, and had to build it. But it works =), keeps my os from crashing. Thanks - Matt

 

Yeah that line right there would do it =).