Skip to content

Instantly share code, notes, and snippets.

@cosmo0920
Created January 24, 2012 09:36
Show Gist options
  • Save cosmo0920/1669270 to your computer and use it in GitHub Desktop.
Save cosmo0920/1669270 to your computer and use it in GitHub Desktop.
mikutterでゲームパッドのやり方わからぬぇ
# -*- 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