Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 Phoenix Edition v3.7.0 Released!
#41
McAfee is horrible. I discourage its use.
Schuwatch!
Yes, it's me. Now shut up.
Reply
#42
It looks like bert22306 isn't being given the choice. Otherwise I was going to advise him to find the way to disable it, even for a few minutes, while making sure Windows Defender remained enabled. But it might have been useless for performance's sake.

Last night I unpacked QB64PE archive into a directory of Garuda MATE, didn't realize until it finished it was the Windows version! I was wondering why it took so long. I was looking up something for someone a few days before and that's why I had downloaded the archive for Windows. That one is ten times the size of the archive for Linux. :/

We have to thank the ones responsible for MinGW. Otherwise what has to be downloaded would have been much larger and it would have been another one of M$'s twisted plans to charge. Whoever isn't actually using Internet security software today would have been obligated to do so. It would have gone much farther than Windows Defender, Windows Hello and other junk.
Reply
#43
(05-08-2023, 02:53 PM)TerryRitchie Wrote: I'm having no issues with the updates to _DEVICES and related commands. Here is a test snippet of code that I wrote. It detects when new controllers have been added and when they have been disconnected.

Code: (Select All)
DIM Devices AS INTEGER
DIM Fcount AS INTEGER
DIM d AS INTEGER
DIM DeviceName AS STRING

Devices = _DEVICES
Fcount = 0

DO
    CLS
    _LIMIT 30
    Fcount = Fcount + 1
    IF Fcount = 30 THEN '                                        check for new devices once per second
        Fcount = 1
        IF _DEVICES <> Devices THEN Devices = _DEVICES '         if number of devices changes get new count
    END IF
    PRINT
    FOR d = 1 TO Devices '                                       print found devices
        COLOR 14, 1
        DeviceName = _DEVICE$(d)
        IF INSTR(DeviceName, "[DISCONNECTED]") THEN COLOR 7, 0 ' change color if disconnected
        PRINT " Found: "; _DEVICE$(d)
        COLOR 7, 0
    NEXT d
    _DISPLAY
LOOP UNTIL _KEYDOWN(27) '                                        press ESC to exit

Hi Terry
thank you for the time spent to solve my issue and the code posted here!
I agree with you that your code manages very well the state of connected or disconneted of the joystick.
It solves half of the problem, but it is so much and moreover you have now teached me that the state of CONNECTED/DISCONNECTED lasts in the description of the device detected.
The other half of the problem is to be able to change type of joystick on the same USB or/and  to change the USB to which the same Joystick has been connected.
Why these two limit cases? I do not think that they are weird, because in different knid of game there is the SETUP/OPTIONS section in which you can detect and choose the input controller and also map/define the action of the buttons of the controller. That is the final goal of this my tedious query.
Again thank you very much for your feedback.

Long life to the king QB64pe!  I love QB64pe and its community.
Reply
#44
@Ultraman

you disagree with Windows' Defender that continuosly suggests McAfee!
Reply
#45
(05-09-2023, 07:59 PM)TempodiBasic Wrote: Hi Terry
thank you for the time spent to solve my issue and the code posted here!
I agree with you that your code manages very well the state of connected or disconneted of the joystick.
It solves half of the problem, but it is so much and moreover you have now teached me that the state of CONNECTED/DISCONNECTED lasts in the description of the device detected.
The other half of the problem is to be able to change type of joystick on the same USB or/and  to change the USB to which the same Joystick has been connected.
Why these two limit cases? I do not think that they are weird, because in different knid of game there is the SETUP/OPTIONS section in which you can detect and choose the input controller and also map/define the action of the buttons of the controller. That is the final goal of this my tedious query.
Again thank you very much for your feedback.

Long life to the king QB64pe!  I love QB64pe and its community.

Ok, I'm having a hard time understanding exactly what you mean. However, here is my best answer.

I added a small game to my controller library that shows how you can poll the keyboard, mouse, and multiple controllers for various inputs. If you have not recently downloaded the controller library then download it again and take a look at the example game I included. The game has a setup/options screen just as you are describing for choosing controllers and inputs.

Once the actions are mapped/defined you'll need to write code to save those settings based on the controller's name (_DEVICE$). When your game/program sees that controller plugged in it can then load the mappings back in based on that controller. This is something my controller library is currently lacking and I'll be adding soon. I decided to wait to add more to the library until version 3.7.0 came out.

Each of your game/program users will only have a few game pads/joysticks so this will create a small database of the controllers they own. If they unplug all controllers then your code can fall back on the keyboard and/or mouse for inputs that were mapped as shown in the game example in the controller library. The game example uses the keyboard as the default mappings for this purpose.

I believe everything you want to do is there, it's just a matter of programming the code to make it happen. Feel free to use the code from the functions and subroutines in my controller library to use in your projects.

Terry
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#46
This is not really a bug but it's beginning to get on my nerves.
  • Open QB64 IDE.
  • Don't load any file in yet.
  • Instead select "Tools" menu. If the bottom-most option is enabled, "GUI Dialogs" then choose it in order to have the old IDE-style save and open file requesters. (Only for this example LOL, you could change it back if you like.)
  • Instead of the on/off option I asked you to select, you could choose a different one such as "Syntax Checker".

The result is that the "current file" is marked as modified. Then when the user makes an effort to open an existing file, the IDE asks if the "current file" should be saved to disk.

This was tested just now on Spiral Linux KDE (Debian clone). Also on EndeavourOS MATE (Arch Linux clone).
Reply
#47
(05-12-2023, 10:46 PM)mnrvovrfc Wrote: This is not really a bug but it's beginning to get on my nerves.
  • Open QB64 IDE.
  • Don't load any file in yet.
  • Instead select "Tools" menu. If the bottom-most option is enabled, "GUI Dialogs" then choose it in order to have the old IDE-style save and open file requesters. (Only for this example LOL, you could change it back if you like.)
  • Instead of the on/off option I asked you to select, you could choose a different one such as "Syntax Checker".

The result is that the "current file" is marked as modified. Then when the user makes an effort to open an existing file, the IDE asks if the "current file" should be saved to disk.

The same thing happens if the Code Layout or Compiler Options are changed, and these selections as well as those mentioned above are actually on the Options menu of the IDE.
Reply
#48
Just for clarification, the new _U... commands fixes the problem with cut off fonts?

But they remain when using simple Print? ie There is no _UPrint?
b = b + ...
Reply
#49
WOW thanks Bplus
I have totally missed  these features!
There is an extensive guide in the wiki help _U keywords

I often think about how many features of QB64 I ignore or unuse, but we tend to use only those keywords that are useful for our purpuses...and after some year you can discover that there is another way using different keywords! LOL, mare magnum qb64 linguae !
Reply
#50
(05-15-2023, 03:48 PM)bplus Wrote: Just for clarification, the new _U... commands fixes the problem with cut off fonts?

But they remain when using simple Print? ie There is no _UPrint?

_UPrintString NOT _UPrint.

Also have to use _UFontHeight instead of _FontHeight for messing around with Unicode.

There's also the _ULineSpacing to consider.

Try the example:
https://qb64phoenix.com/qb64wiki/index.php/ULINESPACING

Also please note that it doesn't work (yet) in SCREEN 0.

From _UPrintString help page:
Quote:SCREEN 0 (text only) mode is not supported. Attempting to use this in SCREEN 0 will generate an error.
Reply




Users browsing this thread: 2 Guest(s)