ebiten/internal/gamepad/gamepad_null.go

87 lines
2.0 KiB
Go
Raw Normal View History

2022-02-01 18:17:26 +01:00
// Copyright 2022 The Ebiten Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !darwin && !js && !linux && !windows
2022-02-01 18:17:26 +01:00
package gamepad
import (
"time"
"github.com/hajimehoshi/ebiten/v2/internal/gamepaddb"
2022-02-01 18:17:26 +01:00
)
type nativeGamepadsImpl struct{}
2022-02-01 18:17:26 +01:00
func newNativeGamepadsImpl() nativeGamepads {
return &nativeGamepadsImpl{}
}
func (*nativeGamepadsImpl) init(gamepads *gamepads) error {
2022-02-01 18:17:26 +01:00
return nil
}
func (*nativeGamepadsImpl) update(gamepads *gamepads) error {
2022-02-01 18:17:26 +01:00
return nil
}
type nativeGamepadImpl struct{}
2022-02-01 18:17:26 +01:00
func (*nativeGamepadImpl) update(gamepad *gamepads) error {
2022-02-01 18:17:26 +01:00
return nil
}
func (*nativeGamepadImpl) hasOwnStandardLayoutMapping() bool {
2022-02-01 18:17:26 +01:00
return false
}
func (*nativeGamepadImpl) isStandardAxisAvailableInOwnMapping(axis gamepaddb.StandardAxis) bool {
return false
}
func (*nativeGamepadImpl) isStandardButtonAvailableInOwnMapping(button gamepaddb.StandardButton) bool {
return false
}
func (*nativeGamepadImpl) axisCount() int {
2022-02-01 18:17:26 +01:00
return 0
}
func (*nativeGamepadImpl) buttonCount() int {
2022-02-01 18:17:26 +01:00
return 0
}
func (*nativeGamepadImpl) hatCount() int {
2022-02-01 18:17:26 +01:00
return 0
}
func (*nativeGamepadImpl) axisValue(axis int) float64 {
2022-02-01 18:17:26 +01:00
return 0
}
func (*nativeGamepadImpl) isButtonPressed(button int) bool {
2022-02-01 18:17:26 +01:00
return false
}
func (*nativeGamepadImpl) buttonValue(button int) float64 {
2022-02-01 18:17:26 +01:00
panic("gamepad: buttonValue is not implemented")
}
func (*nativeGamepadImpl) hatState(hat int) int {
2022-02-01 18:17:26 +01:00
return hatCentered
}
func (g *nativeGamepadImpl) vibrate(duration time.Duration, strongMagnitude float64, weakMagnitude float64) {
2022-02-01 18:17:26 +01:00
}