More line ending fixes, ___

This commit is contained in:
Mathew Velasquez 2016-11-04 00:05:49 -04:00
parent 6312ce865c
commit 693f045ff8

View file

@ -1,52 +1,52 @@
#include "binding-util.h" #include "binding-util.h"
#include "binding-types.h" #include "binding-types.h"
#include "sharedstate.h" #include "sharedstate.h"
#include "eventthread.h" #include "eventthread.h"
#include "debugwriter.h" #include "debugwriter.h"
#ifdef _WIN32 #ifdef _WIN32
#include <shlwapi.h> #include <shlwapi.h>
#endif #endif
#include <SDL.h> #include <SDL.h>
#include <SDL_syswm.h> #include <SDL_syswm.h>
RB_METHOD(nikoStart) RB_METHOD(nikoStart)
{ {
RB_UNUSED_PARAM; RB_UNUSED_PARAM;
// Calculate where to stick the window // Calculate where to stick the window
POINT pos; POINT pos;
pos.x = (9 * 16 - 4) * 2; pos.x = (9 * 16 - 4) * 2;
pos.y = (13 * 16) * 2; pos.y = (13 * 16) * 2;
SDL_SysWMinfo syswindow; SDL_SysWMinfo syswindow;
SDL_VERSION(&syswindow.version); SDL_VERSION(&syswindow.version);
SDL_GetWindowWMInfo(shState->rtData().window, &syswindow); SDL_GetWindowWMInfo(shState->rtData().window, &syswindow);
ClientToScreen(syswindow.info.win.window, &pos); ClientToScreen(syswindow.info.win.window, &pos);
// Start process // Start process
#ifdef _WIN32 #ifdef _WIN32
WCHAR path[MAX_PATH]; WCHAR path[MAX_PATH];
WCHAR args[MAX_PATH]; WCHAR args[MAX_PATH];
GetModuleFileNameW(NULL, path, MAX_PATH); GetModuleFileNameW(NULL, path, MAX_PATH);
PathRemoveFileSpecW(path); PathRemoveFileSpecW(path);
wcscat(path, L"\\journal.exe"); wcscat(path, L"\\___.exe");
wsprintfW(args, L"journal.exe %d %d", pos.x, pos.y); wsprintfW(args, L"___.exe %d %d", pos.x, pos.y);
STARTUPINFOW si; STARTUPINFOW si;
memset(&si, 0, sizeof(si)); memset(&si, 0, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
CreateProcessW(path, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); CreateProcessW(path, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
#else #else
#ifdef linux #ifdef linux
#else #else
#endif #endif
#endif #endif
return Qnil; return Qnil;
} }
void nikoBindingInit() void nikoBindingInit()
{ {
VALUE module = rb_define_module("Niko"); VALUE module = rb_define_module("Niko");
//Functions //Functions
_rb_define_module_function(module, "do_your_thing", nikoStart); _rb_define_module_function(module, "do_your_thing", nikoStart);
} }