Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - doomista

Pages: [1]
1
General / Re: Fullscreen SFML app and CreateProcess
« on: July 18, 2017, 05:32:38 pm »
I've tried that, raises the same issue as using fullscreen.

2
General / Re: Fullscreen SFML app and CreateProcess
« on: July 16, 2017, 11:40:06 pm »
Cosmetic reasons, mostly. I have my gaming PC under TV (I don't have any console) and a convenient game launcher with interface similar to console interface that can be controlled by a gamepad is a nice touch. At this point I have one written in HTML+JS interpreted as HTA. That's a deprecated Windows feature that allows running processes from javascript. But it is buggy at best and I want different layout and I simply don't have the nerves to write it again in HTML+JS.

Anyways, I've probably found a solution:
Simply close SFML window right before executing a proces and then recreate context when launched game has been exited. Hopefully it will not unload my textures, we'll see. But I am quite surprised that setVisible() hasn't done the trick.

3
General / Fullscreen SFML app and CreateProcess
« on: July 16, 2017, 05:53:40 pm »
Hi,
I am trying to create an App Launcher with SFML for launching my games. I am using CreateProcess to launch a game. So far I've discovered that when my app has sf::Style::Default, game launched by CreateProcess (namely FTL) will go to fullscreen and play just fine. Unfortunately, when my app has sf::Style::Fullscreen, FTL will run in fullscreen, in foreground, has focus, will apply alternate style to mouse cursor, but nothing draws on the screen. Music plays, I can even click buttons (and exit FTL), but I can't see anything. I've tried to unset visibility of sfml window with setVisibility(false), but it didn't helped. Also I didn't find function to disable and reenable fullscreen.

Can you please help? Thanks in advance. App launching code:
STARTUPINFO si;
PROCESS_INFORMATION pi;

ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));

if (!CreateProcess("FTLGame.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))    {
        printf("CreateProcess failed (%d).\n", GetLastError());
}
else {
        printf("Prcess Creation Success");
}

WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);

4
General / Re: Release pressed key programatically
« on: May 02, 2017, 03:23:00 pm »
Thank you for clarification :)

5
General / Release pressed key programatically
« on: May 01, 2017, 11:45:06 pm »
Hi, is there a way to programatically release a pressed key on a keyboard/joystick so functions like isKeyPressed won't return true unless the player releases that key physically and presses it again?

I wrote myself a wrapper module that allows seamless switching between keyboard and X360 controller and it is meant to work without the need of handling events and this little bit is the last thing I need to finish it.

Thanks for help

Pages: [1]
anything