summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_wine
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-09-19 12:46:36 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-09-19 12:47:54 +0200
commit635874182399703bb1ec2fc714eb49d0186bc61c (patch)
tree7d9bc1c6f0977be9b1c9996c6d3d93ea5937804c /ftnoir_protocol_wine
parent0578bd819884172ca4b1e197931e5490e8ef7bbd (diff)
wine-wrapper: use new bool compat::success() api
Diffstat (limited to 'ftnoir_protocol_wine')
-rw-r--r--ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx b/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx
index a81bccae..6e512b6e 100644
--- a/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx
+++ b/ftnoir_protocol_wine/opentrack-wrapper-wine-main.cxx
@@ -12,6 +12,7 @@ public:
~ShmPosix();
void lock();
void unlock();
+ bool success();
void* mem;
private:
int fd, size;
@@ -23,6 +24,7 @@ public:
~ShmWine();
void lock();
void unlock();
+ bool success();
void* mem;
private:
void *hMutex, *hMapFile;
@@ -33,11 +35,11 @@ int main(void)
{
ShmPosix lck_posix(WINE_SHM_NAME, WINE_MTX_NAME, sizeof(WineSHM));
ShmWine lck_wine("FT_SharedMem", "FT_Mutext", sizeof(FTMemMap));
- if(lck_posix.mem == (void*)-1) {
+ if(!lck_posix.success()) {
printf("Can't open posix map: %d\n", errno);
return 1;
}
- if(lck_wine.mem == NULL) {
+ if(!lck_wine.success()) {
printf("Can't open Wine map\n");
return 1;
}