Mustafa
Mustafa
CC#
Created by DayDrunk on 5/4/2024 in #help
Newtonsoft.Json json handling
👍
17 replies
CC#
Created by DayDrunk on 5/4/2024 in #help
Newtonsoft.Json json handling
As the people above have already stated, switch to System.Text.Json. After that, you can incorporate something similar to this:
string JsonContent = File.ReadAllText("put file path here");
var deserializedContent = JsonSerializer.Deserialize<RoomData>(JsonContent);
string JsonContent = File.ReadAllText("put file path here");
var deserializedContent = JsonSerializer.Deserialize<RoomData>(JsonContent);
17 replies
CC#
Created by gwon8266 on 5/5/2024 in #help
Can I call myself a software engineer, without knowing the miniscule details of how .NET works?
either i feel like the greatest developer of all time or like idk what im doing and don't belong, no in betweens
10 replies
CC#
Created by gwon8266 on 5/5/2024 in #help
Can I call myself a software engineer, without knowing the miniscule details of how .NET works?
i think all of us suffer from imposter syndrome
10 replies
CC#
Created by koray bey on 5/3/2024 in #help
Saving Feature Help
for whatever reason it wasn't included by default in my .net project
33 replies
CC#
Created by koray bey on 5/3/2024 in #help
Saving Feature Help
you could use System.Text.Json to save content (should be able to install it through nuget)
33 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
UPDATE: @186 days until 🎃 @Yawnder - [▰▰▰▰▱] @Buddy, Citizen of Pluto I apologize for the mass ping, but since you three were helping me, I owe a thank you. I've found my solution in the form of using the SharpDX.XInput nuget package. The following usage has resulted in success, and the messagebox shows up regardless of whether or not I am focused:
private Gamepad _gamepad;
private Controller _controller;

private async void T_Tick(object sender, EventArgs e)
{
_controller = new Controller(UserIndex.One);
if (_controller.IsConnected)
{
_controller.GetState(out var state);
var dpadUp = state.Gamepad.Buttons.HasFlag(GamepadButtonFlags.DPadUp);
if (dpadUp) Log("Hi bro it worked");
}
else await Log("not connected");
}
private Gamepad _gamepad;
private Controller _controller;

private async void T_Tick(object sender, EventArgs e)
{
_controller = new Controller(UserIndex.One);
if (_controller.IsConnected)
{
_controller.GetState(out var state);
var dpadUp = state.Gamepad.Buttons.HasFlag(GamepadButtonFlags.DPadUp);
if (dpadUp) Log("Hi bro it worked");
}
else await Log("not connected");
}
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
yea i could try that
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
ds4windows does something similar but their entire process is vastly different since it's translating playstation input into xbox input
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
but i can't say i'm sure how i could use this to achieve the functionality im looking for
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
No description
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
public enum GamepadButtons : uint
{
None = 0u,
Menu = 1u,
View = 2u,
A = 4u,
B = 8u,
X = 0x10u,
Y = 0x20u,
DPadUp = 0x40u,
DPadDown = 0x80u,
DPadLeft = 0x100u,
DPadRight = 0x200u,
LeftShoulder = 0x400u,
RightShoulder = 0x800u,
LeftThumbstick = 0x1000u,
RightThumbstick = 0x2000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle1 = 0x4000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle2 = 0x8000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle3 = 0x10000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle4 = 0x20000u
}
public enum GamepadButtons : uint
{
None = 0u,
Menu = 1u,
View = 2u,
A = 4u,
B = 8u,
X = 0x10u,
Y = 0x20u,
DPadUp = 0x40u,
DPadDown = 0x80u,
DPadLeft = 0x100u,
DPadRight = 0x200u,
LeftShoulder = 0x400u,
RightShoulder = 0x800u,
LeftThumbstick = 0x1000u,
RightThumbstick = 0x2000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle1 = 0x4000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle2 = 0x8000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle3 = 0x10000u,
[ContractVersion("Windows.Foundation.UniversalApiContract", 196608u)]
Paddle4 = 0x20000u
}
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
i mean i have this
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
but that's only for keyboards
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
getasynckeystate() is the easiest way to get input while minimized
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
yeah
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
but i havent found any
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
ive tried looking
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
you think anything like that exists for game controllers too?
32 replies
CC#
Created by Mustafa on 4/30/2024 in #help
[✅] Receiving Game Controller Input while Minimized (WinForms C#) | Repost
i have no clue how to read the bytes or even get them properly lol
32 replies