endif()
add_definitions(-D_USE_QT5)
-add_definitions(-D_UNICODE)
if(USE_QT5_4_APIS)
add_definitions(-D_USE_QT_5_4)
include(simd-x86)
+
if(WIN32)
set(BUNDLE_LIBS
${OPENGL_LIBRARY}
#SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>")
#SET(CMAKE_CXX_ARCHIVE_FINISH true)
else()
+ add_definitions(-D_UNICODE)
set(BUNDLE_LIBS
# ${OPENGL_LIBRARY}
${OPENCL_LIBRARY}
endif()
add_definitions(-D_USE_QT5)
-add_definitions(-D_UNICODE)
+if(NOT WIN32)
+ add_definitions(-D_UNICODE)
+endif()
if(USE_QT5_4_APIS)
add_definitions(-D_USE_QT_5_4)
return true;
}
-const _TCHAR *get_symbol(symbol_t *first_symbol, uint32_t addr)
+const _TCHAR* DLL_PREFIX get_symbol(symbol_t *first_symbol, uint32_t addr)
{
static _TCHAR name[1024];
return NULL;
}
-const _TCHAR *get_value_or_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr)
+const _TCHAR* DLL_PREFIX get_value_or_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr)
{
static _TCHAR name[1024];
return name;
}
-const _TCHAR *get_value_and_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr)
+const _TCHAR* DLL_PREFIX get_value_and_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr)
{
static _TCHAR name[1024];
#ifndef _MSC_VER
#undef max
#undef min
- int max(int a, int b);
- unsigned int max(unsigned int a, unsigned int b);
- int min(int a, int b);
- unsigned int min(unsigned int a, unsigned int b);
+ int DLL_PREFIX max(int a, int b);
+ unsigned int DLL_PREFIX max(unsigned int a, unsigned int b);
+ int DLL_PREFIX min(int a, int b);
+ unsigned int DLL_PREFIX min(unsigned int a, unsigned int b);
#endif
// string
#if defined(_RGB555) || defined(_RGB565)
typedef uint16_t scrntype_t;
- scrntype_t RGB_COLOR(uint32_t r, uint32_t g, uint32_t b);
- scrntype_t RGBA_COLOR(uint32_t r, uint32_t g, uint32_t b, uint32_t a);
- uint8_t R_OF_COLOR(scrntype_t c);
- uint8_t G_OF_COLOR(scrntype_t c);
- uint8_t B_OF_COLOR(scrntype_t c);
- uint8_t A_OF_COLOR(scrntype_t c);
+ scrntype_t DLL_PREFIX RGB_COLOR(uint32_t r, uint32_t g, uint32_t b);
+ scrntype_t DLL_PREFIX RGBA_COLOR(uint32_t r, uint32_t g, uint32_t b, uint32_t a);
+ uint8_t DLL_PREFIX R_OF_COLOR(scrntype_t c);
+ uint8_t DLL_PREFIX G_OF_COLOR(scrntype_t c);
+ uint8_t DLL_PREFIX B_OF_COLOR(scrntype_t c);
+ uint8_t DLL_PREFIX A_OF_COLOR(scrntype_t c);
#elif defined(_RGB888)
typedef uint32_t scrntype_t;
#define RGB_COLOR(r, g, b) (((uint32_t)(r) << 16) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 0))
#pragma pack()
// file path
-const _TCHAR *get_application_path();
-const _TCHAR *create_local_path(const _TCHAR *format, ...);
-void create_local_path(_TCHAR *file_path, int length, const _TCHAR *format, ...);
-const _TCHAR *create_date_file_path(const _TCHAR *extension);
-void create_date_file_path(_TCHAR *file_path, int length, const _TCHAR *extension);
-bool check_file_extension(const _TCHAR *file_path, const _TCHAR *ext);
-const _TCHAR *get_file_path_without_extensiton(const _TCHAR *file_path);
-void get_long_full_path_name(const _TCHAR* src, _TCHAR* dst, size_t dst_len);
-const _TCHAR* get_parent_dir(const _TCHAR* file);
+const _TCHAR *DLL_PREFIX get_application_path();
+const _TCHAR *DLL_PREFIX create_local_path(const _TCHAR *format, ...);
+void DLL_PREFIX create_local_path(_TCHAR *file_path, int length, const _TCHAR *format, ...);
+const _TCHAR *DLL_PREFIX create_date_file_path(const _TCHAR *extension);
+void DLL_PREFIX create_date_file_path(_TCHAR *file_path, int length, const _TCHAR *extension);
+bool DLL_PREFIX check_file_extension(const _TCHAR *file_path, const _TCHAR *ext);
+const _TCHAR *DLL_PREFIX get_file_path_without_extensiton(const _TCHAR *file_path);
+void DLL_PREFIX get_long_full_path_name(const _TCHAR* src, _TCHAR* dst, size_t dst_len);
+const _TCHAR* DLL_PREFIX get_parent_dir(const _TCHAR* file);
// string
const _TCHAR *DLL_PREFIX create_string(const _TCHAR* format, ...);
struct symbol_s *next_symbol;
} symbol_t;
-const _TCHAR *get_symbol(symbol_t *first_symbol, uint32_t addr);
-const _TCHAR *get_value_or_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr);
-const _TCHAR *get_value_and_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr);
+const _TCHAR* DLL_PREFIX get_symbol(symbol_t *first_symbol, uint32_t addr);
+const _TCHAR* DLL_PREFIX get_value_or_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr);
+const _TCHAR* DLL_PREFIX get_value_and_symbol(symbol_t *first_symbol, const _TCHAR *format, uint32_t addr);
#endif
#endif
// win32
- #ifdef _WIN32
+ #if defined(_WIN32) && !defined(_USE_QT)
#ifndef ONE_BOARD_MICRO_COMPUTER
config.use_d3d9 = true;
#endif
#endif
}
#endif
- #ifdef _WIN32
- MyGetPrivateProfileString(_T("Sound"), _T("FMGenDll"), _T("mamefm.dll"), config.fmgen_dll_path, _MAX_PATH, config_path);
- #endif
- #ifdef _WIN32
+ #if defined(_WIN32) && !defined(_USE_QT)
MyGetPrivateProfileString(_T("Sound"), _T("FMGenDll"), _T("mamefm.dll"), config.fmgen_dll_path, _MAX_PATH, config_path);
#endif
#endif
// win32
- #ifdef _WIN32
+ #if defined(_WIN32) && !defined(_USE_QT)
#ifndef ONE_BOARD_MICRO_COMPUTER
config.use_d3d9 = MyGetPrivateProfileBool(_T("Win32"), _T("UseDirect3D9"), config.use_d3d9, config_path);
config.wait_vsync = MyGetPrivateProfileBool(_T("Win32"), _T("WaitVSync"), config.wait_vsync, config_path);
#endif
// win32
- #ifdef _WIN32
+ #if defined(_WIN32) && !defined(_USE_QT)
#ifndef ONE_BOARD_MICRO_COMPUTER
MyWritePrivateProfileBool(_T("Win32"), _T("UseDirect3D9"), config.use_d3d9, config_path);
MyWritePrivateProfileBool(_T("Win32"), _T("WaitVSync"), config.wait_vsync, config_path);
int sound_volume_r[MAX_VOLUME_TMP];
#endif
// input
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(_USE_QT)
_TCHAR fmgen_dll_path[_MAX_PATH];
bool use_direct_input;
bool disable_dwm;
+
+ bool use_d3d9;
+ bool wait_vsync;
+ bool use_dinput;
+ bool show_status_bar;
#endif
#if defined(USE_SHARED_DLL) || defined(USE_JOYSTICK)
int joy_buttons[4][16];
_TCHAR* OSD_BASE::bios_path(const _TCHAR* file_name)
{
static _TCHAR file_path[_MAX_PATH];
- snprintf(file_path, _MAX_PATH, _T("%s%s"), app_path, file_name);
+ snprintf((char *)file_path, _MAX_PATH, "%s%s", app_path, (const char *)file_name);
csp_logger->debug_log(CSP_LOG_INFO, CSP_LOG_TYPE_OSD, "BIOS PATH:%s", file_path);
return file_path;
}
tmps = tmps + get_vm_config_name();
tmps = tmps + QString::fromUtf8("_");
tmps = tmps + nowTime.toString(QString::fromUtf8("yyyy-MM-dd_hh-mm-ss.zzz."));
- tmps = tmps + QString::fromUtf8(extension);
- snprintf(name, length, _T("%s"), tmps.toLocal8Bit().constData());
+ tmps = tmps + QString::fromUtf8((const char *)extension);
+ snprintf((char *)name, length, "%s", tmps.toLocal8Bit().constData());
}
_TCHAR* OSD_BASE::application_path()
void OSD_BASE::write_console(_TCHAR* buffer, unsigned int length)
{
- QString s = QString::fromLocal8Bit(buffer, length);
+ QString s = QString::fromLocal8Bit((const char *)buffer, length);
emit sig_put_string_debugger(s);
}
int l = console_cmd_str.length();
console_cmd_str = console_cmd_str.right(l - count);
- strncpy(buffer, tmps.toLocal8Bit().constData(), count);
+ strncpy((char *)buffer, tmps.toLocal8Bit().constData(), count);
//DebugSemaphore->release(1);
return count;
QString tmps = nowTime.toString(QString::fromUtf8("yyyy-MM-dd_hh-mm-ss.zzz."));
QString path = QString::fromUtf8("Saved_Movie_") + tmps + QString::fromUtf8("mp4");
//QString path = QString::fromUtf8("Saved_Movie_") + tmps + QString::fromUtf8("mkv");
- path = QString::fromLocal8Bit(this->get_app_path()) + path;
+ path = QString::fromLocal8Bit((const char *)this->get_app_path()) + path;
int rate = this->get_sound_rate();
emit sig_save_as_movie(path, fps, rate);
void OSD_BASE::create_font(font_t *font, const _TCHAR *family, int width, int height, int rotate, bool bold, bool italic)
{
QString fontName;
- fontName = QString::fromUtf8(family);
+ fontName = QString::fromUtf8((const char *)family);
if(fontName == QString::fromUtf8("Gothic")) {
fontName = QString::fromUtf8("Sans Serif");
} else if(fontName == QString::fromUtf8("Mincho")) {
fontName = QString::fromUtf8("Serif");
} else {
//fontName = QString::fromUtf8("Sans Serif");
- fontName = QString::fromUtf8(family);
+ fontName = QString::fromUtf8((const char *)family);
}
font->hFont = QFont(fontName);
font->hFont.setPixelSize(height);
QPoint loc = QPoint(x, y);
QTextCodec *codec = QTextCodec::codecForName("Shift-JIS");
- QString str = codec->toUnicode(text);
+ QString str = codec->toUnicode((char *)text);
bitmap->hPainter.begin(&(bitmap->pImage));
//bitmap->hPainter.setBackgroundMode(Qt::OpaqueMode);
bitmap->hPainter.setPen(col);
void OSD_BASE::write_bitmap_to_file(bitmap_t *bitmap, const _TCHAR *file_path)
{
int comp_quality = 0;
- bitmap->pImage.save(QString::fromUtf8(file_path), "PNG", comp_quality);
+ bitmap->pImage.save(QString::fromUtf8((const char *)file_path), "PNG", comp_quality);
csp_logger->debug_log(CSP_LOG_DEBUG, CSP_LOG_TYPE_PRINTER, "Save (print outed) bitmap %08x to %s", bitmap, file_path);
}
tmps = tmps + QString::fromUtf8("_");
tmps = tmps + nowTime.toString(QString::fromUtf8("yyyy-MM-dd_hh-mm-ss.zzz"));
tmps = tmps + QString::fromUtf8(".wav");
- strncpy(sound_file_name, tmps.toLocal8Bit().constData(), sizeof(sound_file_name));
+ strncpy((char *)sound_file_name, tmps.toLocal8Bit().constData(), sizeof(sound_file_name));
// create wave file
rec_sound_fio = new FILEIO();
if(rec_sound_fio->Fopen(bios_path(sound_file_name), FILEIO_WRITE_BINARY)) {