Created
January 24, 2012 09:36
-
-
Save cosmo0920/1669270 to your computer and use it in GitHub Desktop.
mikutterでゲームパッドのやり方わからぬぇ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# SDLでゲームパッド!! | |
require 'sdl' | |
Module.new do | |
SDL.init(SDL::INIT_JOYSTICK) | |
SDL::Joystick.num.times do |i| | |
p SDL::Joystick.index_name(i) #joystickの認識に失敗するとmikutterがピャアアアアアアア | |
end | |
j = SDL::Joystick.open(0) | |
p j | |
Plugin.create(:joy_sdl) | |
#こうなる??? | |
#SDLとmikutterの連携方法わからんピャアアアアアアアアアアアアアアアアア | |
#Plugin.call(:keypress, "joystick 1") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment