nsw25 said:
FYI theres a big bug somewhere that can cause engine to crash upon completion of a level from a saved game.
I made seperate topic here
http://www.chronocrash.com/forum/index.php?topic=5583.0
Yeah, although it has not happened to me yet, I saw that it was reported by other people in other builds.
O Ilusionista reported it in 2019 and 2020, if I'm not wrong it is an issue related to global variables.
http://www.chronocrash.com/forum/index.php?topic=703.msg72766#msg72766
https://github.com/DCurrent/openbor/issues/111
About the 6392, there's a new test build. Here's the changes:
- Removed the "backtotitle" function and mixed with the "gotomainmenu" function, can be activated by using the new flag "9". I made this change to avoid engine crashes if a module has the new function but the user is playing in an previous engine build. Now the engine will only change the effect (gotomainmenu flag 6) instead of close due to the non existence of the "backtotitle" function in older builds
- Added the "disconnect" message in the controller configuration menu when a previous configured joystick is turned "off". Simply turn your controller "on" to get the configuration back, but only will work if the current joystick ID is the same as when it was configured previously.
- Changed the behaviour of the "default" function in the controller configuration, now it will clear all button configuration instead of apply a predefined scheme. Both Windows/Android systems will continue using your default devices even if it is not configured in the controller menu (for Windows is the keyboard and for Android is the touch), but this change will avoid "invalid" configurations that sometimes can activate wrong commands, like the gyroscope.
- Disabled the gyroscope in Android. I don't know if some modders are using this device, but I saw that other devs totally disabled the gyro, and I followed the same idea. However, if any modder thinks that it can be useful, I can test a way to enable the gyro in the menu.
After a lot of tests, I made some discoveries that I consider important things to share.
In the previous versions, the joystick IDs were changed anytime a device is turned on or off, causing a lot of trouble when the players are using wireless devices and the battery ends. Now in the test build, the IDs will be changed only during open/close operations, avoiding ID changes during gameplay.
It means that their IDs can change depending on the order you turn on your controllers. For example, in Android if you are using a bluetooth ps4 controller, everytime you turn it on when the engine is already open, the OpenBOR will map as P2 BUTTONS. But if you first turn on the controller and then open the engine, OpenBOR will map as P1 BUTTONS.
If I understand correctly, OpenBOR has a device scan order and the controller is always the first. If no controller is found, the engine will give the first IDs to other devices (for the Android, I think that the touch is counted as a joystick too).
Another thing I need to say is about the ID order. Everytime you open/close the engine, it will check if all previously configured joysticks are turned on. In case the player 1 joystick is turned off for example, all other IDs will be moved to a lower number:
- P2 joystick will be P1
- P3 joystick will be P2
- P4 joystick will be P3
So, if you turn your P1 joystick on when the engine is already open, it will not work because the P1 config was overwritten by another device. After that, you have two options:
1) close the engine, maintain all joysticks turned on, open the engine again and all devices will be automatically recognized. Once you has 4 devices, the engine will define a new ID to every one
2) clear the P4 config and configure the last "turned on" device as P4, because once all IDs were moved, the last ID will be available to use (in this case, the player 4 ID is empty).
The last thing is about the Android API level (security). Some people reported that the controller configuration could not be saved in my previous test build and now I discovered why.
In my first test build, I was using a higher API level and once you install the OpenBOR by the first time, it don't gives the enough time to grant a permission to access/change files. So, it means that the user needs to close and re-open the engine to grant the correct permission, otherwise all OpenBOR configuration changes in your first gameplay will not be saved.
Due to this I decreased the API level and now the permission will be granted once you agree to install the OpenBOR. Now the user can safety configure everything in the first gameplay and it will be saved correctly, at least until the test build is fully tested.
I recorded a video showing a controller test in SOR2X. I know that some people reported problems in the test build, but unfortunately I can't reproduce the same issue for every different controller type.
All my tests were made on the most commonly used devices, like PS4/XBOX joysticks.
https://www.youtube.com/watch?v=8UsA0LHxiL0
Before I forget, some people reported a antivirus warning, but it is due to some "false positives" in the the Cyber Capture feature. Here's a quick explanation:
https://www.geeks3d.com/20200123/how-to-disable-avast-cybercapture-for-developers/
And finally, here's the file. Please, report in case you have any problem related to the changes in this test build:
https://1drv.ms/u/s!AnTXKPMHlONnhNgcD47dtwLZ3H31xw?e=ZoCzdp