Call init_platform from the mainwindow
Move platform -> platform_init