don't import C in root
This commit is contained in:
parent
bcc683ede7
commit
f2f49013f1
|
@ -16,13 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
package cmd
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -I/home/nick/Downloads/include
|
||||
#cgo LDFLAGS: -L/home/nick/.local/lib -lprojectM-4
|
||||
#include "projectM-4/projectM.h"
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
|
@ -36,7 +29,7 @@ func handleWindowEvent(event *sdl.WindowEvent, m *milkDropWindow) {
|
|||
switch event.Event {
|
||||
case sdl.WINDOWEVENT_RESIZED:
|
||||
w, h := event.Data1, event.Data2
|
||||
C.projectm_set_window_size(m.handle, C.ulong(w), C.ulong(h))
|
||||
m.resize(w, h)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
package cmd
|
||||
|
||||
/*
|
||||
#cgo CFLAGS: -I/home/nick/Downloads/include
|
||||
#cgo LDFLAGS: -L/home/nick/.local/lib -lprojectM-4
|
||||
#include "projectM-4/projectM.h"
|
||||
#include <stdlib.h>
|
||||
*/
|
||||
|
@ -93,3 +95,7 @@ func (m *milkDropWindow) render() (bool, error) {
|
|||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (m *milkDropWindow) resize(w, h int32) {
|
||||
C.projectm_set_window_size(m.handle, C.ulong(w), C.ulong(h))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue