Hello Guest

[FIXED] Mouse.isbuttondown not updating correctly

  • 56 Replies
  • 50751 Views
*

Offline kappa

  • *****
  • 1313
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #45 on: January 10, 2011, 10:18:22 »
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.

*

Offline Matzon

  • *****
  • 2242
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #46 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?

*

Offline kappa

  • *****
  • 1313
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #47 on: January 10, 2011, 14:29:12 »
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.
« Last Edit: January 10, 2011, 15:52:30 by kappa »

Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #48 on: January 10, 2011, 19:27:59 »
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

*

Offline Matzon

  • *****
  • 2242
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #49 on: January 10, 2011, 21:56:11 »
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">

Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #50 on: January 11, 2011, 14:51:56 »
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

*

Offline kappa

  • *****
  • 1313
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #51 on: January 11, 2011, 15:43:25 »
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.

Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #52 on: January 11, 2011, 18:01:42 »
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:
Code: [Select]
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

*

Offline kappa

  • *****
  • 1313
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #53 on: January 11, 2011, 19:06:02 »
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.
« Last Edit: January 11, 2011, 19:14:26 by kappa »

*

Offline Matzon

  • *****
  • 2242
Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #54 on: January 11, 2011, 20:55:34 »
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)
« Last Edit: January 11, 2011, 20:57:14 by Matzon »

Re: [RFE] Mouse.isbuttondown not updating correctly
« Reply #55 on: January 12, 2011, 21:23:37 »
Yay, you're the best Matzon, I'll test it tomorrow :)

Mike

Re: [FIXED] Mouse.isbuttondown not updating correctly
« Reply #56 on: January 13, 2011, 12:31:01 »
Yay, it is fixed, thanks :-D