diff options
| author | iCatButler <i.am.catbutler@gmail.com> | 2018-03-13 17:25:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-13 17:25:13 +0000 |
| commit | 768332417644451d38ce1a737465656c7cc75de3 (patch) | |
| tree | e6ca381effb72ccc4161d40f224b817a6631bc03 /plugins/dfinput/xkb.c | |
| parent | 15fe3782c1375634b7a9bd9bbbadfd75e7b06fed (diff) | |
| parent | 2d0b10f982e0b835f4b27be26b138703907a4219 (diff) | |
| download | pcsxr-768332417644451d38ce1a737465656c7cc75de3.tar.gz | |
Merge pull request #6 from loathingKernel/fix-linux-build
Fix compilation on Linux and add the new setting to the UI
Diffstat (limited to 'plugins/dfinput/xkb.c')
| -rwxr-xr-x | plugins/dfinput/xkb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/dfinput/xkb.c b/plugins/dfinput/xkb.c index 53fb90d4..47eac669 100755 --- a/plugins/dfinput/xkb.c +++ b/plugins/dfinput/xkb.c @@ -46,7 +46,7 @@ void InitKeyboard() { resumeScrSaver = 0; if (g.cfg.PreventScrSaver) { char buf[64]; - snprintf(buf, 64, "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window); + snprintf(buf, sizeof(buf), "xdg-screensaver suspend 0x%x > /dev/null 2>&1", window); if (pclose(popen(buf, "r")) == 0) { resumeScrSaver = 1; printf("Suspending Window ID 0x%x of activating screensaver.\n", window); @@ -79,7 +79,7 @@ void DestroyKeyboard() { if (resumeScrSaver) { char buf[64]; printf("Resuming Window ID 0x%x to activate screensaver.\n", window); - snprintf(buf, 64, "xdg-screensaver resume 0x%x", window); + snprintf(buf, sizeof(buf), "xdg-screensaver resume 0x%x", window); FILE *phandle = popen(buf, "r"); pclose(phandle); } |
