gambatte_qt/framework: avoid promoting -1 to size_t