Skip to content

Commit

Permalink
Linux work
Browse files Browse the repository at this point in the history
-. Fixed Y axis for both sticks being inverted... >_<
-. Some defines to avoid nullDC warnings.
-. Make the INI to be saved on settings check, since there's no dialog.

Also, added the compile scripts I use so I don't lose them again. Nope,
no makefile fancyness yet.
  • Loading branch information
KrossX committed Aug 19, 2013
1 parent ea7e9a4 commit bbe0a0b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Pokopom/ConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@

#include "General.h"
#include "ConfigDialog.h"
#include "FileIO.h"

#ifdef _WIN32
#include <Uxtheme.h>
#include <CommCtrl.h>

#include "FileIO.h"

#include "resource.h"

HWND hChild, hParent = NULL;
Expand Down Expand Up @@ -424,6 +423,8 @@ void CreateConfigDialog()

void CreateConfigDialog()
{
// There is no config dialog, so at least save some settings.
FileIO::INI_SaveSettings();
}

#endif
10 changes: 5 additions & 5 deletions Pokopom/Input_Linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ bool Recheck(u8 port)
if(settings[port].disabled) return false;
if(port > 0) return false;

printf("Pokopom(%d) -> Recheck\n", port);
//printf("Pokopom(%d) -> Recheck\n", port);

s32 joy_fd, count = 0;
char name_of_joystick[80] = {0};
Expand Down Expand Up @@ -262,10 +262,10 @@ bool InputGetState(_Pad& pad, _Settings &set)
pad.buttons[X360_X] = js.button[LIN_BTN_X] ? 1:0;
pad.buttons[X360_Y] = js.button[LIN_BTN_Y] ? 1:0;

pad.analog[X360_STICKLX] = js.axis[LIN_AXIS_LX];
pad.analog[X360_STICKLY] = js.axis[LIN_AXIS_LY];
pad.analog[X360_STICKRX] = js.axis[LIN_AXIS_RX];
pad.analog[X360_STICKRY] = js.axis[LIN_AXIS_RY];
pad.analog[X360_STICKLX] = js.axis[LIN_AXIS_LX];
pad.analog[X360_STICKLY] = -js.axis[LIN_AXIS_LY];
pad.analog[X360_STICKRX] = js.axis[LIN_AXIS_RX];
pad.analog[X360_STICKRY] = -js.axis[LIN_AXIS_RY];

pad.analog[X360_TRIGGERL] = (js.axis[LIN_AXIS_LT] + 32767) / 256;
pad.analog[X360_TRIGGERR] = (js.axis[LIN_AXIS_RT] + 32767) / 256;
Expand Down
6 changes: 5 additions & 1 deletion Pokopom/nullDC_plugin_types_old.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#ifdef _WIN32

namespace nullDC_103
{
typedef void FASTCALL MapleDeviceDMAFP(void* device_instance,unsigned int Command,unsigned int* buffer_in,unsigned int buffer_in_len,unsigned int* buffer_out,unsigned int& buffer_out_len, unsigned int& response);
Expand Down Expand Up @@ -79,4 +81,6 @@ namespace nullDC_103
};


} // End namespace nullDC_103
} // End namespace nullDC_103

#endif // WIN32

0 comments on commit bbe0a0b

Please sign in to comment.