This project is read-only.

Moving mouse makes cosmos restart?

Feb 4, 2012 at 7: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 8: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

Feb 4, 2012 at 11: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 6: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 =).