[FIXED] Mouse.isbuttondown not updating correctly

Started by Mickelukas, May 21, 2009, 10:07:28

Previous topic - Next topic

kappa

Quote from: Matzon on January 10, 2011, 06:18:56
Since this is an applet specific issues, I am thinking about being able to set lwjgl specific (or at least generally specific) parameters through out applet loader, since that is signed. kappa, does that make sense?

Ah yes (pretty genius), that would work since it'll be done before any LWJGL classes start running and not require the user to sign their own jars to do it. It would be almost on par with setting VM parameters. Would need to make sure which parameters are allowed though if its going to be a general solution. Does sound good though and likely to work well.

Matzon

so, all properties beginning with org.lwjgl should be allowed.
What else?
some of the directdraw / opengl com.sun variants?

kappa

Quote from: Matzon on January 10, 2011, 14:13:30
so, all properties beginning with org.lwjgl should be allowed.
What else?
some of the directdraw / opengl com.sun variants?

org.lwjgl should be fine, don't think we need any other properties. Plugin2 pretty much covers most the stuff that might have been useful like setting vm memory size, etc. The java2d directdraw and opengl issues don't apply any more to LWJGL since the move to Display.setParent() which completely bypasses the issues, besides there are already applet parameters available to handle those. Can't think of anything else that might be useful, so yeh, org.lwjgl should be fine.

Mickelukas

Wuhuuu, I see a fix on the horizon :)

Almost getting ready to starting blogging/discussing my game, just need another month or so and it'll actually be a game and not a simulator of sorts so this would be great.

Mike

Matzon

I have added parsing of java_arguments for org.lwjgl* properties in the applet loader.
Please try the next nightly (> 1011)

usage:
  <param name="java_arguments" value="-Dorg.lwjgl.input.Mouse.allowNegativeMouseCoords=true -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true">

Mickelukas

Matzon,

I downloaded the newest nightly (1012) and tried it both in my own applet and in the gears applet that comes with the lwjgl_applet but neither allows negative mouse coordinates when that parameter is added.

Kind regards,
Mike

kappa

are you able to get any value from inside your applet for the value System.getProperty("org.lwjgl.input.Mouse.allowNegativeMouseCoords") ? or does it return null?

haven't got time to test atm but would make life easier if you can confirm from an already working setup.

Mickelukas

Running in the applet viewer it returns true (as expected as it always used to work)

Running in a normal applet with or without the argument gives the following:
access denied (java.util.PropertyPermission org.lwjgl.input.Mouse.allowNegativeMouseCoords read)
access denied (java.util.PropertyPermission org.lwjgl.input.Mouse.allowNegativeMouseCoords read)
java.security.AccessControlException: access denied (java.util.PropertyPermission org.lwjgl.input.Mouse.allowNegativeMouseCoords read)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
	at java.lang.System.getProperty(Unknown Source)
	at client.Main.init(Main.java:294)
	at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1011)
	at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:767)
	at java.lang.Thread.run(Unknown Source)


But I guess that's to expect as well seeing as it isn't my applet that should be allowed to read the values but the applet loader, right?

Mike

kappa

Quote from: Mickelukas on January 11, 2011, 18:01:42
But I guess that's to expect as well seeing as it isn't my applet that should be allowed to read the values but the applet loader, right?

yes, mean't from a signed jar, so you'd have to sign your jars to test it, thought you might already have such a setup.

Matzon

apparently, using java_arguments was a bad idea since the JRE strips arguments from it :/
so, fixed it by using lwjgl_arguments instead. Tested locally and works as expected :)

Please get the next nightly build (> 1012)

Mickelukas

Yay, you're the best Matzon, I'll test it tomorrow :)

Mike