From a73a90b701feacfdb5cdf8c943a71b08287ebc4f Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sat, 14 Jan 2017 18:17:41 +0100 Subject: [PATCH 001/427] Remove a bunch of unneeded parameters --- menu/cbs/menu_cbs_ok.c | 89 +++++++++++++++-------------------------- menu/menu_displaylist.c | 4 +- 2 files changed, 33 insertions(+), 60 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index cda27b8068..944791e075 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1371,8 +1371,6 @@ static int action_ok_playlist_entry_collection(const char *path, core_info_ctx_find_t core_info; char new_display_name[PATH_MAX_LENGTH]; const char *entry_path = NULL; - const char *entry_crc32 = NULL; - const char *db_name = NULL; const char *path_base = path_basename(menu->db_playlist_file); bool found_associated_core = @@ -1389,6 +1387,8 @@ static int action_ok_playlist_entry_collection(const char *path, if (!found_associated_core) { + /* TODO: figure out if this should refer to the inner or outer entry_path */ + /* TODO: make sure there's only one entry_path in this function */ int ret = action_ok_file_load_with_detect_core_collection(entry_path, label, type, selection_ptr, entry_idx); if (playlist_initialized) @@ -1398,19 +1398,16 @@ static int action_ok_playlist_entry_collection(const char *path, menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &tmp_playlist); - playlist_get_index(tmp_playlist, selection_ptr, - &entry_path, &entry_label, NULL, NULL, &entry_crc32, &db_name); - strlcpy(new_display_name, core_info.inf->display_name, sizeof(new_display_name)); playlist_update(tmp_playlist, selection_ptr, - entry_path, - entry_label, + NULL, + NULL, new_core_path, new_display_name, - entry_crc32, - db_name); + NULL, + NULL); playlist_write_file(tmp_playlist); } else @@ -1431,7 +1428,7 @@ static int action_ok_playlist_entry_collection(const char *path, playlist_info.idx, &path, NULL, NULL, NULL, NULL, NULL); return generic_action_ok_file_load(new_core_path, path, - action_type, content_enum_idx); + action_type, content_enum_idx); } static int action_ok_playlist_entry(const char *path, @@ -1442,7 +1439,6 @@ static int action_ok_playlist_entry(const char *path, size_t selection_ptr = 0; playlist_t *playlist = g_defaults.content_history; const char *entry_path = NULL; - const char *entry_label = NULL; const char *core_path = NULL; const char *core_name = NULL; playlist_t *tmp_playlist = NULL; @@ -1456,7 +1452,7 @@ static int action_ok_playlist_entry(const char *path, selection_ptr = entry_idx; playlist_get_index(playlist, selection_ptr, - &entry_path, &entry_label, &core_path, &core_name, NULL, NULL); + &entry_path, NULL, &core_path, &core_name, NULL, NULL); if ( string_is_equal(core_path, file_path_str(FILE_PATH_DETECT)) && string_is_equal(core_name, file_path_str(FILE_PATH_DETECT))) @@ -1465,9 +1461,7 @@ static int action_ok_playlist_entry(const char *path, char new_core_path[PATH_MAX_LENGTH]; char new_display_name[PATH_MAX_LENGTH]; const char *entry_path = NULL; - const char *entry_crc32 = NULL; - const char *db_name = NULL; - const char *path_base = + const char *path_base = path_basename(menu->db_playlist_file); bool found_associated_core = false; @@ -1484,24 +1478,23 @@ static int action_ok_playlist_entry(const char *path, found_associated_core = false; if (!found_associated_core) - return action_ok_file_load_with_detect_core(entry_path, + /* TODO: figure out if this should refer to the inner or outer entry_path */ + /* TODO: make sure there's only one entry_path in this function */ + return action_ok_file_load_with_detect_core(entry_path, label, type, selection_ptr, entry_idx); menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &tmp_playlist); - playlist_get_index(tmp_playlist, selection_ptr, - &entry_path, &entry_label, NULL, NULL, &entry_crc32, &db_name); - strlcpy(new_display_name, core_info.inf->display_name, sizeof(new_display_name)); playlist_update(tmp_playlist, selection_ptr, - entry_path, - entry_label, + NULL, + NULL, new_core_path, new_display_name, - entry_crc32, - db_name); + NULL, + NULL); playlist_write_file(tmp_playlist); } @@ -1530,7 +1523,6 @@ static int action_ok_playlist_entry_start_content(const char *path, bool playlist_initialized = false; playlist_t *playlist = NULL; const char *entry_path = NULL; - const char *entry_label = NULL; const char *core_path = NULL; const char *core_name = NULL; playlist_t *tmp_playlist = NULL; @@ -1557,7 +1549,7 @@ static int action_ok_playlist_entry_start_content(const char *path, selection_ptr = rdb_entry_start_game_selection_ptr; playlist_get_index(playlist, selection_ptr, - &entry_path, &entry_label, &core_path, &core_name, NULL, NULL); + &entry_path, NULL, &core_path, &core_name, NULL, NULL); if ( string_is_equal(core_path, file_path_str(FILE_PATH_DETECT)) && string_is_equal(core_name, file_path_str(FILE_PATH_DETECT))) @@ -1566,8 +1558,6 @@ static int action_ok_playlist_entry_start_content(const char *path, char new_core_path[PATH_MAX_LENGTH]; char new_display_name[PATH_MAX_LENGTH]; const char *entry_path = NULL; - const char *entry_crc32 = NULL; - const char *db_name = NULL; const char *path_base = path_basename(menu->db_playlist_file); bool found_associated_core = false; @@ -1586,7 +1576,9 @@ static int action_ok_playlist_entry_start_content(const char *path, if (!found_associated_core) { - int ret = action_ok_file_load_with_detect_core(entry_path, + /* TODO: figure out if this should refer to the inner or outer entry_path */ + /* TODO: make sure there's only one entry_path in this function */ + int ret = action_ok_file_load_with_detect_core(entry_path, label, type, selection_ptr, entry_idx); if (playlist_initialized) playlist_free(tmp_playlist); @@ -1595,19 +1587,16 @@ static int action_ok_playlist_entry_start_content(const char *path, menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &tmp_playlist); - playlist_get_index(tmp_playlist, selection_ptr, - &entry_path, &entry_label, NULL, NULL, &entry_crc32, &db_name); - strlcpy(new_display_name, core_info.inf->display_name, sizeof(new_display_name)); playlist_update(tmp_playlist, selection_ptr, - entry_path, - entry_label, + NULL, + NULL, new_core_path, new_display_name, - entry_crc32, - db_name); + NULL, + NULL); playlist_write_file(tmp_playlist); } @@ -2036,10 +2025,6 @@ static int action_ok_core_deferred_set(const char *path, { size_t selection; char core_display_name[PATH_MAX_LENGTH]; - const char *entry_path = NULL; - const char *entry_label = NULL; - const char *entry_crc32 = NULL; - const char *db_name = NULL; playlist_t *playlist = NULL; core_display_name[0] = '\0'; @@ -2055,14 +2040,11 @@ static int action_ok_core_deferred_set(const char *path, idx = rdb_entry_start_game_selection_ptr; - playlist_get_index(playlist, idx, - &entry_path, &entry_label, NULL, NULL, &entry_crc32, &db_name); - playlist_update(playlist, idx, - entry_path, entry_label, - path , core_display_name, - entry_crc32, - db_name); + NULL, NULL, + path, core_display_name, + NULL, + NULL); playlist_write_file(playlist); @@ -2077,10 +2059,6 @@ static int action_ok_core_deferred_set_current_core(const char *path, { size_t selection; char core_display_name[PATH_MAX_LENGTH]; - const char *entry_path = NULL; - const char *entry_label = NULL; - const char *entry_crc32 = NULL; - const char *db_name = NULL; playlist_t *playlist = NULL; core_display_name[0] = '\0'; @@ -2096,14 +2074,11 @@ static int action_ok_core_deferred_set_current_core(const char *path, idx = rdb_entry_start_game_selection_ptr; - playlist_get_index(playlist, idx, - &entry_path, &entry_label, NULL, NULL, &entry_crc32, &db_name); - playlist_update(playlist, idx, - entry_path, entry_label, - path , core_display_name, - entry_crc32, - db_name); + NULL, NULL, + path, core_display_name, + NULL, + NULL); playlist_write_file(playlist); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 06a6cda92f..84f802422e 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1436,10 +1436,8 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info, char fill_buf[PATH_MAX_LENGTH]; char path_copy[PATH_MAX_LENGTH]; const char *core_name = NULL; - const char *db_name = NULL; const char *path = NULL; const char *label = NULL; - const char *crc32 = NULL; fill_buf[0] = path_copy[0] = '\0'; @@ -1448,7 +1446,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info, path = path_copy; playlist_get_index(playlist, i, - &path, &label, NULL, &core_name, &crc32, &db_name); + &path, &label, NULL, &core_name, NULL, NULL); if (core_name) strlcpy(fill_buf, core_name, sizeof(fill_buf)); From c875d95f7a40311eebd1611a5a80cf9526e5f765 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 14 Jan 2017 21:02:30 +0100 Subject: [PATCH 002/427] Revert "Free font data inside gfx/font_driver.c's free function" This reverts commit b3f1bbc15e8f8c08531c3661041d0ded9bfeca51. --- gfx/drivers_font/caca_font.c | 1 + gfx/drivers_font/ctr_font.c | 1 + gfx/drivers_font/d3d_w32_font.cpp | 3 + gfx/drivers_font/gl_raster_font.c | 42 ++++--- gfx/drivers_font/vita2d_font.c | 2 + gfx/drivers_font/vulkan_raster_font.c | 2 + gfx/drivers_font/xdk1_xfonts.c | 6 + gfx/drivers_font/xdk360_fonts.cpp | 171 ++++++++++++-------------- gfx/font_driver.c | 25 ++-- gfx/video_driver.c | 29 +++-- 10 files changed, 144 insertions(+), 138 deletions(-) diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index 034608a4f5..f7ab54f028 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -59,6 +59,7 @@ static void *caca_init_font(void *data, static void caca_render_free_font(void *data) { + } static int caca_get_message_width(void *data, const char *msg, diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index ce4c4e48f4..2409aec4e1 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -109,6 +109,7 @@ static void ctr_font_free_font(void* data) #else linearFree(font->texture.data); #endif + free(font); } static int ctr_font_get_message_width(void* data, const char* msg, diff --git a/gfx/drivers_font/d3d_w32_font.cpp b/gfx/drivers_font/d3d_w32_font.cpp index d8ba99055d..1fd5065782 100644 --- a/gfx/drivers_font/d3d_w32_font.cpp +++ b/gfx/drivers_font/d3d_w32_font.cpp @@ -88,6 +88,9 @@ static void d3dfonts_w32_free_font(void *data) if (d3dfonts->font) d3dfonts->font->Release(); d3dfonts->font = NULL; + + free(d3dfonts); + d3dfonts = NULL; } static void d3dfonts_w32_render_msg(void *data, const char *msg, diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index 707585ad0c..fb7d653a96 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -57,6 +57,8 @@ typedef struct video_font_raster_block_t *block; } gl_raster_t; +static void gl_raster_font_free_font(void *data); + static bool gl_raster_font_upload_atlas(gl_raster_t *font) { unsigned i, j; @@ -142,21 +144,6 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font) return true; } -static void gl_raster_font_free_font(void *data) -{ - gl_raster_t *font = (gl_raster_t*)data; - if (!font) - return; - - if (font->font_driver && font->font_data) - font->font_driver->free(font->font_data); - - if (video_driver_is_threaded()) - video_context_driver_make_current(true); - - glDeleteTextures(1, &font->tex); -} - static void *gl_raster_font_init_font(void *data, const char *font_path, float font_size) { @@ -169,7 +156,11 @@ static void *gl_raster_font_init_font(void *data, if (!font_renderer_create_default((const void**)&font->font_driver, &font->font_data, font_path, font_size)) - goto error; + { + RARCH_WARN("Couldn't initialize font renderer.\n"); + free(font); + return NULL; + } if (video_driver_is_threaded()) video_context_driver_make_current(false); @@ -195,13 +186,28 @@ static void *gl_raster_font_init_font(void *data, return font; error: - RARCH_WARN("Couldn't initialize font renderer.\n"); gl_raster_font_free_font(font); - free(font); + font = NULL; return NULL; } +static void gl_raster_font_free_font(void *data) +{ + gl_raster_t *font = (gl_raster_t*)data; + if (!font) + return; + + if (font->font_driver && font->font_data) + font->font_driver->free(font->font_data); + + if (video_driver_is_threaded()) + video_context_driver_make_current(true); + + glDeleteTextures(1, &font->tex); + + free(font); +} static int gl_get_message_width(void *data, const char *msg, unsigned msg_len, float scale) diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index 2cffc9dbf0..0069501abc 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -98,6 +98,8 @@ static void vita2d_font_free_font(void *data) vita2d_wait_rendering_done(); #endif vita2d_free_texture(font->texture); + + free(font); } static int vita2d_font_get_message_width(void *data, const char *msg, diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 8f0b66b147..84f071a0fc 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -85,6 +85,8 @@ static void vulkan_raster_font_free_font(void *data) vkQueueWaitIdle(font->vk->context->queue); vulkan_destroy_texture( font->vk->context->device, &font->texture); + + free(font); } static int vulkan_get_message_width(void *data, const char *msg, diff --git a/gfx/drivers_font/xdk1_xfonts.c b/gfx/drivers_font/xdk1_xfonts.c index 644738877c..bceffdf95e 100644 --- a/gfx/drivers_font/xdk1_xfonts.c +++ b/gfx/drivers_font/xdk1_xfonts.c @@ -55,6 +55,12 @@ static void *xfonts_init_font(void *video_data, static void xfonts_free_font(void *data) { + xfonts_t *font = (xfonts_t*)data; + + if (font) + free(font); + + font = NULL; } static void xfonts_render_msg(void *data, const char *msg, diff --git a/gfx/drivers_font/xdk360_fonts.cpp b/gfx/drivers_font/xdk360_fonts.cpp index 5f8d128cd5..e0e00ebc57 100644 --- a/gfx/drivers_font/xdk360_fonts.cpp +++ b/gfx/drivers_font/xdk360_fonts.cpp @@ -58,18 +58,18 @@ enum class PackedResource { protected: - BYTE* m_pSysMemData; /* Allocated memory for resource headers etc. */ + BYTE* m_pSysMemData; // Alloc'ed memory for resource headers etc. DWORD m_dwSysMemDataSize; - BYTE* m_pVidMemData; /* Allocated memory for resource data, etc. */ + BYTE* m_pVidMemData; // Alloc'ed memory for resource data, etc. DWORD m_dwVidMemDataSize; - XBRESOURCE* m_pResourceTags; /* Tags to associate names with the resources */ - DWORD m_dwNumResourceTags; /* Number of resource tags */ - BOOL m_bInitialized; /* Resource is fully initialized */ + XBRESOURCE* m_pResourceTags; // Tags to associate names with the resources + DWORD m_dwNumResourceTags; // Number of resource tags + BOOL m_bInitialized; // Resource is fully initialized public: - /* Loads the resources out of the specified bundle */ + // Loads the resources out of the specified bundle #if defined(_XBOX1) HRESULT Create( const char *strFilename, DWORD dwNumResourceTags = 0L, XBRESOURCE* pResourceTags = NULL ); @@ -82,21 +82,20 @@ class PackedResource BOOL Initialized() const; #ifdef _XBOX360 - /* Retrieves the resource tags */ + // Retrieves the resource tags void GetResourceTags( DWORD* pdwNumResourceTags, XBRESOURCE** ppResourceTags ); #endif - /* Helper function to make sure a resource is registered */ + // Helper function to make sure a resource is registered LPDIRECT3DRESOURCE RegisterResource( LPDIRECT3DRESOURCE pResource ) const { #ifdef _XBOX1 - /* Register the resource, if it has not yet been registered. We mark - * a resource as registered by upping it's reference count. */ + // Register the resource, if it has not yet been registered. We mark + // a resource as registered by upping it's reference count. if( pResource && ( pResource->Common & D3DCOMMON_REFCOUNT_MASK ) == 1 ) { - - /* Special case CPU-copy push buffers (which live in system memory) */ - if( ( pResource->Common & D3DCOMMON_TYPE_PUSHBUFFER ) && + // Special case CPU-copy push buffers (which live in system memory) + if( ( pResource->Common & D3DCOMMON_TYPE_PUSHBUFFER ) && ( pResource->Common & D3DPUSHBUFFER_RUN_USING_CPU_COPY ) ) pResource->Data += (DWORD)m_pSysMemData; else @@ -108,46 +107,32 @@ class PackedResource return pResource; } - /* Functions to retrieve resources by their offset */ + // Functions to retrieve resources by their offset void *GetData( DWORD dwOffset ) const - { - return &m_pSysMemData[dwOffset]; - } + { return &m_pSysMemData[dwOffset]; } LPDIRECT3DRESOURCE GetResource( DWORD dwOffset ) const - { - return RegisterResource( (LPDIRECT3DRESOURCE)GetData(dwOffset) ); - } + { return RegisterResource( (LPDIRECT3DRESOURCE)GetData(dwOffset) ); } LPDIRECT3DTEXTURE GetTexture( DWORD dwOffset ) const - { - return (LPDIRECT3DTEXTURE)GetResource( dwOffset ); - } + { return (LPDIRECT3DTEXTURE)GetResource( dwOffset ); } LPDIRECT3DVERTEXBUFFER GetVertexBuffer( DWORD dwOffset ) const - { - return (LPDIRECT3DVERTEXBUFFER)GetResource( dwOffset ); - } + { return (LPDIRECT3DVERTEXBUFFER)GetResource( dwOffset ); } - /* Functions to retrieve resources by their name */ + // Functions to retrieve resources by their name void *GetData( const char* strName ) const; LPDIRECT3DRESOURCE GetResource( const char* strName ) const - { - return RegisterResource( (LPDIRECT3DRESOURCE)GetData(strName)); - } + { return RegisterResource( (LPDIRECT3DRESOURCE)GetData( strName ) ); } LPDIRECT3DTEXTURE GetTexture( const char* strName ) const - { - return (LPDIRECT3DTEXTURE)GetResource( strName ); - } + { return (LPDIRECT3DTEXTURE)GetResource( strName ); } LPDIRECT3DVERTEXBUFFER GetVertexBuffer( const char* strName ) const - { - return (LPDIRECT3DVERTEXBUFFER)GetResource( strName ); - } + { return (LPDIRECT3DVERTEXBUFFER)GetResource( strName ); } - /* Constructor/destructor */ + // Constructor/destructor PackedResource(); ~PackedResource(); }; @@ -158,13 +143,13 @@ class PackedResource PackedResource::PackedResource() { - m_pSysMemData = NULL; - m_dwSysMemDataSize = 0L; - m_pVidMemData = NULL; - m_dwVidMemDataSize = 0L; - m_pResourceTags = NULL; + m_pSysMemData = NULL; + m_dwSysMemDataSize = 0L; + m_pVidMemData = NULL; + m_dwVidMemDataSize = 0L; + m_pResourceTags = NULL; m_dwNumResourceTags = 0L; - m_bInitialized = FALSE; + m_bInitialized = FALSE; } @@ -250,8 +235,8 @@ HRESULT PackedResource::Create(const char *strFilename) XPR_HEADER xprh; bool retval; #ifdef _XBOX1 - char strResourcePath[512]; BOOL bHasResourceOffsetsTable = FALSE; + char strResourcePath[512]; if (FAILED(FindMediaFile(strResourcePath, strFilename, sizeof(strResourcePath)))) return E_FAIL; @@ -285,7 +270,7 @@ HRESULT PackedResource::Create(const char *strFilename) return E_FAIL; } - /* Compute memory requirements */ + // Compute memory requirements #if defined(_XBOX1) m_dwSysMemDataSize = xprh.dwHeaderSize - sizeof(XPR_HEADER); m_dwVidMemDataSize = xprh.dwTotalSize - xprh.dwHeaderSize; @@ -294,7 +279,7 @@ HRESULT PackedResource::Create(const char *strFilename) m_dwVidMemDataSize = xprh.dwDataSize; #endif - /* Allocate memory */ + // Allocate memory m_pSysMemData = (BYTE*)malloc(m_dwSysMemDataSize); if (m_pSysMemData == NULL) { @@ -319,7 +304,7 @@ HRESULT PackedResource::Create(const char *strFilename) return E_FAIL; } - /* Read in the data from the file */ + // Read in the data from the file if( !ReadFile( hFile, m_pSysMemData, m_dwSysMemDataSize, &dwNumBytesRead, NULL) || !ReadFile( hFile, m_pVidMemData, m_dwVidMemDataSize, &dwNumBytesRead, NULL)) { @@ -327,7 +312,7 @@ HRESULT PackedResource::Create(const char *strFilename) return E_FAIL; } - /* Done with the file */ + // Done with the file CloseHandle( hFile); #ifdef _XBOX1 @@ -386,17 +371,16 @@ void PackedResource::GetResourceTags(DWORD* pdwNumResourceTags, void PackedResource::Destroy() { free(m_pSysMemData); + m_pSysMemData = NULL; + m_dwSysMemDataSize = 0L; - if (m_pVidMemData) + if (m_pVidMemData != NULL) FreeContiguousMemory(m_pVidMemData); - m_pSysMemData = NULL; - m_dwSysMemDataSize = 0L; + m_pVidMemData = NULL; + m_dwVidMemDataSize = 0L; - m_pVidMemData = NULL; - m_dwVidMemDataSize = 0L; - - m_pResourceTags = NULL; + m_pResourceTags = NULL; m_dwNumResourceTags = 0L; m_bInitialized = FALSE; @@ -546,6 +530,8 @@ static void *xdk360_init_font(void *video_data, if (!font) return NULL; + (void)font_size; + font->d3d = (d3d_video_t*)video_data; font->m_pFontTexture = NULL; @@ -613,10 +599,10 @@ static void xdk360_free_font(void *data) return; /* Destroy the font */ - font->m_pFontTexture = NULL; - font->m_dwNumGlyphs = 0L; - font->m_Glyphs = NULL; - font->m_cMaxGlyph = 0; + font->m_pFontTexture = NULL; + font->m_dwNumGlyphs = 0L; + font->m_Glyphs = NULL; + font->m_cMaxGlyph = 0; font->m_TranslatorTable = NULL; if (font->s_FontLocals.m_pFontPixelShader) @@ -626,12 +612,15 @@ static void xdk360_free_font(void *data) if (font->s_FontLocals.m_pFontVertexDecl) font->s_FontLocals.m_pFontVertexDecl->Release(); - font->s_FontLocals.m_pFontPixelShader = NULL; + font->s_FontLocals.m_pFontPixelShader = NULL; font->s_FontLocals.m_pFontVertexShader = NULL; - font->s_FontLocals.m_pFontVertexDecl = NULL; + font->s_FontLocals.m_pFontVertexDecl = NULL; if (m_xprResource.Initialized()) m_xprResource.Destroy(); + + free(font); + font = NULL; } static void xdk360_render_msg_post(xdk360_video_font_t * font) @@ -655,7 +644,7 @@ static void xdk360_render_msg_pre(xdk360_video_font_t * font) d3dr->GetRenderState( D3DRS_VIEWPORTENABLE, (DWORD*)&font->m_dwSavedState ); /* Set the texture scaling factor as a vertex shader constant. */ - D3DTexture_GetLevelDesc(font->m_pFontTexture, 0, &TextureDesc); /* Get the description */ + D3DTexture_GetLevelDesc(font->m_pFontTexture, 0, &TextureDesc); // Get the description /* Set render state. */ d3d_set_texture(d3dr, 0, font->m_pFontTexture); @@ -696,11 +685,11 @@ static void xdk360_draw_text(xdk360_video_font_t *font, * the vColor array. */ d3dr->SetVertexShaderConstantF(1, vColor, 1); - m_fCursorX = floorf(x); - m_fCursorY = floorf(y); + m_fCursorX = floorf(x); + m_fCursorY = floorf(y); /* Adjust for padding. */ - y -= font->m_fFontTopPadding; + y -= font->m_fFontTopPadding; /* Begin drawing the vertices * Declared as volatile to force writing in ascending @@ -710,7 +699,7 @@ static void xdk360_draw_text(xdk360_video_font_t *font, * memory. */ - dwNumChars = wcslen(strText); + dwNumChars = wcslen(strText); d3dr->BeginVertices(D3DPT_QUADLIST, 4 * dwNumChars, sizeof(XMFLOAT4), (void**)&pVertex); @@ -721,8 +710,8 @@ static void xdk360_draw_text(xdk360_video_font_t *font, #ifdef MSB_FIRST uint32_t tu1, tu2, tv1, tv2; #endif - const GLYPH_ATTR *pGlyph = NULL; - wchar_t letter = *strText++; /* Get the current letter in the string */ + const GLYPH_ATTR *pGlyph; + wchar_t letter = *strText++; /* Get the current letter in the string */ /* Handle the newline character. */ if (letter == L'\n') @@ -743,16 +732,16 @@ static void xdk360_draw_text(xdk360_video_font_t *font, fWidth = FONT_SCALE(font->d3d) * (float)pGlyph->wWidth; fHeight = FONT_SCALE(font->d3d) * font->m_fFontHeight; - m_fCursorX += fOffset; + m_fCursorX += fOffset; /* Add the vertices to draw this glyph. */ #ifdef MSB_FIRST /* Convert shorts to 32 bit longs for in register merging */ - tu1 = pGlyph->tu1; - tv1 = pGlyph->tv1; - tu2 = pGlyph->tu2; - tv2 = pGlyph->tv2; + tu1 = pGlyph->tu1; + tv1 = pGlyph->tv1; + tu2 = pGlyph->tu2; + tv2 = pGlyph->tv2; #endif /* NOTE: The vertexes are 2 floats for the screen coordinates, @@ -771,27 +760,27 @@ static void xdk360_draw_text(xdk360_video_font_t *font, /* Setup the vertex/screen coordinates */ - pVertex[0] = m_fCursorX; - pVertex[1] = m_fCursorY; - pVertex[3] = 0; - pVertex[4] = m_fCursorX + fWidth; - pVertex[5] = m_fCursorY; - pVertex[7] = 0; - pVertex[8] = m_fCursorX + fWidth; - pVertex[9] = m_fCursorY + fHeight; - pVertex[11] = 0; - pVertex[12] = m_fCursorX; - pVertex[13] = m_fCursorY + fHeight; + pVertex[0] = m_fCursorX; + pVertex[1] = m_fCursorY; + pVertex[3] = 0; + pVertex[4] = m_fCursorX + fWidth; + pVertex[5] = m_fCursorY; + pVertex[7] = 0; + pVertex[8] = m_fCursorX + fWidth; + pVertex[9] = m_fCursorY + fHeight; + pVertex[11] = 0; + pVertex[12] = m_fCursorX; + pVertex[13] = m_fCursorY + fHeight; #ifdef MSB_FIRST - ((volatile uint32_t *)pVertex)[2] = (tu1 << 16) | tv1; /* Merged using big endian rules */ - ((volatile uint32_t *)pVertex)[6] = (tu2 << 16) | tv1; /* Merged using big endian rules */ - ((volatile uint32_t*)pVertex)[10] = (tu2 << 16) | tv2; /* Merged using big endian rules */ - ((volatile uint32_t*)pVertex)[14] = (tu1 << 16) | tv2; /* Merged using big endian rules */ + ((volatile uint32_t *)pVertex)[2] = (tu1 << 16) | tv1; // Merged using big endian rules + ((volatile uint32_t *)pVertex)[6] = (tu2 << 16) | tv1; // Merged using big endian rules + ((volatile uint32_t*)pVertex)[10] = (tu2 << 16) | tv2; // Merged using big endian rules + ((volatile uint32_t*)pVertex)[14] = (tu1 << 16) | tv2; // Merged using big endian rules #endif - pVertex[15] = 0; + pVertex[15] = 0; + pVertex += 16; - pVertex += 16; - m_fCursorX += fAdvance; + m_fCursorX += fAdvance; dwNumChars--; } diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 717800bd6a..9b6900121f 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -14,10 +14,6 @@ * If not, see . */ -#include - -#include - #include "font_driver.h" #include "video_thread_wrapper.h" @@ -28,6 +24,8 @@ #include "../config.h" #endif +#include + static const font_renderer_driver_t *font_backends[] = { #ifdef HAVE_FREETYPE &freetype_font_renderer, @@ -194,8 +192,7 @@ static bool vulkan_font_init_first( for (i = 0; vulkan_font_backends[i]; i++) { - void *data = vulkan_font_backends[i]->init( - video_data, font_path, font_size); + void *data = vulkan_font_backends[i]->init(video_data, font_path, font_size); if (!data) continue; @@ -356,9 +353,6 @@ void font_driver_free(void *font_data) if (font->renderer && font->renderer->free) font->renderer->free(font->renderer_data); - if (font->renderer_data) - free(font->renderer_data); - font->renderer = NULL; font->renderer_data = NULL; @@ -370,9 +364,9 @@ font_data_t *font_driver_init_first( void *video_data, const char *font_path, float font_size, bool threading_hint, enum font_driver_render_api api) { - const void *font_driver = NULL; - void *font_handle = NULL; - bool ok = false; + const void *font_driver; + void *font_handle; + bool ok = false; #ifdef HAVE_THREADS if (threading_hint @@ -401,15 +395,12 @@ font_data_t *font_driver_init_first( void font_driver_init_osd(void *video_data, bool threading_hint, enum font_driver_render_api api) { settings_t *settings = config_get_ptr(); - const char *path = settings->path.font; - if (video_font_driver) return; video_font_driver = font_driver_init_first(video_data, - (!string_is_empty(path)) ? path : NULL, - settings->video.font_size, - threading_hint, api); + *settings->path.font ? settings->path.font : NULL, + settings->video.font_size, threading_hint, api); if (!video_font_driver) RARCH_ERR("[font]: Failed to initialize OSD font.\n"); diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 0ebd227f01..40cfcaa5f7 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1482,10 +1482,14 @@ void video_driver_set_viewport_core(void) /* Fallback to 1:1 pixel ratio if none provided */ if (geom->aspect_ratio > 0.0f) + { aspectratio_lut[ASPECT_RATIO_CORE].value = geom->aspect_ratio; + } else + { aspectratio_lut[ASPECT_RATIO_CORE].value = (float)geom->base_width / geom->base_height; + } } void video_driver_reset_custom_viewport(void) @@ -1648,7 +1652,8 @@ bool video_driver_find_driver(void) else { unsigned d; - RARCH_ERR("Couldn't find any video driver named \"%s\"\n", settings->video.driver); + RARCH_ERR("Couldn't find any video driver named \"%s\"\n", + settings->video.driver); RARCH_LOG_OUTPUT("Available video drivers are:\n"); for (d = 0; video_driver_find_handle(d); d++) RARCH_LOG_OUTPUT("\t%s\n", video_driver_find_ident(d)); @@ -1964,7 +1969,7 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp, * geometry for the "normal" case. */ struct retro_system_av_info *av_info = video_viewport_get_system_av_info(); - unsigned base_height = 0; + unsigned base_height = 0; if (av_info) base_height = av_info->geometry.base_height; @@ -2225,20 +2230,20 @@ bool video_driver_translate_coord_viewport( if (scaled_screen_y < -0x7fff || scaled_screen_y > 0x7fff) scaled_screen_y = -0x8000; /* OOB */ - mouse_x -= vp->x; - mouse_y -= vp->y; + mouse_x -= vp->x; + mouse_y -= vp->y; - scaled_x = (2 * mouse_x * 0x7fff) / norm_full_vp_width - 0x7fff; - scaled_y = (2 * mouse_y * 0x7fff) / norm_full_vp_height - 0x7fff; + scaled_x = (2 * mouse_x * 0x7fff) / norm_full_vp_width - 0x7fff; + scaled_y = (2 * mouse_y * 0x7fff) / norm_full_vp_height - 0x7fff; if (scaled_x < -0x7fff || scaled_x > 0x7fff) - scaled_x = -0x8000; /* OOB */ + scaled_x = -0x8000; /* OOB */ if (scaled_y < -0x7fff || scaled_y > 0x7fff) - scaled_y = -0x8000; /* OOB */ + scaled_y = -0x8000; /* OOB */ - *res_x = scaled_x; - *res_y = scaled_y; - *res_screen_x = scaled_screen_x; - *res_screen_y = scaled_screen_y; + *res_x = scaled_x; + *res_y = scaled_y; + *res_screen_x = scaled_screen_x; + *res_screen_y = scaled_screen_y; return true; } From e47aa13d57a14e4744242d2331c37c7f99b04629 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 14 Jan 2017 15:07:38 -0500 Subject: [PATCH 003/427] add ISSUE template --- .github/ISSUE_TEMPLATE.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..9f0865e883 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,29 @@ +# First and foremost consider this: +- Only RetroArch bugs should be filed here. Not core bugs or game bugs +- This is not a forum or a help section, this is strictly developer oriented + +## Description + +[Description of the bug] + +### Expected behavior + +[What you expected to happen] + +### Actual behavior + +[What is actually happening] + +### Steps to reproduce the bug + +1. [First step] +2. [Second step] +3. [and so on...] + +### Bisect Results + +[Try to bisect and tell us when this started happening] + +### System information + +- OS: [The operating system you're running] From eb8f086e3584b61bb68a905f182c334d78201793 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 14 Jan 2017 15:16:59 -0500 Subject: [PATCH 004/427] add more fields --- .github/ISSUE_TEMPLATE.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 9f0865e883..bb8f7892cf 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1,7 @@ -# First and foremost consider this: -- Only RetroArch bugs should be filed here. Not core bugs or game bugs -- This is not a forum or a help section, this is strictly developer oriented - +# First and foremost consider this: +- Only RetroArch bugs should be filed here. Not core bugs or game bugs +- This is not a forum or a help section, this is strictly developer oriented + ## Description [Description of the bug] @@ -21,9 +21,15 @@ 3. [and so on...] ### Bisect Results - + [Try to bisect and tell us when this started happening] -### System information +### Version/Commit +You can find this information under Information/System Information -- OS: [The operating system you're running] +- RetroArch: [version/commit] + +### Environment information + +- OS: [The operating system you're running] +- Compiler: [In case you are running local builds] From ca5d7980750768b8d4b75a6f17f4323042d1c873 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 14 Jan 2017 21:33:36 +0100 Subject: [PATCH 005/427] Add diff.diff --- diff.diff | 179 ++++++++++++++++++++++++++++++++++++++++++++++ menu/menu_event.c | 2 +- 2 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 diff.diff diff --git a/diff.diff b/diff.diff new file mode 100644 index 0000000000..385e7a39dd --- /dev/null +++ b/diff.diff @@ -0,0 +1,179 @@ +diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp +index fc6132d..6c81bcb 100644 +--- a/gfx/drivers_context/wgl_ctx.cpp ++++ b/gfx/drivers_context/wgl_ctx.cpp +@@ -81,6 +81,20 @@ + #endif + + #if defined(HAVE_OPENGL) ++typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC)(HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); ++typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC)(HDC hdc, INT32 *numerator, INT32 *denominator); ++typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); ++typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC)(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); ++typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC)(HDC hdc, INT64 traget_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); ++typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); ++ ++PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; ++PFNWGLGETSYNCVALUESOMLPROC wglGetSyncValuesOML; ++PFNWGLGETMSCRATEOMLPROC wglGetMscRateOML; ++PFNWGLSWAPBUFFERSMSCOMLPROC wglSwapBuffersMscOML; ++PFNWGLWAITFORMSCOMLPROC wglWaitForMscOML; ++PFNWGLWAITFORSBCOMLPROC wglWaitForSbcOML; ++ + typedef HGLRC (APIENTRY *wglCreateContextAttribsProc)(HDC, HGLRC, const int*); + static wglCreateContextAttribsProc pcreate_context; + #endif +@@ -91,6 +105,13 @@ static HGLRC win32_hw_hrc; + static HDC win32_hdc; + static bool win32_use_hw_ctx = false; + static bool win32_core_hw_context_enable = false; ++static unsigned g_wgl_swap_mode = 0; ++ ++static int g_wgl_divisor = 0; ++static int g_wgl_remainder = 0; ++static int64_t g_wgl_ust = 0; ++static int64_t g_wgl_msc = 0; ++static int64_t g_wgl_sbc = 0; + + #ifdef HAVE_VULKAN + static gfx_ctx_vulkan_data_t win32_vk; +@@ -103,6 +124,44 @@ static enum gfx_ctx_api win32_api = GFX_CTX_NONE; + + static dylib_t dll_handle = NULL; /* Handle to OpenGL32.dll */ + ++static unsigned strclen(const unsigned char *s, unsigned char c) ++{ ++ unsigned i = 0; ++ while (s + i != NULL && s[i] != '\0' && s[i] != c) ++ i++; ++ return i; ++} ++ ++static bool strsame(const unsigned char *a, const unsigned char *b, unsigned n) ++{ ++ unsigned i = 0; ++ while (i < n && a + i != NULL && b + i != NULL && a[i] == b[i]) ++ i++; ++ return i == n; ++} ++ ++static bool wgl_has_extension(HDC hdc, const char *ext) ++{ ++ char *end; ++ int len = strlen(ext); ++ char *p = (char*)wglGetExtensionsStringARB(hdc); ++ ++ if (p == 0) ++ return false; ++ ++ end = p + strlen(p); ++ ++ while (p < end) ++ { ++ int n = strclen((const unsigned char*)p, ' '); ++ if (len == n && strsame((const unsigned char*)ext, (const unsigned char*)p, n)) ++ return true; ++ p += n+1; ++ } ++ ++ return false; ++} ++ + static void setup_pixel_format(HDC hdc) + { + PIXELFORMATDESCRIPTOR pfd = {0}; +@@ -282,9 +341,7 @@ static void gfx_ctx_wgl_swap_interval(void *data, unsigned interval) + case GFX_CTX_OPENGL_API: + #ifdef HAVE_OPENGL + win32_interval = interval; +- if (!win32_hrc) +- return; +- if (!p_swap_interval) ++ if (!win32_hrc || !p_swap_interval) + return; + + RARCH_LOG("[WGL]: wglSwapInterval(%u)\n", win32_interval); +@@ -339,7 +396,19 @@ static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t video_info) + { + case GFX_CTX_OPENGL_API: + #ifdef HAVE_OPENGL +- SwapBuffers(win32_hdc); ++ if (g_wgl_swap_mode) ++ { ++ if (win32_interval) ++ { ++ wglWaitForMscOML(win32_hdc, g_wgl_msc + win32_interval, ++ 0, 0, &g_wgl_ust, &g_wgl_msc, &g_wgl_sbc); ++ wglSwapBuffersMscOML(win32_hdc, 0, 0, 0); ++ } ++ else ++ wglSwapBuffersMscOML(win32_hdc, 0, g_wgl_divisor, g_wgl_remainder); ++ } ++ else ++ SwapBuffers(win32_hdc); + #endif + break; + +@@ -439,11 +508,35 @@ static void *gfx_ctx_wgl_init(video_frame_info_t video_info, void *video_driver) + win32_monitor_init(); + + wndclass.lpfnWndProc = WndProcGL; ++ g_wgl_swap_mode = 0; + if (!win32_window_init(&wndclass, true, NULL)) + return NULL; + + switch (win32_api) + { ++ case GFX_CTX_OPENGL_API: ++ RARCH_LOG("Testing if extension WGL_OML_sync_control is available...\n"); ++ wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); ++ ++ if (wgl_has_extension(win32_hdc, "WGL_OML_sync_control")) ++ { ++ RARCH_LOG("WGL_OML_sync_control supported, using better swap control method...\n"); ++ ++ g_wgl_swap_mode = 1; ++ wglGetSyncValuesOML = (PFNWGLGETSYNCVALUESOMLPROC) ++ wglGetProcAddress("wglGetSyncValuesOML"); ++ wglGetMscRateOML = (PFNWGLGETMSCRATEOMLPROC) ++ wglGetProcAddress("wglGetMscRateOML"); ++ wglSwapBuffersMscOML = (PFNWGLSWAPBUFFERSMSCOMLPROC) ++ wglGetProcAddress("wglSwapBuffersMscOML"); ++ wglWaitForMscOML = (PFNWGLWAITFORMSCOMLPROC) ++ wglGetProcAddress("wglWaitForMscOML"); ++ wglWaitForSbcOML = (PFNWGLWAITFORSBCOMLPROC) ++ wglGetProcAddress("wglWaitForSbcOML"); ++ ++ wglGetSyncValuesOML(win32_hdc, &g_wgl_ust, &g_wgl_msc, &g_wgl_sbc); ++ } ++ break; + case GFX_CTX_VULKAN_API: + #ifdef HAVE_VULKAN + if (!vulkan_context_init(&win32_vk, VULKAN_WSI_WIN32)) +@@ -522,6 +615,13 @@ static void gfx_ctx_wgl_destroy(void *data) + win32_major = 0; + win32_minor = 0; + p_swap_interval = NULL; ++ ++ g_wgl_swap_mode = 0; ++ g_wgl_divisor = 0; ++ g_wgl_remainder = 0; ++ g_wgl_ust = 0; ++ g_wgl_msc = 0; ++ g_wgl_sbc = 0; + } + + static bool gfx_ctx_wgl_set_video_mode(void *data, +diff --git a/menu/menu_event.c b/menu/menu_event.c +index cf14f68..f1ac44e 100644 +--- a/menu/menu_event.c ++++ b/menu/menu_event.c +@@ -102,7 +102,7 @@ void menu_event_kb_set(bool down, enum retro_key key) + unsigned i; + + for (i = 0; i < RETROK_LAST; i++) +- menu_event_kb_set_internal(i, (menu_event_kb_is_set(i) & 1) << 1); ++ menu_event_kb_set_internal(i, (menu_event_kb_is_set((enum retro_key)i) & 1) << 1); + } + else + menu_event_kb_set_internal(key, ((menu_event_kb_is_set(key) & 1) << 1) | down); diff --git a/menu/menu_event.c b/menu/menu_event.c index cf14f68423..f1ac44e807 100644 --- a/menu/menu_event.c +++ b/menu/menu_event.c @@ -102,7 +102,7 @@ void menu_event_kb_set(bool down, enum retro_key key) unsigned i; for (i = 0; i < RETROK_LAST; i++) - menu_event_kb_set_internal(i, (menu_event_kb_is_set(i) & 1) << 1); + menu_event_kb_set_internal(i, (menu_event_kb_is_set((enum retro_key)i) & 1) << 1); } else menu_event_kb_set_internal(key, ((menu_event_kb_is_set(key) & 1) << 1) | down); From 33863714abbb58340b458bf16106c6a63314abc6 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 14 Jan 2017 15:42:24 -0500 Subject: [PATCH 006/427] speed this up a bit --- gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h b/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h index 9a4e027e0e..1b2cec02d2 100644 --- a/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h +++ b/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h @@ -6,7 +6,7 @@ static const char* stock_fragment_xmb_bokeh = GLSL( void main(void) { - float tim = time * 2.4; + float speed = time * 4; vec2 uv = -1.0 + 2.0 * gl_FragCoord.xy / OutputSize.xy; uv.x *= OutputSize.x / OutputSize.y; vec3 color = vec3(0.0); @@ -17,11 +17,11 @@ static const char* stock_fragment_xmb_bokeh = GLSL( float siz = pow(sin(float(i) * 651.74 + 5.0) * 0.5 + 0.5, 4.0); float pox = sin(float(i) * 321.55 + 4.1) * OutputSize.x / OutputSize.y; float rad = 0.1 + 0.5 * siz + sin(pha + siz) / 4.0; - vec2 pos = vec2(pox + sin(time / 15. + pha + siz), - 1.0 - rad + (2.0 + 2.0 * rad) * fract(pha + 0.3 * (time / 7.) * (0.2 + 0.8 * siz))); + vec2 pos = vec2(pox + sin(speed / 15. + pha + siz), - 1.0 - rad + (2.0 + 2.0 * rad) * fract(pha + 0.3 * (speed / 7.) * (0.2 + 0.8 * siz))); float dis = length(uv - pos); if(dis < rad) { - vec3 col = mix(vec3(0.194 * sin(time / 6.0) + 0.3, 0.2, 0.3 * pha), vec3(1.1 * sin(time / 9.0) + 0.3, 0.2 * pha, 0.4), 0.5 + 0.5 * sin(float(i))); + vec3 col = mix(vec3(0.194 * sin(speed / 6.0) + 0.3, 0.2, 0.3 * pha), vec3(1.1 * sin(speed / 9.0) + 0.3, 0.2 * pha, 0.4), 0.5 + 0.5 * sin(float(i))); color += col.zyx * (1.0 - smoothstep(rad * 0.15, rad, dis)); } } From 69ebda74c4bd39e448609e6148f22ae71df05384 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 14 Jan 2017 22:48:02 +0100 Subject: [PATCH 007/427] FIx shader --- gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h b/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h index 1b2cec02d2..4bba0f339c 100644 --- a/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h +++ b/gfx/drivers/gl_shaders/pipeline_bokeh.glsl.frag.h @@ -6,7 +6,7 @@ static const char* stock_fragment_xmb_bokeh = GLSL( void main(void) { - float speed = time * 4; + float speed = time * 4.0; vec2 uv = -1.0 + 2.0 * gl_FragCoord.xy / OutputSize.xy; uv.x *= OutputSize.x / OutputSize.y; vec3 color = vec3(0.0); From 1a12381bfc678045589317c4408ec1d877045ea1 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Sun, 15 Jan 2017 16:47:27 +0100 Subject: [PATCH 008/427] Close #4419 --- qb/config.libs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index b09ab7c8b1..06298da402 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -27,6 +27,9 @@ elif [ "$OS" = 'Win32' ]; then SOCKETLIB=-lws2_32 SOCKETHEADER="#include " DYLIB= +elif [ "$OS" = 'Cygwin' ]; then + echo "Error: Cygwin is not a supported platform. See https://bot.libretro.com/docs/compilation/windows/" + exit 1 fi add_define_make DYLIB_LIB "$DYLIB" From e9e7878b5c9a08cbd76770779d166c4fe23e424e Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sun, 15 Jan 2017 10:59:25 -0500 Subject: [PATCH 009/427] netplay_buf should use O_NOSIGNAL to avoid SIGPIPE --- network/netplay/netplay_buf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network/netplay/netplay_buf.c b/network/netplay/netplay_buf.c index a08413f110..30e4c24b14 100644 --- a/network/netplay/netplay_buf.c +++ b/network/netplay/netplay_buf.c @@ -186,14 +186,14 @@ bool netplay_send_flush(struct socket_buffer *sbuf, int sockfd, bool block) /* Usual case: Everything's in order */ if (block) { - if (!socket_send_all_blocking(sockfd, sbuf->data + sbuf->start, buf_used(sbuf), false)) + if (!socket_send_all_blocking(sockfd, sbuf->data + sbuf->start, buf_used(sbuf), true)) return false; sbuf->start = sbuf->end = 0; } else { - sent = socket_send_all_nonblocking(sockfd, sbuf->data + sbuf->start, buf_used(sbuf), false); + sent = socket_send_all_nonblocking(sockfd, sbuf->data + sbuf->start, buf_used(sbuf), true); if (sent < 0) return false; sbuf->start += sent; @@ -209,7 +209,7 @@ bool netplay_send_flush(struct socket_buffer *sbuf, int sockfd, bool block) /* Unusual case: Buffer overlaps break */ if (block) { - if (!socket_send_all_blocking(sockfd, sbuf->data + sbuf->start, sbuf->bufsz - sbuf->start, false)) + if (!socket_send_all_blocking(sockfd, sbuf->data + sbuf->start, sbuf->bufsz - sbuf->start, true)) return false; sbuf->start = 0; return netplay_send_flush(sbuf, sockfd, true); @@ -217,7 +217,7 @@ bool netplay_send_flush(struct socket_buffer *sbuf, int sockfd, bool block) } else { - sent = socket_send_all_nonblocking(sockfd, sbuf->data + sbuf->start, sbuf->bufsz - sbuf->start, false); + sent = socket_send_all_nonblocking(sockfd, sbuf->data + sbuf->start, sbuf->bufsz - sbuf->start, true); if (sent < 0) return false; sbuf->start += sent; From 4f352227ea3c3ad49c23d255f2c23c7c19449aeb Mon Sep 17 00:00:00 2001 From: John Regan Date: Sun, 15 Jan 2017 12:03:28 -0600 Subject: [PATCH 010/427] OSX Joypad Improvements This commit has two main changes to the OSX HID driver: 1. Some joysticks have invalid/incorrect 'use' assigned to buttons and axes. For example, my RetroUSB.com Genesis Retroport reports 8 buttons, but they're reported as 1, 2, 3, 4, 1, 2, 3, 4, and my RetroLink Gamecube-clone controller reports 2 axes with id 50. OSX assigns each of these elements a unique cookie value, so it's still possible to uniquely identify a button. Whenever a controller is connected, the driver scans for all buttons and axes. When it identifies a duplicate 'use' id, it reassigns it a new ID. Whenever the input callback is called, it grabs the cookie value, finds the input element with a matching cookie, and uses that element's id instead of the one reported by the device. The old joystick configs should not be broken by this - I'm using the existing 'use' value wherever possible, and only changing it when it's broken. The 'faked' ids are done in a deterministic way, a joystick will never have a button's 'faked' id change between launches of RetroArch. 2. This enables HAT switch input. --- input/drivers_hid/iohidmanager_hid.c | 400 +++++++++++++++++++++++++-- 1 file changed, 373 insertions(+), 27 deletions(-) diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index 356c026457..8cc5f06f92 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -31,12 +31,20 @@ #include "../../tasks/tasks_internal.h" #include "../../verbosity.h" +typedef struct apple_input_rec +{ + IOHIDElementCookie cookie; + uint32_t id; + struct apple_input_rec *next; +} apple_input_rec_t; + typedef struct apple_hid { IOHIDManagerRef ptr; joypad_connection_t *slots; uint32_t buttons[MAX_USERS]; int16_t axes[MAX_USERS][6]; + int8_t hats[MAX_USERS][2]; /* MacOS only supports 1 hat AFAICT */ } iohidmanager_hid_t; struct iohidmanager_hid_adapter @@ -44,9 +52,53 @@ struct iohidmanager_hid_adapter uint32_t slot; IOHIDDeviceRef handle; char name[PATH_MAX_LENGTH]; + apple_input_rec_t *axes; + apple_input_rec_t *hats; + apple_input_rec_t *buttons; uint8_t data[2048]; }; +CFComparisonResult iohidmanager_sort_elements(const void *val1, const void *val2, void *context) +{ + uint32_t page1 = IOHIDElementGetUsagePage((IOHIDElementRef)val1); + uint32_t page2 = IOHIDElementGetUsagePage((IOHIDElementRef)val2); + uint32_t use1 = IOHIDElementGetUsage((IOHIDElementRef)val1); + uint32_t use2 = IOHIDElementGetUsage((IOHIDElementRef)val2); + uint32_t cookie1 = IOHIDElementGetCookie((IOHIDElementRef)val1); + uint32_t cookie2 = IOHIDElementGetCookie((IOHIDElementRef)val2); + + if(page1 != page2) + { + return page1 > page2; + } + + if(use1 != use2) + { + return use1 > use2; + } + + return cookie1 > cookie2; +} + +static bool iohidmanager_check_for_id(apple_input_rec_t *rec, uint32_t id) +{ + while(rec) { + if(rec->id == id) return true; + rec = rec->next; + } + return false; +} + +static void iohidmanager_append_record(apple_input_rec_t *rec, apple_input_rec_t *new) +{ + apple_input_rec_t *tmp = rec; + while(tmp->next) + { + tmp = tmp->next; + } + tmp->next = new; +} + static bool iohidmanager_hid_joypad_query(void *data, unsigned pad) { return pad < MAX_USERS; @@ -75,10 +127,28 @@ static bool iohidmanager_hid_joypad_button(void *data, uint64_t buttons = iohidmanager_hid_joypad_get_buttons(data, port); iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; + unsigned h = GET_HAT(joykey); + unsigned hat_dir = GET_HAT_DIR(joykey); /* Check hat. */ - if (GET_HAT_DIR(joykey)) - return false; + if (hat_dir) + { + if(h >= 1) { + return false; + } + switch(hat_dir) + { + case HAT_LEFT_MASK: + return hid->hats[port][0] < 0; + case HAT_RIGHT_MASK: + return hid->hats[port][0] > 0; + case HAT_UP_MASK: + return hid->hats[port][1] < 0; + case HAT_DOWN_MASK: + return hid->hats[port][1] > 0; + } + return 0; + } /* Check the button. */ if ((port < MAX_USERS) && (joykey < 32)) @@ -166,6 +236,8 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, uint32_t type = IOHIDElementGetType(element); uint32_t page = IOHIDElementGetUsagePage(element); uint32_t use = IOHIDElementGetUsage(element); + uint32_t cookie = IOHIDElementGetCookie(element); + apple_input_rec_t *tmp = NULL; if (type != kIOHIDElementTypeInput_Misc) if (type != kIOHIDElementTypeInput_Button) @@ -184,32 +256,86 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, switch (use) { case kHIDUsage_GD_Hatswitch: - break; + { + tmp = adapter->hats; + while(tmp && tmp->cookie != cookie) + { + tmp = tmp->next; + } + if(tmp->cookie == cookie) + { + CFIndex range = IOHIDElementGetLogicalMax(element) - IOHIDElementGetLogicalMin(element); + CFIndex val = IOHIDValueGetIntegerValue(value); + if(range == 3) + { + val *= 2; + } + switch(val) + { + case 0: + /* pos = up */ + hid->hats[adapter->slot][0] = 0; + hid->hats[adapter->slot][1] = -1; + break; + case 1: + /* pos = up+right */ + hid->hats[adapter->slot][0] = 1; + hid->hats[adapter->slot][1] = -1; + break; + case 2: + /* pos = right */ + hid->hats[adapter->slot][0] = 1; + hid->hats[adapter->slot][1] = 0; + break; + case 3: + /* pos = down+right */ + hid->hats[adapter->slot][0] = 1; + hid->hats[adapter->slot][1] = 1; + break; + case 4: + /* pos = down */ + hid->hats[adapter->slot][0] = 0; + hid->hats[adapter->slot][1] = 1; + break; + case 5: + /* pos = down+left */ + hid->hats[adapter->slot][0] = -1; + hid->hats[adapter->slot][1] = 1; + break; + case 6: + /* pos = left */ + hid->hats[adapter->slot][0] = -1; + hid->hats[adapter->slot][1] = 0; + break; + case 7: + /* pos = up_left */ + hid->hats[adapter->slot][0] = -1; + hid->hats[adapter->slot][1] = -1; + break; + default: + /* pos = centered */ + hid->hats[adapter->slot][0] = 0; + hid->hats[adapter->slot][1] = 0; + break; + } + } + } + break; default: { - int i; - static const uint32_t axis_use_ids[6] = - { 48, 49, 51, 52, 50, 53 }; - - /* +0/-0 => Left Stick Horizontal => 48 - * +1/-1 => Left Stick Vertical => 49 - * +2/-2 => Right Stick Horizontal => 51 - * +3/-3 => Right Stick Vertical => 52 - * +4/-4 => Left Trigger (if exists) => 50 - * +5/-5 => Right Trigger (if exists) => 53 - */ - - for (i = 0; i < 6; i ++) + tmp = adapter->axes; + while(tmp && tmp->cookie != cookie) + { + tmp = tmp->next; + } + if(tmp->cookie == cookie) { CFIndex min = IOHIDElementGetPhysicalMin(element); CFIndex state = IOHIDValueGetIntegerValue(value) - min; CFIndex max = IOHIDElementGetPhysicalMax(element) - min; float val = (float)state / (float)max; - if (use != axis_use_ids[i]) - continue; - - hid->axes[adapter->slot][i] = + hid->axes[adapter->slot][tmp->id] = ((val * 2.0f) - 1.0f) * 32767.0f; } } @@ -223,13 +349,20 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, { case kIOHIDElementTypeInput_Button: { - CFIndex state = IOHIDValueGetIntegerValue(value); - unsigned id = use - 1; + tmp = adapter->buttons; + while(tmp && tmp->cookie != cookie) + { + tmp = tmp->next; + } + if(tmp->cookie == cookie) + { + CFIndex state = IOHIDValueGetIntegerValue(value); - if (state) - BIT64_SET(hid->buttons[adapter->slot], id); - else - BIT64_CLEAR(hid->buttons[adapter->slot], id); + if (state) + BIT64_SET(hid->buttons[adapter->slot], tmp->id); + else + BIT64_CLEAR(hid->buttons[adapter->slot], tmp->id); + } } break; } @@ -256,7 +389,28 @@ static void iohidmanager_hid_device_remove(void *data, } if (adapter) + { + struct apple_input_rec_t* tmp; + while(adapter->hats != NULL) + { + tmp = adapter->hats; + adapter->hats = adapter->hats->next; + free(tmp); + } + while(adapter->axes != NULL) + { + tmp = adapter->axes; + adapter->axes = adapter->axes->next; + free(tmp); + } + while(adapter->buttons != NULL) + { + tmp = adapter->buttons; + adapter->buttons = adapter->buttons->next; + free(tmp); + } free(adapter); + } } static int32_t iohidmanager_hid_device_get_int_property( @@ -367,13 +521,205 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, if (string_is_empty(adapter->name)) goto error; + /* scan for buttons, axis, hats */ + CFArrayRef elements_raw = IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone); + int count = (int)CFArrayGetCount(elements_raw); + CFMutableArrayRef elements = CFArrayCreateMutableCopy(kCFAllocatorDefault,(CFIndex)count,elements_raw); + CFRange range = CFRangeMake(0,count); + CFArraySortValues(elements,range,iohidmanager_sort_elements,NULL); + int i; + bool found_axis[6] = + { false, false, false, false, false, false }; + + apple_input_rec_t *tmpButtons = NULL; + apple_input_rec_t *tmpAxes = NULL; + + for(i=0; iid = 0; + hat->cookie = cookie; + hat->next = NULL; + adapter->hats = hat; + } + break; + default: + { + uint32_t i = 0; + static const uint32_t axis_use_ids[6] = + { 48, 49, 51, 52, 50, 53 }; + + while(axis_use_ids[i] != use) + { + i++; + } + + if (i < 6) + { + + apple_input_rec_t *axis = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); + axis->id = i; + axis->cookie = cookie; + axis->next = NULL; + + if(iohidmanager_check_for_id(adapter->axes,i)) + { + /* axis ID already exists, save to tmp for appending later */ + if(tmpAxes == NULL) + { + tmpAxes = axis; + } + else + { + iohidmanager_append_record(tmpAxes,axis); + } + } + else + { + found_axis[axis->id] = true; + if(adapter->axes == NULL) + { + adapter->axes = axis; + } + else + { + iohidmanager_append_record(adapter->axes,axis); + } + } + } + } + break; + } + break; + } + break; + case kHIDPage_Button: + switch (type) + { + case kIOHIDElementTypeInput_Button: + { + apple_input_rec_t *btn = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); + btn->id = use - 1; + btn->cookie = cookie; + btn->next = NULL; + if(iohidmanager_check_for_id(adapter->buttons,btn->id)) + { + if(tmpButtons == NULL) + { + tmpButtons = btn; + } + else + { + iohidmanager_append_record(tmpButtons,btn); + } + } + else + { + if(adapter->buttons == NULL) + { + adapter->buttons = btn; + } + else + { + iohidmanager_append_record(adapter->buttons,btn); + } + } + } + break; + } + break; + } + } + + /* take care of buttons/axes with duplicate 'use' values */ + for(i=0; i<6; i++) + { + if(found_axis[i] == false && tmpAxes) + { + apple_input_rec_t *next = tmpAxes->next; + tmpAxes->id = i; + tmpAxes->next = NULL; + iohidmanager_append_record(adapter->axes, tmpAxes); + tmpAxes = next; + } + } + + apple_input_rec_t *tmp = adapter->buttons; + while(tmp->next) + { + tmp = tmp->next; + } + + while(tmpButtons) + { + apple_input_rec_t *next = tmpButtons->next; + + tmpButtons->id = tmp->id + 1; + tmpButtons->next = NULL; + tmp->next = tmpButtons; + + tmp = tmp->next; + tmpButtons = next; + } + + iohidmanager_hid_device_add_autodetect(adapter->slot, adapter->name, iohidmanager_hid.ident, dev_vid, dev_pid); return; error: - free(adapter); + { + struct apple_input_rec_t *tmp = NULL; + while(adapter->hats != NULL) + { + tmp = adapter->hats; + adapter->hats = adapter->hats->next; + free(tmp); + } + while(adapter->axes != NULL) + { + tmp = adapter->axes; + adapter->axes = adapter->axes->next; + free(tmp); + } + while(adapter->buttons != NULL) + { + tmp = adapter->buttons; + adapter->buttons = adapter->buttons->next; + free(tmp); + } + while(tmpAxes != NULL) + { + tmp = tmpAxes; + tmpAxes = tmpAxes->next; + free(tmp); + } + while(tmpButtons != NULL) + { + tmp = tmpButtons; + tmpButtons = tmpButtons->next; + free(tmp); + } + free(adapter); + } } static void iohidmanager_hid_append_matching_dictionary( From 15e8930604bfd43506b48eddc8b01a9c11ade469 Mon Sep 17 00:00:00 2001 From: Ashura Date: Sun, 15 Jan 2017 20:25:04 +0100 Subject: [PATCH 011/427] Add german translation to help menue --- intl/msg_hash_de.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index bfe26dcc79..a62d3ef868 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -198,6 +198,20 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_FRONTEND_COUNTERS, "Frontendzähler") MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP, "Hilfe") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, + "Audio/Video Fehlerbehebung") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, + "Ändere das Virtual Gamepad Overlay") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_CONTROLS, + "Grundlegende Menüsteuerung") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_LIST, + "Hilfe") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, + "Inhalte laden") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT, + "Nach Inhalten suchen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_HELP_WHAT_IS_A_CORE, + "Was ist ein Core?") MSG_HASH(MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, "Aktiviere Verlaufsliste") MSG_HASH(MENU_ENUM_LABEL_VALUE_HISTORY_TAB, From 0b029dc8300557ff2947e8e56cae11a5d26a0ae8 Mon Sep 17 00:00:00 2001 From: Ashura Date: Sun, 15 Jan 2017 20:33:16 +0100 Subject: [PATCH 012/427] Ordered some code alphabeticaly --- intl/msg_hash_de.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index a62d3ef868..6e794b79bf 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -886,20 +886,20 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO, "Zeige Videos") MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, "Ja") +MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, + "Limit the number of entries in recent playlist for games, images, music, and videos.") +MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, + "Enable or disable recent playlist for games, images, music, and videos.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, + "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pause gameplay when window focus is lost.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") -MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, - "Enable or disable recent playlist for games, images, music, and videos.") -MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, - "Limit the number of entries in recent playlist for games, images, music, and videos.") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, - "Unified Menu Controls") -MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, - "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, + "Unified Menu Controls") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, "Browse URL" From ff9d6e1ee8f51b943958960df3e32aa6551dc6e0 Mon Sep 17 00:00:00 2001 From: Ashura Date: Sun, 15 Jan 2017 20:56:04 +0100 Subject: [PATCH 013/427] Added some more translations --- intl/msg_hash_de.c | 8 ++++++++ intl/msg_hash_de.h | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 10517b0dae..3be5492418 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -401,6 +401,14 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) case MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE: snprintf(s, len, "Erfolgsliste (Hardcore)"); break; + case MENU_ENUM_LABEL_VALUE_MENU_ENUM_CONTROLS_PROLOG: + snprintf(s, len, + "Du kannst folgende Steuerelemente mit\n" + "deinem Controller oder deiner Tastatur verwenden\n" + "um durch das Menü zu navigieren: \n" + " \n" + ); + break; case MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY: snprintf(s, len, "Ãœbergeordnetes Verzeichnis"); break; diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 6e794b79bf..1874ba7e39 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -76,6 +76,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS, "Konfigurationsdatei laden") /* FIXME/UPDATE */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS, "Konfigurations-Einstellungen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST, + "Konfigurationen") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, "Speichere Konfiguration beim Beenden") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST, @@ -886,12 +888,22 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO, "Zeige Videos") MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, "Ja") +MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, + "Verwalte und erstelle Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Limit the number of entries in recent playlist for games, images, music, and videos.") +MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, + "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Enable or disable recent playlist for games, images, music, and videos.") +MSG_HASH(MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, + "Zeigt Informationen über Core, Netzwerk, und des Systems an. Anzeigen-Manager für Datenbank und Zeiger.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") +MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, + "Hoste eine Netplay Session oder trete einer bei.") +MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, + "Lade Add-Ons, Komponenten und Inhalte für RetroArch herunter.") MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pause gameplay when window focus is lost.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, From 1544a3d6e1acef32e93b31e076e62fd1d12eb3e0 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 15 Jan 2017 21:07:15 +0100 Subject: [PATCH 014/427] (OSX) Fix warnings --- input/drivers_hid/iohidmanager_hid.c | 30 +++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index 8cc5f06f92..042ea2ceb2 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -390,7 +390,7 @@ static void iohidmanager_hid_device_remove(void *data, if (adapter) { - struct apple_input_rec_t* tmp; + apple_input_rec_t* tmp = NULL; while(adapter->hats != NULL) { tmp = adapter->hats; @@ -547,6 +547,14 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, case kHIDPage_GenericDesktop: switch (type) { + case kIOHIDElementTypeCollection: + case kIOHIDElementTypeInput_ScanCodes: + case kIOHIDElementTypeFeature: + case kIOHIDElementTypeInput_Button: + case kIOHIDElementTypeOutput: + case kIOHIDElementTypeInput_Axis: + /* TODO/FIXME */ + break; case kIOHIDElementTypeInput_Misc: switch (use) { @@ -613,6 +621,14 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, case kHIDPage_Button: switch (type) { + case kIOHIDElementTypeCollection: + case kIOHIDElementTypeFeature: + case kIOHIDElementTypeInput_ScanCodes: + case kIOHIDElementTypeInput_Misc: + case kIOHIDElementTypeInput_Axis: + case kIOHIDElementTypeOutput: + /* TODO/FIXME */ + break; case kIOHIDElementTypeInput_Button: { apple_input_rec_t *btn = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); @@ -687,34 +703,34 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, error: { - struct apple_input_rec_t *tmp = NULL; + apple_input_rec_t *tmp = NULL; while(adapter->hats != NULL) { - tmp = adapter->hats; + tmp = adapter->hats; adapter->hats = adapter->hats->next; free(tmp); } while(adapter->axes != NULL) { - tmp = adapter->axes; + tmp = adapter->axes; adapter->axes = adapter->axes->next; free(tmp); } while(adapter->buttons != NULL) { - tmp = adapter->buttons; + tmp = adapter->buttons; adapter->buttons = adapter->buttons->next; free(tmp); } while(tmpAxes != NULL) { - tmp = tmpAxes; + tmp = tmpAxes; tmpAxes = tmpAxes->next; free(tmp); } while(tmpButtons != NULL) { - tmp = tmpButtons; + tmp = tmpButtons; tmpButtons = tmpButtons->next; free(tmp); } From e3e8796b2b71c8638098ae657ba592ab97c4191e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 15 Jan 2017 21:13:01 +0100 Subject: [PATCH 015/427] (iohidmanager_hid.c) Stylistic cleanups --- input/drivers_hid/iohidmanager_hid.c | 290 +++++++++++++-------------- 1 file changed, 138 insertions(+), 152 deletions(-) diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index 042ea2ceb2..50c7559c7f 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -237,7 +237,7 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, uint32_t page = IOHIDElementGetUsagePage(element); uint32_t use = IOHIDElementGetUsage(element); uint32_t cookie = IOHIDElementGetCookie(element); - apple_input_rec_t *tmp = NULL; + apple_input_rec_t *tmp = NULL; if (type != kIOHIDElementTypeInput_Misc) if (type != kIOHIDElementTypeInput_Button) @@ -258,18 +258,18 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, case kHIDUsage_GD_Hatswitch: { tmp = adapter->hats; + while(tmp && tmp->cookie != cookie) - { tmp = tmp->next; - } + if(tmp->cookie == cookie) { CFIndex range = IOHIDElementGetLogicalMax(element) - IOHIDElementGetLogicalMin(element); - CFIndex val = IOHIDValueGetIntegerValue(value); + CFIndex val = IOHIDValueGetIntegerValue(value); + if(range == 3) - { - val *= 2; - } + val *= 2; + switch(val) { case 0: @@ -324,10 +324,10 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, default: { tmp = adapter->axes; + while(tmp && tmp->cookie != cookie) - { tmp = tmp->next; - } + if(tmp->cookie == cookie) { CFIndex min = IOHIDElementGetPhysicalMin(element); @@ -350,10 +350,10 @@ static void iohidmanager_hid_device_input_callback(void *data, IOReturn result, case kIOHIDElementTypeInput_Button: { tmp = adapter->buttons; + while(tmp && tmp->cookie != cookie) - { tmp = tmp->next; - } + if(tmp->cookie == cookie) { CFIndex state = IOHIDValueGetIntegerValue(value); @@ -393,19 +393,19 @@ static void iohidmanager_hid_device_remove(void *data, apple_input_rec_t* tmp = NULL; while(adapter->hats != NULL) { - tmp = adapter->hats; + tmp = adapter->hats; adapter->hats = adapter->hats->next; free(tmp); } while(adapter->axes != NULL) { - tmp = adapter->axes; + tmp = adapter->axes; adapter->axes = adapter->axes->next; free(tmp); } while(adapter->buttons != NULL) { - tmp = adapter->buttons; + tmp = adapter->buttons; adapter->buttons = adapter->buttons->next; free(tmp); } @@ -470,8 +470,13 @@ static void iohidmanager_hid_device_add_autodetect(unsigned idx, static void iohidmanager_hid_device_add(void *data, IOReturn result, void* sender, IOHIDDeviceRef device) { + int i; IOReturn ret; uint16_t dev_vid, dev_pid; + bool found_axis[6] = + { false, false, false, false, false, false }; + apple_input_rec_t *tmpButtons = NULL; + apple_input_rec_t *tmpAxes = NULL; iohidmanager_hid_t *hid = (iohidmanager_hid_t*) hid_driver_get_data(); struct iohidmanager_hid_adapter *adapter = (struct iohidmanager_hid_adapter*) @@ -522,146 +527,127 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, goto error; /* scan for buttons, axis, hats */ - CFArrayRef elements_raw = IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone); - int count = (int)CFArrayGetCount(elements_raw); + CFArrayRef elements_raw = IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone); + int count = (int)CFArrayGetCount(elements_raw); CFMutableArrayRef elements = CFArrayCreateMutableCopy(kCFAllocatorDefault,(CFIndex)count,elements_raw); - CFRange range = CFRangeMake(0,count); + CFRange range = CFRangeMake(0,count); CFArraySortValues(elements,range,iohidmanager_sort_elements,NULL); - int i; - bool found_axis[6] = - { false, false, false, false, false, false }; - apple_input_rec_t *tmpButtons = NULL; - apple_input_rec_t *tmpAxes = NULL; + for(i=0; iid = 0; - hat->cookie = cookie; - hat->next = NULL; - adapter->hats = hat; - } - break; - default: - { - uint32_t i = 0; - static const uint32_t axis_use_ids[6] = - { 48, 49, 51, 52, 50, 53 }; + IOHIDElementType type = IOHIDElementGetType(element); + uint32_t page = IOHIDElementGetUsagePage(element); + uint32_t use = IOHIDElementGetUsage(element); + uint32_t cookie = IOHIDElementGetCookie(element); - while(axis_use_ids[i] != use) - { - i++; - } + switch (page) + { + case kHIDPage_GenericDesktop: + switch (type) + { + case kIOHIDElementTypeCollection: + case kIOHIDElementTypeInput_ScanCodes: + case kIOHIDElementTypeFeature: + case kIOHIDElementTypeInput_Button: + case kIOHIDElementTypeOutput: + case kIOHIDElementTypeInput_Axis: + /* TODO/FIXME */ + break; + case kIOHIDElementTypeInput_Misc: + switch (use) + { + case kHIDUsage_GD_Hatswitch: + { + /* as far as I can tell, OSX only reports one Hat */ + apple_input_rec_t *hat = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); + hat->id = 0; + hat->cookie = cookie; + hat->next = NULL; + adapter->hats = hat; + } + break; + default: + { + uint32_t i = 0; + static const uint32_t axis_use_ids[6] = + { 48, 49, 51, 52, 50, 53 }; - if (i < 6) - { + while(axis_use_ids[i] != use) + i++; - apple_input_rec_t *axis = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); - axis->id = i; - axis->cookie = cookie; - axis->next = NULL; + if (i < 6) + { - if(iohidmanager_check_for_id(adapter->axes,i)) - { - /* axis ID already exists, save to tmp for appending later */ - if(tmpAxes == NULL) - { - tmpAxes = axis; - } - else - { - iohidmanager_append_record(tmpAxes,axis); - } - } - else - { - found_axis[axis->id] = true; - if(adapter->axes == NULL) - { - adapter->axes = axis; - } - else - { - iohidmanager_append_record(adapter->axes,axis); - } - } - } - } - break; - } - break; - } - break; - case kHIDPage_Button: - switch (type) - { - case kIOHIDElementTypeCollection: - case kIOHIDElementTypeFeature: - case kIOHIDElementTypeInput_ScanCodes: - case kIOHIDElementTypeInput_Misc: - case kIOHIDElementTypeInput_Axis: - case kIOHIDElementTypeOutput: - /* TODO/FIXME */ - break; - case kIOHIDElementTypeInput_Button: - { - apple_input_rec_t *btn = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); - btn->id = use - 1; - btn->cookie = cookie; - btn->next = NULL; - if(iohidmanager_check_for_id(adapter->buttons,btn->id)) - { - if(tmpButtons == NULL) - { - tmpButtons = btn; - } - else - { - iohidmanager_append_record(tmpButtons,btn); - } - } - else - { - if(adapter->buttons == NULL) - { - adapter->buttons = btn; - } - else - { - iohidmanager_append_record(adapter->buttons,btn); - } - } - } - break; - } - break; - } + apple_input_rec_t *axis = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); + axis->id = i; + axis->cookie = cookie; + axis->next = NULL; + + if(iohidmanager_check_for_id(adapter->axes,i)) + { + /* axis ID already exists, save to tmp for appending later */ + if(tmpAxes) + iohidmanager_append_record(tmpAxes,axis); + else + tmpAxes = axis; + } + else + { + found_axis[axis->id] = true; + if(adapter->axes) + iohidmanager_append_record(adapter->axes,axis); + else + adapter->axes = axis; + } + } + } + break; + } + break; + } + break; + case kHIDPage_Button: + switch (type) + { + case kIOHIDElementTypeCollection: + case kIOHIDElementTypeFeature: + case kIOHIDElementTypeInput_ScanCodes: + case kIOHIDElementTypeInput_Misc: + case kIOHIDElementTypeInput_Axis: + case kIOHIDElementTypeOutput: + /* TODO/FIXME */ + break; + case kIOHIDElementTypeInput_Button: + { + apple_input_rec_t *btn = (apple_input_rec_t *)malloc(sizeof(apple_input_rec_t)); + btn->id = use - 1; + btn->cookie = cookie; + btn->next = NULL; + + if(iohidmanager_check_for_id(adapter->buttons,btn->id)) + { + if(tmpButtons) + iohidmanager_append_record(tmpButtons,btn); + else + tmpButtons = btn; + } + else + { + if(adapter->buttons) + iohidmanager_append_record(adapter->buttons,btn); + else + adapter->buttons = btn; + } + } + break; + } + break; + } } /* take care of buttons/axes with duplicate 'use' values */ @@ -670,8 +656,8 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, if(found_axis[i] == false && tmpAxes) { apple_input_rec_t *next = tmpAxes->next; - tmpAxes->id = i; - tmpAxes->next = NULL; + tmpAxes->id = i; + tmpAxes->next = NULL; iohidmanager_append_record(adapter->axes, tmpAxes); tmpAxes = next; } @@ -687,12 +673,12 @@ static void iohidmanager_hid_device_add(void *data, IOReturn result, { apple_input_rec_t *next = tmpButtons->next; - tmpButtons->id = tmp->id + 1; - tmpButtons->next = NULL; - tmp->next = tmpButtons; + tmpButtons->id = tmp->id + 1; + tmpButtons->next = NULL; + tmp->next = tmpButtons; - tmp = tmp->next; - tmpButtons = next; + tmp = tmp->next; + tmpButtons = next; } From 4a9ca6638970ec3c628affb045f2af19ac687872 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 15 Jan 2017 23:58:14 +0100 Subject: [PATCH 016/427] (WGL) Check if settings struct is non-NULL --- gfx/drivers_context/wgl_ctx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index fc6132dbe2..00421c303b 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -562,7 +562,7 @@ static void gfx_ctx_wgl_input_driver(void *data, const input_driver_t **input, void **input_data) { settings_t *settings = config_get_ptr(); - dinput_wgl = input_dinput.init(settings->input.joypad_driver); + dinput_wgl = input_dinput.init(settings ? settings->input.joypad_driver : NULL); *input = dinput_wgl ? &input_dinput : NULL; *input_data = dinput_wgl; From a0f236a83f9e1357e53b610f66b40326e1ae5043 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sun, 15 Jan 2017 18:10:24 -0500 Subject: [PATCH 017/427] Use autosave_lock and autosave_unlock during SRAM negotiation The SRAM transfer in netplay handshake now uses autosave_lock and autosave_unlock. Will possibly fix a hang/crash bug on Android with netplay and autosave conflicting. --- network/netplay/netplay_handshake.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index cc714db5da..79f7dded10 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -25,6 +25,7 @@ #include "netplay_private.h" +#include "../../autosave.h" #include "../../configuration.h" #include "../../content.h" #include "../../retroarch.h" @@ -508,8 +509,10 @@ bool netplay_handshake_sync(netplay_t *netplay, struct netplay_connection *conne int matchct; bool nick_matched; + autosave_lock(); mem_info.id = RETRO_MEMORY_SAVE_RAM; core_get_memory(&mem_info); + autosave_unlock(); /* Send basic sync info */ cmd[0] = htonl(NETPLAY_CMD_SYNC); @@ -578,11 +581,16 @@ bool netplay_handshake_sync(netplay_t *netplay, struct netplay_connection *conne return false; /* And finally, the SRAM */ + autosave_lock(); if (!netplay_send(&connection->send_packet_buffer, connection->fd, mem_info.data, mem_info.size) || !netplay_send_flush(&connection->send_packet_buffer, connection->fd, false)) + { + autosave_unlock(); return false; + } + autosave_unlock(); /* Now we're ready! */ connection->mode = NETPLAY_CONNECTION_SPECTATING; @@ -938,6 +946,7 @@ bool netplay_handshake_pre_sync(netplay_t *netplay, } /* Now check the SRAM */ + autosave_lock(); mem_info.id = RETRO_MEMORY_SAVE_RAM; core_get_memory(&mem_info); @@ -951,6 +960,7 @@ bool netplay_handshake_pre_sync(netplay_t *netplay, { RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_RECEIVE_SRAM_DATA_FROM_HOST)); + autosave_unlock(); return false; } @@ -965,6 +975,7 @@ bool netplay_handshake_pre_sync(netplay_t *netplay, { RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_RECEIVE_SRAM_DATA_FROM_HOST)); + autosave_unlock(); return false; } if (remote_sram_size > sizeof(uint32_t)) @@ -974,6 +985,7 @@ bool netplay_handshake_pre_sync(netplay_t *netplay, } } + autosave_unlock(); /* We're ready! */ *had_input = true; From 666534cc74c0e61dd4d5aff5170d58a36bc9a698 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 00:13:57 +0100 Subject: [PATCH 018/427] Grab settings pointer only once inside wrapper 'input_driver' function --- gfx/drivers_context/android_ctx.c | 5 ++--- gfx/drivers_context/cgl_ctx.c | 4 +++- gfx/drivers_context/cocoa_gl_ctx.m | 7 ++++--- gfx/drivers_context/d3d_ctx.cpp | 7 +++---- gfx/drivers_context/drm_ctx.c | 4 ++-- gfx/drivers_context/emscriptenegl_ctx.c | 19 +++++++++---------- gfx/drivers_context/gfx_null_ctx.c | 4 +++- gfx/drivers_context/khr_display_ctx.c | 4 ++-- gfx/drivers_context/mali_fbdev_ctx.c | 4 ++-- gfx/drivers_context/opendingux_fbdev_ctx.c | 4 ++-- gfx/drivers_context/osmesa_ctx.c | 5 +++-- gfx/drivers_context/ps3_ctx.c | 4 ++-- gfx/drivers_context/qnx_ctx.c | 4 ++-- gfx/drivers_context/sdl_gl_ctx.c | 7 ++++--- gfx/drivers_context/vc_egl_ctx.c | 4 ++-- gfx/drivers_context/vivante_fbdev_ctx.c | 4 ++-- gfx/drivers_context/wayland_ctx.c | 15 ++++++++++----- gfx/drivers_context/wgl_ctx.cpp | 4 ++-- gfx/drivers_context/x_ctx.c | 8 ++------ gfx/drivers_context/xegl_ctx.c | 9 +++------ gfx/video_context_driver.c | 6 +++++- gfx/video_context_driver.h | 2 +- 22 files changed, 70 insertions(+), 64 deletions(-) diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 5c84cf1d7c..43afdc2d59 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -38,7 +38,6 @@ #include "../../frontend/drivers/platform_linux.h" -#include "../../configuration.h" #include "../../runloop.h" static enum gfx_ctx_api android_api = GFX_CTX_NONE; @@ -366,10 +365,10 @@ static bool android_gfx_ctx_set_video_mode(void *data, } static void android_gfx_ctx_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); - void *androidinput = input_android.init(settings->input.joypad_driver); + void *androidinput = input_android.init(joypad_name); *input = androidinput ? &input_android : NULL; *input_data = androidinput; diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 60f1dfe2b1..b5412a189f 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -154,7 +154,9 @@ static void gfx_ctx_cgl_destroy(void *data) free(cgl); } -static void gfx_ctx_cgl_input_driver(void *data, const input_driver_t **input, void **input_data) +static void gfx_ctx_cgl_input_driver(void *data, + const char *name, + const input_driver_t **input, void **input_data) { (void)data; (void)input; diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index cf18281938..566869809a 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -588,10 +588,11 @@ static bool cocoagl_gfx_ctx_set_resize(void *data, unsigned width, unsigned heig return false; } -static void cocoagl_gfx_ctx_input_driver(void *data, const input_driver_t **input, void **input_data) +static void cocoagl_gfx_ctx_input_driver(void *data, + const char *name, + const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index ab1d5b4682..0fb31ad377 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -29,7 +29,6 @@ #include "../drivers/d3d.h" #include "../common/win32_common.h" -#include "../../configuration.h" #include "../../runloop.h" #include "../../verbosity.h" #include "../../ui/ui_companion_driver.h" @@ -182,15 +181,15 @@ static void gfx_ctx_d3d_destroy(void *data) } static void gfx_ctx_d3d_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); #ifdef _XBOX - void *xinput = input_xinput.init(settings->input.joypad_driver); + void *xinput = input_xinput.init(joypad_name); *input = xinput ? (const input_driver_t*)&input_xinput : NULL; *input_data = xinput; #else - dinput = input_dinput.init(settings->input.joypad_driver); + dinput = input_dinput.init(joypad_name); *input = dinput ? &input_dinput : NULL; *input_data = dinput; #endif diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index d2a4b3c282..b8738d3165 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -746,10 +746,10 @@ static void gfx_ctx_drm_destroy(void *data) } static void gfx_ctx_drm_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 4a9d9735cd..1b750a3689 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -222,23 +222,22 @@ static bool gfx_ctx_emscripten_bind_api(void *data, static void gfx_ctx_emscripten_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; + void *rwebinput = NULL; - *input = NULL; - *input_data = NULL; + *input = NULL; + *input_data = NULL; #ifndef HAVE_SDL2 - { - void *rwebinput = input_rwebinput.init(); + rwebinput = input_rwebinput.init(); - if (!rwebinput) - return; + if (!rwebinput) + return; - *input = &input_rwebinput; - *input_data = rwebinput; - } + *input = &input_rwebinput; + *input_data = rwebinput; #endif } diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 36078d774a..f4cf4f63d5 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -79,7 +79,9 @@ static void gfx_ctx_null_destroy(void *data) (void)data; } -static void gfx_ctx_null_input_driver(void *data, const input_driver_t **input, void **input_data) +static void gfx_ctx_null_input_driver(void *data, + const char *name, + const input_driver_t **input, void **input_data) { (void)data; (void)input; diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index ced55e6b33..80276bae10 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -155,10 +155,10 @@ error: } static void gfx_ctx_khr_display_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 475ba08255..de76f06aea 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -226,10 +226,10 @@ error: } static void gfx_ctx_mali_fbdev_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 141b3ad54f..bab164cadc 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -199,10 +199,10 @@ error: } static void gfx_ctx_opendingux_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index 24caa0ab61..f6899ece1b 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -372,9 +372,10 @@ static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t video_info) #endif } -static void osmesa_ctx_input_driver(void *data, const input_driver_t **input, void **input_data) +static void osmesa_ctx_input_driver(void *data, + const char *name, + const input_driver_t **input, void **input_data) { - (void)data; *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 5a63a57054..fa34420ec9 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -339,10 +339,10 @@ static void gfx_ctx_ps3_destroy(void *data) } static void gfx_ctx_ps3_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); - void *ps3input = input_ps3.init(settings->input.joypad_driver); + void *ps3input = input_ps3.init(joypad_name); *input = ps3input ? &input_ps3 : NULL; *input_data = ps3input; diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 6e3060a904..31ffdbda4b 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -346,10 +346,10 @@ static bool gfx_ctx_qnx_set_video_mode(void *data, static void gfx_ctx_qnx_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); - void *qnxinput = input_qnx.init(settings->input.joypad_driver); + void *qnxinput = input_qnx.init(joypad_name); *input = qnxinput ? &input_qnx : NULL; *input_data = qnxinput; diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 2fa338cc1b..50dd0c33a9 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -391,10 +391,11 @@ static void sdl_ctx_swap_buffers(void *data, video_frame_info_t video_info) (void)data; } -static void sdl_ctx_input_driver(void *data, const input_driver_t **input, void **input_data) +static void sdl_ctx_input_driver(void *data, + const char *name, + const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index d5f9b3f8a3..959b0571e3 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -451,10 +451,10 @@ static void gfx_ctx_vc_destroy(void *data) } static void gfx_ctx_vc_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index e85009b642..ac12fc7afa 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -204,10 +204,10 @@ error: } static void gfx_ctx_vivante_input_driver(void *data, + const char *name, const input_driver_t **input, void **input_data) { - (void)data; - *input = NULL; + *input = NULL; *input_data = NULL; } diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 9ec79438e5..a59e99f91c 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -42,7 +42,6 @@ #include "../common/gl_common.h" #endif -#include "../../configuration.h" #include "../../frontend/frontend_driver.h" #include "../../runloop.h" #include "../../input/input_keyboard.h" @@ -1365,13 +1364,18 @@ static void input_wl_free(void *data) wl->joypad->destroy(); } -static bool input_wl_init(void *data) +static bool input_wl_init(void *data, const char *joypad_name) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - settings_t *settings = config_get_ptr(); - wl->joypad = input_joypad_init_driver(settings->input.joypad_driver, wl); + + if (!wl) + return false; + + wl->joypad = input_joypad_init_driver(joypad_name, wl); + if (!wl->joypad) return false; + input_keymaps_init_keyboard_lut(rarch_key_map_linux); return true; } @@ -1455,10 +1459,11 @@ static const input_driver_t input_wayland = { }; static void gfx_ctx_wl_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { /* Input is heavily tied to the window stuff on Wayland, so just implement the input driver here. */ - if (!input_wl_init(data)) + if (!input_wl_init(data, joypad_name)) { *input = NULL; *input_data = NULL; diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 00421c303b..fba99cf998 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -559,10 +559,10 @@ error: static void gfx_ctx_wgl_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); - dinput_wgl = input_dinput.init(settings ? settings->input.joypad_driver : NULL); + dinput_wgl = input_dinput.init(joypad_name); *input = dinput_wgl ? &input_dinput : NULL; *input_data = dinput_wgl; diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 08d53d4d45..897f40b163 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -36,8 +36,6 @@ #endif -#include "../../configuration.h" - #include "../../frontend/frontend_driver.h" #include "../common/gl_common.h" #include "../common/x11_common.h" @@ -877,12 +875,10 @@ error: } static void gfx_ctx_x_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); - void *xinput = input_x.init(settings->input.joypad_driver); - - (void)data; + void *xinput = input_x.init(joypad_name); *input = xinput ? &input_x : NULL; *input_data = xinput; diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index d89ea1f721..133736d847 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -23,7 +23,6 @@ #include "../../config.h" #endif -#include "../../configuration.h" #include "../../frontend/frontend_driver.h" #include "../common/egl_common.h" @@ -424,12 +423,10 @@ error: static void gfx_ctx_xegl_input_driver(void *data, - const input_driver_t **input, void **input_data) + const char *joypad_name, + const input_driver_t **input, void **input_data) { - settings_t *settings = config_get_ptr(); - void *xinput = input_x.init(settings->input.joypad_driver); - - (void)data; + void *xinput = input_x.init(joypad_name); *input = xinput ? &input_x : NULL; *input_data = xinput; diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index a3acb683a9..f1b114ee61 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -412,10 +412,14 @@ bool video_context_driver_get_metrics(gfx_ctx_metrics_t *metrics) bool video_context_driver_input_driver(gfx_ctx_input_t *inp) { + settings_t *settings = config_get_ptr(); + const char *joypad_name = settings ? settings->input.joypad_driver : NULL; + if (!current_video_context || !current_video_context->input_driver) return false; current_video_context->input_driver( - video_context_data, inp->input, inp->input_data); + video_context_data, joypad_name, + inp->input, inp->input_data); return true; } diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 27d07c2f2b..3b78e72a0a 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -126,7 +126,7 @@ typedef struct gfx_ctx_driver /* Most video backends will want to use a certain input driver. * Checks for it here. */ - void (*input_driver)(void*, const input_driver_t**, void**); + void (*input_driver)(void*, const char *, const input_driver_t**, void**); /* Wraps whatever gl_proc_address() there is. * Does not take opaque, to avoid lots of ugly wrapper code. */ From b5403da862e65af711b0d217d160d3897d77e096 Mon Sep 17 00:00:00 2001 From: bparker06 Date: Sun, 15 Jan 2017 23:04:56 -0500 Subject: [PATCH 019/427] use name instead of joypad_name --- gfx/drivers_context/d3d_ctx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 0fb31ad377..f5d4233bb1 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -185,11 +185,11 @@ static void gfx_ctx_d3d_input_driver(void *data, const input_driver_t **input, void **input_data) { #ifdef _XBOX - void *xinput = input_xinput.init(joypad_name); + void *xinput = input_xinput.init(name); *input = xinput ? (const input_driver_t*)&input_xinput : NULL; *input_data = xinput; #else - dinput = input_dinput.init(joypad_name); + dinput = input_dinput.init(name); *input = dinput ? &input_dinput : NULL; *input_data = dinput; #endif From 0968bcc173f17936470091bc43a0b07307452779 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 09:57:21 +0100 Subject: [PATCH 020/427] (menu_input_bind_dialog) Prevent warning --- menu/widgets/menu_input_bind_dialog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/menu/widgets/menu_input_bind_dialog.c b/menu/widgets/menu_input_bind_dialog.c index c80206d09b..4bfb321dcf 100644 --- a/menu/widgets/menu_input_bind_dialog.c +++ b/menu/widgets/menu_input_bind_dialog.c @@ -381,16 +381,16 @@ bool menu_input_key_bind_set_min_max(menu_input_ctx_bind_limits_t *lim) bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind) { - struct menu_bind_state binds; + struct menu_bind_state binds = {0}; /* single binds can have latching issues, * single_bind_delay = 0 (single bind not yet bound) * single_bind_delay = 1 (latching procedure) * single_bind_delay = 2 (second iteration, will quit iteration loop) */ static unsigned single_bind_delay = 0; - bool trigger_found = false; - bool timed_out = false; - settings_t *settings = config_get_ptr(); + bool trigger_found = false; + bool timed_out = false; + settings_t *settings = config_get_ptr(); rarch_timer_tick(&menu_input_binds.timer); From db0231d6302da2249e0be63b53c7a337bd6591ba Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Mon, 16 Jan 2017 11:13:39 +0100 Subject: [PATCH 021/427] Added Translated helpmessages --- intl/msg_hash_de.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 1874ba7e39..a23fbce904 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -910,6 +910,24 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK, + "Zurück") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_CONFIRM, + "Bestätigen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_INFO, + "Info") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_DOWN, + "Runter Scrollen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_UP, + "Hoch Scrollen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_START, + "Starten") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_KEYBOARD, + "Tastatur ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_MENU, + "Menü ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_QUIT, + "Beenden") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, "Unified Menu Controls") MSG_HASH( From 26d9d7e614deaa3a1ccd74d4219ba799cbea2062 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Mon, 16 Jan 2017 11:28:21 +0100 Subject: [PATCH 022/427] Add help message for libretro core text --- intl/msg_hash_de.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 3be5492418..ab97619068 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -427,6 +427,36 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) case MENU_ENUM_LABEL_VALUE_UPDATE_LAKKA: snprintf(s, len, "Lakka aktualisieren"); break; + case MENU_ENUM_LABEL_VALUE_WHAT_IS_A_CORE_DESC: + snprintf(s, len, + "RetroArch alleine macht nichts. \n" + " \n" + "Damit es etwas tut, musst du \n" + "ein Programm darin laden. \n" + "\n" + "Wir nennen so ein Programm 'Libretro core', \n" + "oder 'core' als Abkürzung. \n" + " \n" + "Um einen Core zu laden, wählen Sie einen \n" + "unter 'Core laden' aus.\n" + " \n" +#ifdef HAVE_NETWORKING + "Du erhälst Cores durch verschiedene Wege: \n" + "* Herunterladen unter\n" + "'%s' -> '%s'.\n" + "* Manuelles hinzufügen nach\n" + "'%s'.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) +#else + "Du erhälst Cores wenn du diese \n" + "manuell hinzufügst unter\n" + "'%s'.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) +#endif + ); + break; case MSG_UNKNOWN: default: /* TODO/FIXME - translate */ From 289511d7a69e6a093c955dfb2c6a9e6bde4d10ff Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Mon, 16 Jan 2017 11:31:44 +0100 Subject: [PATCH 023/427] Fixed no playlist found translation --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index a23fbce904..2429b99d77 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -415,7 +415,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_PERFORMANCE_COUNTERS, MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "No playlists.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE, - "Keine Wiedergabelisten-Eintrage verfügbar.") + "Keine Einträge verfügbar.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Keine Einstellungen gefunden.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_SHADER_PARAMETERS, From 6eac6a64471e81c1a4b01a73fbf753eee323d2d3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 15:20:14 +0100 Subject: [PATCH 024/427] joy_idx goes through joypad_map now --- input/input_driver.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 562770edb3..50abb30827 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -289,7 +289,7 @@ void input_poll(void) if (bind_valid) { - joypad_info.joy_idx = i; + joypad_info.joy_idx = settings->input.joypad_map[i]; joypad_info.auto_binds = settings->input.autoconf_binds[i]; input_driver_turbo_btns.frame_enable[i] = current_input->input_state( @@ -383,7 +383,7 @@ int16_t input_state(unsigned port, unsigned device, if (bind_valid) { - joypad_info.joy_idx = port; + joypad_info.joy_idx = settings->input.joypad_map[port]; joypad_info.auto_binds = settings->input.autoconf_binds[port]; res = current_input->input_state( current_input_data, joypad_info, libretro_input_binds, port, device, idx, id); @@ -508,7 +508,7 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2) if (binds[0][id].valid) { - joypad_info.joy_idx = 0; + joypad_info.joy_idx = settings->input.joypad_map[0]; joypad_info.auto_binds = settings->input.autoconf_binds[0]; *input1 |= (current_input->input_state(current_input_data, joypad_info, binds, @@ -516,7 +516,7 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2) } if (binds[1][id].valid) { - joypad_info.joy_idx = 1; + joypad_info.joy_idx = settings->input.joypad_map[1]; joypad_info.auto_binds = settings->input.autoconf_binds[1]; *input2 |= (current_input->input_state(current_input_data, joypad_info, binds, @@ -559,7 +559,7 @@ static INLINE bool input_menu_keys_pressed_internal( const input_device_driver_t *sec = current_input->get_sec_joypad_driver ? current_input->get_sec_joypad_driver(current_input_data) : NULL; - joypad_info.joy_idx = port; + joypad_info.joy_idx = settings->input.joypad_map[port]; joypad_info.auto_binds = settings->input.autoconf_binds[port]; joypad_info.axis_threshold = settings->input.axis_threshold; @@ -710,7 +710,7 @@ uint64_t input_menu_keys_pressed( if (check_input_driver_block_hotkey(binds_norm, binds_auto)) { - joypad_info.joy_idx = 0; + joypad_info.joy_idx = settings->input.joypad_map[0]; joypad_info.auto_binds = settings->input.autoconf_binds[0]; if (settings->input.binds[0][RARCH_ENABLE_HOTKEY].valid @@ -826,7 +826,7 @@ static INLINE bool input_keys_pressed_internal( { bool bind_valid = binds[i].valid; - joypad_info.joy_idx = 0; + joypad_info.joy_idx = settings->input.joypad_map[0]; joypad_info.auto_binds = settings->input.autoconf_binds[0]; if (bind_valid && current_input->input_state(current_input_data, @@ -912,7 +912,7 @@ uint64_t input_keys_pressed( if (check_input_driver_block_hotkey(binds_norm, binds_auto)) { - joypad_info.joy_idx = 0; + joypad_info.joy_idx = settings->input.joypad_map[0]; joypad_info.auto_binds = settings->input.autoconf_binds[0]; if ( enable_hotkey_valid && current_input->input_state( @@ -930,7 +930,7 @@ uint64_t input_keys_pressed( if (check_input_driver_block_hotkey( focus_normal, focus_binds_auto) && game_focus_toggle_valid) { - joypad_info.joy_idx = 0; + joypad_info.joy_idx = settings->input.joypad_map[0]; joypad_info.auto_binds = settings->input.autoconf_binds[0]; if (current_input->input_state(current_input_data, joypad_info, &binds, 0, RETRO_DEVICE_JOYPAD, 0, RARCH_GAME_FOCUS_TOGGLE)) From 77cf4f4e064172d8d53967756cda12f2140d6e7a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 16:09:40 +0100 Subject: [PATCH 025/427] This should fix index issue --- input/input_driver.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 50abb30827..2003087627 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -290,7 +290,7 @@ void input_poll(void) if (bind_valid) { joypad_info.joy_idx = settings->input.joypad_map[i]; - joypad_info.auto_binds = settings->input.autoconf_binds[i]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; input_driver_turbo_btns.frame_enable[i] = current_input->input_state( current_input_data, joypad_info, libretro_input_binds, @@ -384,7 +384,7 @@ int16_t input_state(unsigned port, unsigned device, if (bind_valid) { joypad_info.joy_idx = settings->input.joypad_map[port]; - joypad_info.auto_binds = settings->input.autoconf_binds[port]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; res = current_input->input_state( current_input_data, joypad_info, libretro_input_binds, port, device, idx, id); } @@ -509,7 +509,7 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2) if (binds[0][id].valid) { joypad_info.joy_idx = settings->input.joypad_map[0]; - joypad_info.auto_binds = settings->input.autoconf_binds[0]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; *input1 |= (current_input->input_state(current_input_data, joypad_info, binds, 0, RETRO_DEVICE_JOYPAD, 0, id) ? 1 : 0) << i; @@ -517,7 +517,7 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2) if (binds[1][id].valid) { joypad_info.joy_idx = settings->input.joypad_map[1]; - joypad_info.auto_binds = settings->input.autoconf_binds[1]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; *input2 |= (current_input->input_state(current_input_data, joypad_info, binds, 1, RETRO_DEVICE_JOYPAD, 0, id) ? 1 : 0) << i; @@ -560,7 +560,7 @@ static INLINE bool input_menu_keys_pressed_internal( ? current_input->get_sec_joypad_driver(current_input_data) : NULL; joypad_info.joy_idx = settings->input.joypad_map[port]; - joypad_info.auto_binds = settings->input.autoconf_binds[port]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; joypad_info.axis_threshold = settings->input.axis_threshold; if (sec && input_joypad_pressed(sec, @@ -711,7 +711,7 @@ uint64_t input_menu_keys_pressed( if (check_input_driver_block_hotkey(binds_norm, binds_auto)) { joypad_info.joy_idx = settings->input.joypad_map[0]; - joypad_info.auto_binds = settings->input.autoconf_binds[0]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; if (settings->input.binds[0][RARCH_ENABLE_HOTKEY].valid && current_input->input_state(current_input_data, joypad_info, @@ -827,7 +827,7 @@ static INLINE bool input_keys_pressed_internal( bool bind_valid = binds[i].valid; joypad_info.joy_idx = settings->input.joypad_map[0]; - joypad_info.auto_binds = settings->input.autoconf_binds[0]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; if (bind_valid && current_input->input_state(current_input_data, joypad_info, &binds, @@ -913,7 +913,7 @@ uint64_t input_keys_pressed( if (check_input_driver_block_hotkey(binds_norm, binds_auto)) { joypad_info.joy_idx = settings->input.joypad_map[0]; - joypad_info.auto_binds = settings->input.autoconf_binds[0]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; if ( enable_hotkey_valid && current_input->input_state( current_input_data, joypad_info, &binds, 0, @@ -931,7 +931,7 @@ uint64_t input_keys_pressed( focus_normal, focus_binds_auto) && game_focus_toggle_valid) { joypad_info.joy_idx = settings->input.joypad_map[0]; - joypad_info.auto_binds = settings->input.autoconf_binds[0]; + joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; if (current_input->input_state(current_input_data, joypad_info, &binds, 0, RETRO_DEVICE_JOYPAD, 0, RARCH_GAME_FOCUS_TOGGLE)) input_driver_block_hotkey = false; From f23a1a1e245633221e5b16ef771c72ade28e5500 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Mon, 16 Jan 2017 16:27:53 +0100 Subject: [PATCH 026/427] Made help message more dynamic --- intl/msg_hash_de.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index ab97619068..045271ac70 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -438,7 +438,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "oder 'core' als Abkürzung. \n" " \n" "Um einen Core zu laden, wählen Sie einen \n" - "unter 'Core laden' aus.\n" + "unter '%s' aus.\n" " \n" #ifdef HAVE_NETWORKING "Du erhälst Cores durch verschiedene Wege: \n" @@ -446,6 +446,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "'%s' -> '%s'.\n" "* Manuelles hinzufügen nach\n" "'%s'.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_LIST), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) From b6916cf391c8447253b71f07cebad94a4accb515 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Mon, 16 Jan 2017 16:46:21 +0100 Subject: [PATCH 027/427] Add translation for loading content --- intl/msg_hash_de.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 045271ac70..d2d091cafe 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -117,6 +117,27 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "im Hauptmenü angezeigt." ); break; + case MENU_ENUM_LABEL_LOAD_CONTENT_LIST: + snprintf(s, len, + "Lade Inhalt. \n" + "Suche nach Inhalt. \n" + " \n" + "Um Inhalte zu laden brauchst du\n" + "einen 'Core' und den Inhalt. \n" + " \n" + "Um einzustellen wo das Menü beginnt \n" + "setze das \n" + "'File Browser Directory'. \n" // @TODO: Where is this setting? + "Falls diese nicht gesetzt ist, startet \n" + "die Suche beim obersten Verzeichnis.\n" + " \n" + "Beim Durchsuchen werden Inhalte gefiltert. \n" + "Nur Inhalte mit der Dateiendung, welche \n" + "mit den ausgewählten Core funktionieren \n" + "werden angezeigt. \n" + "Dieser Core wird dann auch für den Inhalt verwendet." + ); + break; case MENU_ENUM_LABEL_VIDEO_DRIVER: snprintf(s, len, "Momentaner Grafiktreiber."); From 04491c2044d20524348b1ff0410f2f74e425fa89 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Mon, 16 Jan 2017 16:50:34 +0100 Subject: [PATCH 028/427] Renamed Content to Inhalt --- intl/msg_hash_de.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 2429b99d77..2eb6113d08 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -81,13 +81,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST, MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, "Speichere Konfiguration beim Beenden") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST, - "Content (Sammlung) laden") /* FIXME/TODO - rewrite */ + "Inhalt laden") /* FIXME/TODO - rewrite */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY, - "Content-Datenbankverzeichnis") + "Inhalts-Datenbankverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_SIZE, "Länge der Verlaufsliste") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS, - "Content-Einstellungen") /* FIXME */ + "Inhaltseinstellungen") /* FIXME */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY, "Core-Assets-Verzeichnis") /* FIXME/UPDATE */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS, @@ -151,7 +151,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_ENTRY, MSG_HASH(MENU_ENUM_LABEL_VALUE_FAVORITES, "Lesezeichen") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, - "") + "") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, "") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, From da51c2ebf6bd1b4ef98cb088b4f947f6570358a0 Mon Sep 17 00:00:00 2001 From: John Regan Date: Mon, 16 Jan 2017 10:26:17 -0600 Subject: [PATCH 029/427] coreaudio: fix getting device name --- audio/drivers/coreaudio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/audio/drivers/coreaudio.c b/audio/drivers/coreaudio.c index d9e73a1251..a17ead090f 100644 --- a/audio/drivers/coreaudio.c +++ b/audio/drivers/coreaudio.c @@ -139,7 +139,7 @@ static void choose_output_device(coreaudio_t *dev, const char* device) AudioObjectPropertyAddress propaddr = { kAudioHardwarePropertyDevices, - kAudioObjectPropertyScopeGlobal, + kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMaster }; UInt32 size = 0; @@ -155,14 +155,13 @@ static void choose_output_device(coreaudio_t *dev, const char* device) &propaddr, 0, 0, &size, devices) != noErr) goto done; - propaddr.mScope = kAudioDevicePropertyScopeOutput; propaddr.mSelector = kAudioDevicePropertyDeviceName; - size = 1024; for (i = 0; i < deviceCount; i ++) { char device_name[1024]; device_name[0] = 0; + size = 1024; if (AudioObjectGetPropertyData(devices[i], &propaddr, 0, 0, &size, device_name) == noErr From 9feb430b580ba1dcf039b6d95ad44fdcab5753a4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 18:02:28 +0100 Subject: [PATCH 030/427] Don't pass video_info_t as pointer --- gfx/video_driver.c | 2 +- gfx/video_thread_wrapper.c | 11 ++++++----- gfx/video_thread_wrapper.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 40cfcaa5f7..30148ebd0c 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -753,7 +753,7 @@ static bool init_video(void) if (!video_init_thread((const video_driver_t**)¤t_video, &video_driver_data, input_get_double_ptr(), input_driver_get_data_ptr(), - current_video, &video)) + current_video, video)) { RARCH_ERR("Cannot open threaded video driver ... Exiting ...\n"); goto error; diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 63720d0579..ed868fb1d7 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -809,7 +809,8 @@ static void video_thread_set_nonblock_state(void *data, bool state) thr->nonblock = state; } -static bool video_thread_init(thread_video_t *thr, const video_info_t *info, +static bool video_thread_init(thread_video_t *thr, + const video_info_t info, const input_driver_t **input, void **input_data) { size_t max_size; @@ -822,15 +823,15 @@ static bool video_thread_init(thread_video_t *thr, const video_info_t *info, thr->cond_thread = scond_new(); thr->input = input; thr->input_data = input_data; - thr->info = *info; + thr->info = info; thr->alive = true; thr->focus = true; thr->has_windowed = true; thr->suppress_screensaver = true; - max_size = info->input_scale * RARCH_SCALE_BASE; + max_size = info.input_scale * RARCH_SCALE_BASE; max_size *= max_size; - max_size *= info->rgb32 ? sizeof(uint32_t) : sizeof(uint16_t); + max_size *= info.rgb32 ? sizeof(uint32_t) : sizeof(uint16_t); thr->frame.buffer = (uint8_t*)malloc(max_size); if (!thr->frame.buffer) @@ -1355,7 +1356,7 @@ static void video_thread_set_callbacks( **/ bool video_init_thread(const video_driver_t **out_driver, void **out_data, const input_driver_t **input, void **input_data, - const video_driver_t *drv, const video_info_t *info) + const video_driver_t *drv, const video_info_t info) { thread_video_t *thr = (thread_video_t*)calloc(1, sizeof(*thr)); if (!thr) diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 9cfad4160c..190b5f2226 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -53,7 +53,7 @@ typedef struct thread_video thread_video_t; bool video_init_thread( const video_driver_t **out_driver, void **out_data, const input_driver_t **input, void **input_data, - const video_driver_t *driver, const video_info_t *info); + const video_driver_t *driver, const video_info_t info); /** * video_thread_get_ptr: From fc5afa31227c098f87f34bdc079b5bb8c992231e Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 12:50:08 -0500 Subject: [PATCH 031/427] add UTF8 BOM to fix MSVC build --- menu/widgets/menu_osk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/widgets/menu_osk.c b/menu/widgets/menu_osk.c index db9c8c1488..bfafb3b579 100644 --- a/menu/widgets/menu_osk.c +++ b/menu/widgets/menu_osk.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms From 8cb692622a887b448e6bdcd1171946974d36515f Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 16 Jan 2017 18:52:39 +0100 Subject: [PATCH 032/427] (WiiU) add support for bluetooth controllers (Wiimote, nunchuk, classic controller, wiiu pro controller). --- frontend/drivers/platform_wiiu.c | 4 + input/drivers/wiiu_input.c | 4 +- input/drivers_joypad/wiiu_joypad.c | 253 ++++++++++++++++++++++------- input/input_autodetect_builtin.c | 107 +++++++++++- wiiu/padscore.h | 126 ++++++++++++++ wiiu/system/imports.h | 14 ++ 6 files changed, 443 insertions(+), 65 deletions(-) create mode 100644 wiiu/padscore.h diff --git a/frontend/drivers/platform_wiiu.c b/frontend/drivers/platform_wiiu.c index fcfc4e68ca..29e903ca8b 100644 --- a/frontend/drivers/platform_wiiu.c +++ b/frontend/drivers/platform_wiiu.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -279,6 +280,9 @@ int main(int argc, char **argv) devoptab_list[STD_ERR] = &dotab_stdout; #endif VPADInit(); + WPADEnableURCC(true); + WPADEnableWiiRemote(true); + KPADInit(); verbosity_enable(); DEBUG_VAR(argc); diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index 35013bd6ef..c2e12b5ff6 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -30,7 +30,7 @@ #include "wiiu_dbg.h" -#define MAX_PADS 1 +#define MAX_PADS 5 typedef struct wiiu_input { @@ -56,7 +56,7 @@ static int16_t wiiu_input_state(void *data, { wiiu_input_t *wiiu = (wiiu_input_t*)data; - if(!wiiu || (port > 0) || !binds || !binds[port]) + if(!wiiu || !(port < MAX_PADS) || !binds || !binds[port]) return 0; switch (device) diff --git a/input/drivers_joypad/wiiu_joypad.c b/input/drivers_joypad/wiiu_joypad.c index e74e293818..f941254fab 100644 --- a/input/drivers_joypad/wiiu_joypad.c +++ b/input/drivers_joypad/wiiu_joypad.c @@ -19,6 +19,7 @@ #endif #include +#include #include "../input_config.h" #include "../input_driver.h" @@ -32,28 +33,61 @@ #include "wiiu_dbg.h" #ifndef MAX_PADS -#define MAX_PADS 1 +#define MAX_PADS 5 #endif -static uint64_t pad_state; -static int16_t analog_state[1][2][2]; +#define WIIUINPUT_TYPE_WIIMOTE 0x00 +#define WIIUINPUT_TYPE_NUNCHUK 0x01 +#define WIIUINPUT_TYPE_CLASSIC_CONTROLLER 0x02 +#define WIIUINPUT_TYPE_PRO_CONTROLLER 0x1F +#define WIIUINPUT_TYPE_NONE 0xFD + +static uint64_t pad_state[MAX_PADS]; +static u8 pad_type[MAX_PADS - 1] = {WIIUINPUT_TYPE_NONE, WIIUINPUT_TYPE_NONE, WIIUINPUT_TYPE_NONE, WIIUINPUT_TYPE_NONE}; +static int16_t analog_state[MAX_PADS][2][2]; extern uint64_t lifecycle_state; static bool wiiu_pad_inited = false; -static const char *wiiu_joypad_name(unsigned pad) + + +static const char* wiiu_joypad_name(unsigned pad) { - return "WIIU Controller"; + if (pad == 0) + return "WIIU Gamepad"; + + if (pad < MAX_PADS) + { + switch (pad_type[pad - 1]) + { + case WIIUINPUT_TYPE_NONE: + return "N/A"; + + case WIIUINPUT_TYPE_PRO_CONTROLLER: + return "WIIU Pro Controller"; + + case WIIUINPUT_TYPE_WIIMOTE: + return "Wiimote Controller"; + + case WIIUINPUT_TYPE_NUNCHUK: + return "Nunchuk Controller"; + + case WIIUINPUT_TYPE_CLASSIC_CONTROLLER: + return "Classic Controller"; + } + } + + return "unknown"; } static void wiiu_joypad_autodetect_add(unsigned autoconf_pad) { if (!input_autoconfigure_connect( - wiiu_joypad_name(autoconf_pad), - NULL, - wiiu_joypad.ident, - autoconf_pad, - 0, - 0 + wiiu_joypad_name(autoconf_pad), + NULL, + wiiu_joypad.ident, + autoconf_pad, + 0, + 0 )) input_config_set_device_name(autoconf_pad, wiiu_joypad_name(autoconf_pad)); } @@ -63,12 +97,12 @@ static bool wiiu_joypad_button(unsigned port_num, uint16_t key) if (port_num >= MAX_PADS) return false; - return (pad_state & (UINT64_C(1) << key)); + return (pad_state[port_num] & (UINT64_C(1) << key)); } static uint64_t wiiu_joypad_get_buttons(unsigned port_num) { - return pad_state; + return pad_state[port_num]; } static int16_t wiiu_joypad_axis(unsigned port_num, uint32_t joyaxis) @@ -94,18 +128,21 @@ static int16_t wiiu_joypad_axis(unsigned port_num, uint32_t joyaxis) switch (axis) { - case 0: - val = analog_state[port_num][0][0]; - break; - case 1: - val = analog_state[port_num][0][1]; - break; - case 2: - val = analog_state[port_num][1][0]; - break; - case 3: - val = analog_state[port_num][1][1]; - break; + case 0: + val = analog_state[port_num][0][0]; + break; + + case 1: + val = analog_state[port_num][0][1]; + break; + + case 2: + val = analog_state[port_num][1][0]; + break; + + case 3: + val = analog_state[port_num][1][1]; + break; } if (is_neg && val > 0) @@ -118,51 +155,144 @@ static int16_t wiiu_joypad_axis(unsigned port_num, uint32_t joyaxis) static void wiiu_joypad_poll(void) { + int c; VPADStatus vpad; VPADReadError vpadError; + VPADRead(0, &vpad, 1, &vpadError); - if(vpadError) - return; + if (!vpadError) + { + pad_state[0] = 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_X) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_Y) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_ZR) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_ZL) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_STICK_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; + pad_state[0] |= (vpad.hold & VPAD_BUTTON_STICK_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; - pad_state = 0; - pad_state |= (vpad.hold & VPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_X) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_Y) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_ZR) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_ZL) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_STICK_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; - pad_state |= (vpad.hold & VPAD_BUTTON_STICK_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.leftStick.x * 0x7FF0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -vpad.leftStick.y * 0x7FF0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.rightStick.x * 0x7FF0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = -vpad.rightStick.y * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.leftStick.x * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -vpad.leftStick.y * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.rightStick.x * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = -vpad.rightStick.y * 0x7FF0; + BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE); - BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE); + if (((vpad.tpNormal.touched) && (vpad.tpNormal.x > 200) && (vpad.tpNormal.validity) == 0) || + (vpad.trigger & VPAD_BUTTON_HOME)) + BIT64_SET(lifecycle_state, RARCH_MENU_TOGGLE); - if(((vpad.tpNormal.touched) && (vpad.tpNormal.x > 200) && (vpad.tpNormal.validity) == 0) || - (vpad.trigger & VPAD_BUTTON_HOME)) - BIT64_SET(lifecycle_state, RARCH_MENU_TOGGLE); + /* panic button */ + if ((vpad.hold & VPAD_BUTTON_R) && + (vpad.hold & VPAD_BUTTON_L) && + (vpad.hold & VPAD_BUTTON_STICK_R) && + (vpad.hold & VPAD_BUTTON_STICK_L)) + command_event(CMD_EVENT_QUIT, NULL); + } - /* panic button */ - if((vpad.hold & VPAD_BUTTON_R) && - (vpad.hold & VPAD_BUTTON_L) && - (vpad.hold & VPAD_BUTTON_STICK_R) && - (vpad.hold & VPAD_BUTTON_STICK_L)) - command_event(CMD_EVENT_QUIT, NULL); + for (c = 0; c < 4; c++) + { + KPADData kpad; + u32 result; + + result = KPADRead(c, &kpad, 1); + + if (!result) + continue; + + if (pad_type[c] != kpad.device_type) + { + pad_type[c] = kpad.device_type; + wiiu_joypad_autodetect_add(c + 1); + } + + pad_state[c + 1] = 0; + + switch (kpad.device_type) + { + case WIIUINPUT_TYPE_WIIMOTE: + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; + + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; + break; + + case WIIUINPUT_TYPE_NUNCHUK: + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_Z) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; + pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_C) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; + + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.nunchuck.stick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -kpad.nunchuck.stick_y * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; + break; + + case WIIUINPUT_TYPE_PRO_CONTROLLER: + + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_PRO_BUTTON_STICK_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_PRO_BUTTON_STICK_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; + + /* fallthrough */ + case WIIUINPUT_TYPE_CLASSIC_CONTROLLER: + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : + 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : + 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : + 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_X) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_Y) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_ZR) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; + pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_ZL) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; + + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.lstick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -kpad.classic.lstick_y * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.rstick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = -kpad.classic.rstick_y * 0x7FF0; + break; + } + } } -static bool wiiu_joypad_init(void *data) +static bool wiiu_joypad_init(void* data) { wiiu_joypad_autodetect_add(0); wiiu_joypad_poll(); @@ -174,7 +304,7 @@ static bool wiiu_joypad_init(void *data) static bool wiiu_joypad_query_pad(unsigned pad) { - return pad < MAX_USERS && wiiu_pad_inited; + return pad < MAX_PADS && wiiu_pad_inited; } static void wiiu_joypad_destroy(void) @@ -182,7 +312,8 @@ static void wiiu_joypad_destroy(void) wiiu_pad_inited = false; } -input_device_driver_t wiiu_joypad = { +input_device_driver_t wiiu_joypad = +{ wiiu_joypad_init, wiiu_joypad_query_pad, wiiu_joypad_destroy, diff --git a/input/input_autodetect_builtin.c b/input/input_autodetect_builtin.c index 78bfd2fc35..3061277223 100644 --- a/input/input_autodetect_builtin.c +++ b/input/input_autodetect_builtin.c @@ -193,7 +193,9 @@ DECL_AXIS(r_x_minus, -2) \ DECL_AXIS(r_y_plus, -3) \ DECL_AXIS(r_y_minus, +3) -#define WIIUINPUT_DEFAULT_BINDS \ +#ifdef WIIU + +#define WIIUINPUT_GAMEPAD_DEFAULT_BINDS \ DECL_BTN(a, 8) \ DECL_BTN(b, 0) \ DECL_BTN(x, 9) \ @@ -217,6 +219,103 @@ DECL_AXIS(r_x_minus, -2) \ DECL_AXIS(r_y_plus, -3) \ DECL_AXIS(r_y_minus, +3) +#define WIIUINPUT_PRO_CONTROLLER_DEFAULT_BINDS \ +DECL_BTN(a, 8) \ +DECL_BTN(b, 0) \ +DECL_BTN(x, 9) \ +DECL_BTN(y, 1) \ +DECL_BTN(start, 3) \ +DECL_BTN(select, 2) \ +DECL_BTN(up, 4) \ +DECL_BTN(down, 5) \ +DECL_BTN(left, 6) \ +DECL_BTN(right, 7) \ +DECL_BTN(l, 10) \ +DECL_BTN(r, 11) \ +DECL_BTN(l2, 12) \ +DECL_BTN(r2, 13) \ +DECL_AXIS(l_x_plus, +0) \ +DECL_AXIS(l_x_minus, -0) \ +DECL_AXIS(l_y_plus, +1) \ +DECL_AXIS(l_y_minus, -1) \ +DECL_AXIS(r_x_plus, +2) \ +DECL_AXIS(r_x_minus, -2) \ +DECL_AXIS(r_y_plus, -3) \ +DECL_AXIS(r_y_minus, +3) + +#define WIIUINPUT_CLASSIC_CONTROLLER_DEFAULT_BINDS \ +DECL_BTN(a, 8) \ +DECL_BTN(b, 0) \ +DECL_BTN(x, 9) \ +DECL_BTN(y, 1) \ +DECL_BTN(start, 3) \ +DECL_BTN(select, 2) \ +DECL_BTN(up, 4) \ +DECL_BTN(down, 5) \ +DECL_BTN(left, 6) \ +DECL_BTN(right, 7) \ +DECL_BTN(l, 10) \ +DECL_BTN(r, 11) \ +DECL_BTN(l2, 12) \ +DECL_BTN(r2, 13) \ +DECL_AXIS(l_x_plus, +0) \ +DECL_AXIS(l_x_minus, -0) \ +DECL_AXIS(l_y_plus, +1) \ +DECL_AXIS(l_y_minus, -1) \ +DECL_AXIS(r_x_plus, +2) \ +DECL_AXIS(r_x_minus, -2) \ +DECL_AXIS(r_y_plus, -3) \ +DECL_AXIS(r_y_minus, +3) + +#define WIIUINPUT_WIIMOTE_DEFAULT_BINDS \ +DECL_BTN(a, 8) \ +DECL_BTN(b, 0) \ +DECL_BTN(x, 9) \ +DECL_BTN(y, 1) \ +DECL_BTN(start, 3) \ +DECL_BTN(select, 2) \ +DECL_BTN(up, 4) \ +DECL_BTN(down, 5) \ +DECL_BTN(left, 6) \ +DECL_BTN(right, 7) \ +DECL_BTN(l, 10) \ +DECL_BTN(r, 11) \ +DECL_BTN(l2, 12) \ +DECL_BTN(r2, 13) \ +DECL_AXIS(l_x_plus, +0) \ +DECL_AXIS(l_x_minus, -0) \ +DECL_AXIS(l_y_plus, +1) \ +DECL_AXIS(l_y_minus, -1) \ +DECL_AXIS(r_x_plus, +2) \ +DECL_AXIS(r_x_minus, -2) \ +DECL_AXIS(r_y_plus, -3) \ +DECL_AXIS(r_y_minus, +3) + +#define WIIUINPUT_NUNCHUK_DEFAULT_BINDS \ +DECL_BTN(a, 8) \ +DECL_BTN(b, 0) \ +DECL_BTN(x, 9) \ +DECL_BTN(y, 1) \ +DECL_BTN(start, 3) \ +DECL_BTN(select, 2) \ +DECL_BTN(up, 4) \ +DECL_BTN(down, 5) \ +DECL_BTN(left, 6) \ +DECL_BTN(right, 7) \ +DECL_BTN(l, 10) \ +DECL_BTN(r, 11) \ +DECL_BTN(l2, 12) \ +DECL_BTN(r2, 13) \ +DECL_AXIS(l_x_plus, +0) \ +DECL_AXIS(l_x_minus, -0) \ +DECL_AXIS(l_y_plus, +1) \ +DECL_AXIS(l_y_minus, -1) \ +DECL_AXIS(r_x_plus, +2) \ +DECL_AXIS(r_x_minus, -2) \ +DECL_AXIS(r_y_plus, -3) \ +DECL_AXIS(r_y_minus, +3) +#endif + #define GXINPUT_GAMECUBE_DEFAULT_BINDS \ DECL_BTN(a, 0) \ DECL_BTN(b, 1) \ @@ -417,7 +516,11 @@ const char* const input_builtin_autoconfs[] = #endif #endif #ifdef WIIU - DECL_AUTOCONF_DEVICE("WIIU Controller", "wiiu", WIIUINPUT_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("WIIU Gamepad", "wiiu", WIIUINPUT_GAMEPAD_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("WIIU Pro Controller", "wiiu", WIIUINPUT_PRO_CONTROLLER_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("Wiimote Controller", "wiiu", WIIUINPUT_WIIMOTE_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("Nunchuk Controller", "wiiu", WIIUINPUT_NUNCHUK_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("Classic Controller", "wiiu", WIIUINPUT_CLASSIC_CONTROLLER_DEFAULT_BINDS), #endif #ifdef __CELLOS_LV2__ DECL_AUTOCONF_DEVICE("SixAxis Controller", "ps3", PS3INPUT_DEFAULT_BINDS), diff --git a/wiiu/padscore.h b/wiiu/padscore.h new file mode 100644 index 0000000000..962dff02d4 --- /dev/null +++ b/wiiu/padscore.h @@ -0,0 +1,126 @@ +/**************************************************************************** + * Copyright (C) 2015 + * by Dimok + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any + * damages arising from the use of this software. + * + * Permission is granted to anyone to use this software for any + * purpose, including commercial applications, and to alter it and + * redistribute it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you + * must not claim that you wrote the original software. If you use + * this software in a product, an acknowledgment in the product + * documentation would be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and + * must not be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + ***************************************************************************/ +#ifndef __PAD_SCORE_FUNCTIONS_H_ +#define __PAD_SCORE_FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define WPAD_BUTTON_LEFT 0x0001 +#define WPAD_BUTTON_RIGHT 0x0002 +#define WPAD_BUTTON_DOWN 0x0004 +#define WPAD_BUTTON_UP 0x0008 +#define WPAD_BUTTON_PLUS 0x0010 +#define WPAD_BUTTON_2 0x0100 +#define WPAD_BUTTON_1 0x0200 +#define WPAD_BUTTON_B 0x0400 +#define WPAD_BUTTON_A 0x0800 +#define WPAD_BUTTON_MINUS 0x1000 +#define WPAD_BUTTON_Z 0x2000 +#define WPAD_BUTTON_C 0x4000 +#define WPAD_BUTTON_HOME 0x8000 + +#define WPAD_CLASSIC_BUTTON_UP 0x0001 +#define WPAD_CLASSIC_BUTTON_LEFT 0x0002 +#define WPAD_CLASSIC_BUTTON_ZR 0x0004 +#define WPAD_CLASSIC_BUTTON_X 0x0008 +#define WPAD_CLASSIC_BUTTON_A 0x0010 +#define WPAD_CLASSIC_BUTTON_Y 0x0020 +#define WPAD_CLASSIC_BUTTON_B 0x0040 +#define WPAD_CLASSIC_BUTTON_ZL 0x0080 +#define WPAD_CLASSIC_BUTTON_R 0x0200 +#define WPAD_CLASSIC_BUTTON_PLUS 0x0400 +#define WPAD_CLASSIC_BUTTON_HOME 0x0800 +#define WPAD_CLASSIC_BUTTON_MINUS 0x1000 +#define WPAD_CLASSIC_BUTTON_L 0x2000 +#define WPAD_CLASSIC_BUTTON_DOWN 0x4000 +#define WPAD_CLASSIC_BUTTON_RIGHT 0x8000 + +#define WPAD_PRO_BUTTON_STICK_R 0x10000 +#define WPAD_PRO_BUTTON_STICK_L 0x20000 + +void InitPadScoreFunctionPointers(void); + + +typedef struct _KPADData +{ + u32 btns_h; + u32 btns_d; + u32 btns_r; + u32 unused_1[5]; + f32 pos_x; + f32 pos_y; + u32 unused_2[3]; + f32 angle_x; + f32 angle_y; + u32 unused_3[8]; + u8 device_type; + u8 wpad_error; + u8 pos_valid; + u8 unused_4[1]; + + union + { + struct + { + f32 stick_x; + f32 stick_y; + } nunchuck; + + struct + { + u32 btns_h; + u32 btns_d; + u32 btns_r; + f32 lstick_x; + f32 lstick_y; + f32 rstick_x; + f32 rstick_y; + f32 ltrigger; + f32 rtrigger; + } classic; + + u32 unused_6[20]; + }; + u32 unused_7[16]; +} KPADData; + +typedef void (* wpad_connect_callback_t)(s32 chan, s32 status); + +void KPADInit (void); +s32 WPADProbe (s32 chan, u32 * pad_type); +s32 WPADSetDataFormat(s32 chan, s32 format); +void WPADEnableURCC(s32 enable); +void WPADEnableWiiRemote(s32 enable); +void WPADRead(s32 chan, void * data); +s32 KPADRead(s32 chan, void * data, u32 size); + +#ifdef __cplusplus +} +#endif + +#endif // __PAD_SCORE_FUNCTIONS_H_ diff --git a/wiiu/system/imports.h b/wiiu/system/imports.h index 144d4518fb..b6f6a9d8b1 100644 --- a/wiiu/system/imports.h +++ b/wiiu/system/imports.h @@ -178,3 +178,17 @@ IMPORT(VPADRead); IMPORT(VPADInit); IMPORT_END(); + +/* padscore */ +IMPORT_BEGIN(padscore); + +IMPORT(KPADInit); +IMPORT(WPADProbe); +IMPORT(WPADSetDataFormat); +IMPORT(WPADEnableURCC); +IMPORT(WPADEnableWiiRemote); +IMPORT(WPADRead); +IMPORT(KPADRead); + +IMPORT_END(); + From a9749849e34dc51313f6edaec6a80ba548407980 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Mon, 16 Jan 2017 18:53:35 +0100 Subject: [PATCH 033/427] (WiiU) disc script: no need to delete icons. --- dist-scripts/wiiu-cores.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/dist-scripts/wiiu-cores.sh b/dist-scripts/wiiu-cores.sh index e3a5d53fc2..b1a384e555 100755 --- a/dist-scripts/wiiu-cores.sh +++ b/dist-scripts/wiiu-cores.sh @@ -117,7 +117,6 @@ for f in `ls -v *_${platform}.${EXT}`; do fi fi rm -rf ${name}_meta.xml - rm -rf $name.png done From 99508cfd6436a3b3f64a753ab7243c7195a133e0 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 15:06:46 -0500 Subject: [PATCH 034/427] allow --disable-vulkan on Windows --- Makefile.common | 7 +++++-- qb/qb.params.sh | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index e3e3d219ae..15374c1dca 100644 --- a/Makefile.common +++ b/Makefile.common @@ -441,8 +441,11 @@ ifeq ($(HAVE_NEON),1) endif ifneq ($(findstring Win32,$(OS)),) -HAVE_VULKAN=1 -DEFINES += -DHAVE_VULKAN + # if user explicitly sets --disable-vulkan on Windows, then disable it + ifneq ($(HAVE_NO_VULKAN),1) + HAVE_VULKAN=1 + DEFINES += -DHAVE_VULKAN + endif endif HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI) diff --git a/qb/qb.params.sh b/qb/qb.params.sh index 3964fe26fb..4b822298a8 100644 --- a/qb/qb.params.sh +++ b/qb/qb.params.sh @@ -72,6 +72,7 @@ parse_input() # Parse stuff :V --disable-*) opt_exists "${1##--disable-}" "$1" eval "HAVE_$opt=no" + eval "HAVE_NO_$opt=yes" ;; --with-*) arg="${1##--with-}" From f96ee3e6d6bb4562f7a5c7d3f6370f85e28938f2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 21:31:30 +0100 Subject: [PATCH 035/427] (menu) cleanups; move variables --- menu/menu_displaylist.c | 3 +-- menu/menu_shader.c | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 84f802422e..c637fa9fd2 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -318,7 +318,6 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) unsigned i; char tmp[PATH_MAX_LENGTH]; core_info_t *core_info = NULL; - settings_t *settings = config_get_ptr(); tmp[0] = '\0'; @@ -440,6 +439,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) if (core_info->firmware_count > 0) { core_info_ctx_firmware_t firmware_info; + settings_t *settings = config_get_ptr(); firmware_info.path = core_info->path; firmware_info.directory.system = settings->directory.system; @@ -1715,7 +1715,6 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) char tmp[PATH_MAX_LENGTH]; char crc_str[20]; database_info_t *db_info_entry = &db_info->list[i]; - settings_t *settings = config_get_ptr(); bool show_advanced_settings = false; crc_str[0] = tmp[0] = '\0'; diff --git a/menu/menu_shader.c b/menu/menu_shader.c index aa299e49b6..a96319acb6 100644 --- a/menu/menu_shader.c +++ b/menu/menu_shader.c @@ -309,7 +309,6 @@ bool menu_shader_manager_save_preset( config_file_t *conf = NULL; bool ret = false; struct video_shader *shader = menu_shader_get(); - settings_t *settings = config_get_ptr(); buffer[0] = config_directory[0] = '\0'; preset_path[0] = '\0'; @@ -385,9 +384,10 @@ bool menu_shader_manager_save_preset( if (!fullpath) { - dirs[0] = settings->directory.video_shader; - dirs[1] = settings->directory.menu_config; - dirs[2] = config_directory; + settings_t *settings = config_get_ptr(); + dirs[0] = settings->directory.video_shader; + dirs[1] = settings->directory.menu_config; + dirs[2] = config_directory; } conf = (config_file_t*)config_file_new(NULL); From 1c82287e109acad26dc2c89f71c6bb78d15bd411 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 21:33:25 +0100 Subject: [PATCH 036/427] (video_state_tracker.c) Don't need header include --- gfx/video_state_tracker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/video_state_tracker.c b/gfx/video_state_tracker.c index b1bf54d5bb..93a2f40338 100644 --- a/gfx/video_state_tracker.c +++ b/gfx/video_state_tracker.c @@ -28,8 +28,9 @@ #endif #include "video_state_tracker.h" + #include "../input/input_config.h" -#include "../configuration.h" + #include "../verbosity.h" struct state_tracker_internal From d519ad7017f6c3c0ac3c89fe548bbb4bb2c28912 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 21:36:04 +0100 Subject: [PATCH 037/427] (input_config.c) Move variable --- input/input_config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/input/input_config.c b/input/input_config.c index 093c37debd..1f41f3a199 100644 --- a/input/input_config.c +++ b/input/input_config.c @@ -486,11 +486,13 @@ const char *input_config_get_device_name(unsigned port) void input_config_set_device_name(unsigned port, const char *name) { - settings_t *settings = config_get_ptr(); if (!string_is_empty(name)) + { + settings_t *settings = config_get_ptr(); strlcpy(settings->input.device_names[port], name, sizeof(settings->input.device_names[port])); + } } bool input_config_get_bind_idx(unsigned port, unsigned *joy_idx_real) From cb64f28950f47d15a2983b1b2b4da5499140893c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 22:04:57 +0100 Subject: [PATCH 038/427] Create drivers_init --- command.c | 4 ++-- driver.c | 17 ++--------------- driver.h | 9 ++------- retroarch.c | 2 +- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/command.c b/command.c index c5ec6d3e7a..5a419fd7da 100644 --- a/command.c +++ b/command.c @@ -2259,7 +2259,7 @@ bool command_event(enum event_command cmd, void *data) { int flags = DRIVER_AUDIO_MASK; driver_ctl(RARCH_DRIVER_CTL_UNINIT, &flags); - driver_ctl(RARCH_DRIVER_CTL_INIT, &flags); + drivers_init(flags); } break; case CMD_EVENT_RESET_CONTEXT: @@ -2278,7 +2278,7 @@ bool command_event(enum event_command cmd, void *data) memcpy(hwr, &hwr_copy, sizeof(*hwr)); video_driver_set_context_negotiation_interface(iface); - driver_ctl(RARCH_DRIVER_CTL_INIT, &flags); + drivers_init(flags); } break; case CMD_EVENT_SHUTDOWN: diff --git a/driver.c b/driver.c index 5de24cb3de..b0f1aacfd5 100644 --- a/driver.c +++ b/driver.c @@ -287,13 +287,13 @@ static bool driver_update_system_av_info(const struct retro_system_av_info *info } /** - * init_drivers: + * drivers_init: * @flags : Bitmask of drivers to initialize. * * Initializes drivers. * @flags determines which drivers get initialized. **/ -static void init_drivers(int flags) +void drivers_init(int flags) { if (flags & DRIVER_VIDEO_MASK) video_driver_unset_own_driver(); @@ -453,19 +453,6 @@ bool driver_ctl(enum driver_ctl_state state, void *data) int flags = DRIVERS_CMD_ALL; return driver_ctl(RARCH_DRIVER_CTL_UNINIT, &flags); } - case RARCH_DRIVER_CTL_INIT: - { - int *flags = (int*)data; - if (!flags) - return false; - init_drivers(*flags); - } - break; - case RARCH_DRIVER_CTL_INIT_ALL: - { - int flags = DRIVERS_CMD_ALL; - return driver_ctl(RARCH_DRIVER_CTL_INIT, &flags); - } case RARCH_DRIVER_CTL_INIT_PRE: audio_driver_find_driver(); video_driver_find_driver(); diff --git a/driver.h b/driver.h index 475564058b..34633736e6 100644 --- a/driver.h +++ b/driver.h @@ -72,13 +72,6 @@ enum driver_ctl_state RARCH_DRIVER_CTL_UNINIT_ALL, - /* Initializes drivers. - * @data is a bitmask which determines - * which drivers get initialized. */ - RARCH_DRIVER_CTL_INIT, - - RARCH_DRIVER_CTL_INIT_ALL, - /* Attempts to find a default driver for * all driver types. * @@ -122,6 +115,8 @@ typedef struct driver_ctx_info bool driver_ctl(enum driver_ctl_state state, void *data); +void drivers_init(int flags); + RETRO_END_DECLS #endif diff --git a/retroarch.c b/retroarch.c index 2fe95be733..9da45ef39e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1074,7 +1074,7 @@ bool retroarch_main_init(int argc, char *argv[]) } } - driver_ctl(RARCH_DRIVER_CTL_INIT_ALL, NULL); + drivers_init(DRIVERS_CMD_ALL); command_event(CMD_EVENT_COMMAND_INIT, NULL); command_event(CMD_EVENT_REMOTE_INIT, NULL); command_event(CMD_EVENT_REWIND_INIT, NULL); From 8958e02b54bf01709c706bd156e3447823cbc32f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 22:17:44 +0100 Subject: [PATCH 039/427] Don't invoke this at beginning of function --- ui/drivers/ui_win32.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index b11764bd19..0fe7a67ae1 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -358,11 +358,8 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { int i, pos; - video_shader_ctx_t shader_info; const ui_window_t *window = ui_companion_driver_get_window_ptr(); - video_shader_driver_get_current_shader(&shader_info); - switch (message) { case WM_CREATE: @@ -390,14 +387,18 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message, if (g_shader_dlg.controls[i].type != SHADER_PARAM_CTRL_CHECKBOX) break; - if (SendMessage(g_shader_dlg.controls[i].checkbox.hwnd, - BM_GETCHECK, 0, 0) == BST_CHECKED) - shader_info.data->parameters[i].current = - shader_info.data->parameters[i].maximum; - else - shader_info.data->parameters[i].current = - shader_info.data->parameters[i].minimum; + { + video_shader_ctx_t shader_info; + video_shader_driver_get_current_shader(&shader_info); + if (SendMessage(g_shader_dlg.controls[i].checkbox.hwnd, + BM_GETCHECK, 0, 0) == BST_CHECKED) + shader_info.data->parameters[i].current = + shader_info.data->parameters[i].maximum; + else + shader_info.data->parameters[i].current = + shader_info.data->parameters[i].minimum; + } break; case WM_HSCROLL: @@ -410,8 +411,14 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message, break; pos = (int)SendMessage(g_shader_dlg.controls[i].trackbar.hwnd, TBM_GETPOS, 0, 0); - shader_info.data->parameters[i].current = - shader_info.data->parameters[i].minimum + pos * shader_info.data->parameters[i].step; + + { + video_shader_ctx_t shader_info; + video_shader_driver_get_current_shader(&shader_info); + + shader_info.data->parameters[i].current = + shader_info.data->parameters[i].minimum + pos * shader_info.data->parameters[i].step; + } shader_dlg_refresh_trackbar_label(i); break; From 0b1a204949278e63e61f82585a1917c9a39a1c22 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 22:32:39 +0100 Subject: [PATCH 040/427] Roll this back --- menu/widgets/menu_input_bind_dialog.c | 60 +++++---------------------- 1 file changed, 11 insertions(+), 49 deletions(-) diff --git a/menu/widgets/menu_input_bind_dialog.c b/menu/widgets/menu_input_bind_dialog.c index 4bfb321dcf..cc782330e9 100644 --- a/menu/widgets/menu_input_bind_dialog.c +++ b/menu/widgets/menu_input_bind_dialog.c @@ -381,16 +381,9 @@ bool menu_input_key_bind_set_min_max(menu_input_ctx_bind_limits_t *lim) bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind) { - struct menu_bind_state binds = {0}; - /* single binds can have latching issues, - * single_bind_delay = 0 (single bind not yet bound) - * single_bind_delay = 1 (latching procedure) - * single_bind_delay = 2 (second iteration, will quit iteration loop) - */ - static unsigned single_bind_delay = 0; - bool trigger_found = false; - bool timed_out = false; - settings_t *settings = config_get_ptr(); + struct menu_bind_state binds; + bool timed_out = false; + settings_t *settings = config_get_ptr(); rarch_timer_tick(&menu_input_binds.timer); @@ -407,27 +400,12 @@ bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind) timed_out = true; } - if (single_bind_delay > 0) - { - snprintf(bind->s, bind->len, "Confirming key %s ...", - input_config_bind_map_get_desc( - menu_input_binds.begin - MENU_SETTINGS_BIND_BEGIN) - ); - single_bind_delay++; - } - else - snprintf(bind->s, bind->len, - "[%s]\npress keyboard or joypad\n(timeout %d %s)", - input_config_bind_map_get_desc( - menu_input_binds.begin - MENU_SETTINGS_BIND_BEGIN), - rarch_timer_get_timeout(&menu_input_binds.timer), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SECONDS)); - - if (single_bind_delay == 2) - { - single_bind_delay = 0; - return true; - } + snprintf(bind->s, bind->len, + "[%s]\npress keyboard or joypad\n(timeout %d %s)", + input_config_bind_map_get_desc( + menu_input_binds.begin - MENU_SETTINGS_BIND_BEGIN), + rarch_timer_get_timeout(&menu_input_binds.timer), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SECONDS)); /* binds.begin is updated in keyboard_press callback. */ if (menu_input_binds.begin > menu_input_binds.last) @@ -439,13 +417,6 @@ bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind) if (timed_out) input_keyboard_ctl(RARCH_INPUT_KEYBOARD_CTL_CANCEL_WAIT_KEYS, NULL); - /* If this is a single bind, add another delay of one second */ - if (!timed_out && (binds.begin == binds.last)) - { - single_bind_delay = 1; - return false; - } - return true; } @@ -454,23 +425,14 @@ bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind) input_driver_keyboard_mapping_set_block(true); menu_input_key_bind_poll_bind_state(&binds, menu_bind_port, timed_out); - if (single_bind_delay == 0) - trigger_found = menu_input_key_bind_poll_find_trigger(&menu_input_binds, &binds); - - if ((binds.skip && !menu_input_binds.skip) || trigger_found) + if ((binds.skip && !menu_input_binds.skip) || + menu_input_key_bind_poll_find_trigger(&menu_input_binds, &binds)) { input_driver_keyboard_mapping_set_block(false); /* Avoid new binds triggering things right away. */ input_driver_set_flushing_input(); - /* If this is a single bind, add a latching delay */ - if (binds.begin == binds.last) - { - single_bind_delay = 1; - return false; - } - binds.begin++; if (binds.begin > binds.last) From b3642df33fbe94ee9ce6e858ecba408956888821 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 22:34:36 +0100 Subject: [PATCH 041/427] (ui_cocoa.m) Cleanups --- ui/drivers/ui_cocoa.m | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index f22d355be4..f86ceca170 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -109,9 +109,10 @@ static void app_terminate(void) case NSFlagsChanged: { static uint32_t old_flags = 0; - uint32_t new_flags = event.modifierFlags; - bool down = (new_flags & old_flags) == old_flags; - old_flags = new_flags; + uint32_t new_flags = event.modifierFlags; + bool down = (new_flags & old_flags) == old_flags; + + old_flags = new_flags; apple_input_keyboard_event(down, event.keyCode, 0, event.modifierFlags, RETRO_DEVICE_KEYBOARD); @@ -148,27 +149,27 @@ static void app_terminate(void) case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: - { - NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil]; - apple = (cocoa_input_data_t*)input_driver_get_data(); - if (!apple || pos.y < 0) - return; - apple->mouse_buttons |= 1 << event.buttonNumber; - - apple->touch_count = 1; - } + { + NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil]; + apple = (cocoa_input_data_t*)input_driver_get_data(); + if (!apple || pos.y < 0) + return; + apple->mouse_buttons |= 1 << event.buttonNumber; + + apple->touch_count = 1; + } break; case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: - { - NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil]; - apple = (cocoa_input_data_t*)input_driver_get_data(); - if (!apple || pos.y < 0) - return; - apple->mouse_buttons &= ~(1 << event.buttonNumber); - apple->touch_count = 0; - } + { + NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil]; + apple = (cocoa_input_data_t*)input_driver_get_data(); + if (!apple || pos.y < 0) + return; + apple->mouse_buttons &= ~(1 << event.buttonNumber); + apple->touch_count = 0; + } break; } } From 57e5af646113755ebc729f8ec33f5f4d93ddb835 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 16:42:39 -0500 Subject: [PATCH 042/427] update JP translation --- intl/msg_hash_ja.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 40541cdcec..76b3dda148 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -484,6 +484,8 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_SIZE, "履歴リストã®ã‚µã‚¤ã‚º" ) +MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, + "エントリー削除を許ã™") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS, "クイックメニュー" ) @@ -1318,7 +1320,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_STATUS, MSG_HASH(MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "stdinコマンド") MSG_HASH(MENU_ENUM_LABEL_VALUE_SUPPORTED_CORES, - "対応ã™ã‚‹ã‚³ã‚¢") + "æ案ã™ã‚‹ã‚³ã‚¢") MSG_HASH(MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, "スクリーンセーãƒãƒ¼ã‚’サスペンド") MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEM_BGM_ENABLE, @@ -1538,7 +1540,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "自動アスペクト比") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, - "アスペクト比ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹") + "アスペクト比") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "é»’ã„フレームを挿入") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, @@ -1590,7 +1592,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE, "リフレッシュレート") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, - "モニタã®äºˆæƒ³ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¬ãƒ¼ãƒˆ") + "ç”»é¢ã®äºˆæƒ³ãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¬ãƒ¼ãƒˆ") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ROTATION, "回転") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SCALE, @@ -1798,7 +1800,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE, MSG_HASH(MENU_ENUM_SUBLABEL_USER_LANGUAGE, "インタフェースã®è¨€èªžã‚’変更ã™ã‚‹ã€‚") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "フレームã®é–“ã§é»’フレームを挿入ã™ã‚‹ã€‚60Hzコンテンツを120Hzモニターã§ã‚„ã‚‹ã“ã¨ã‚’å½¹ã«ç«‹ã¤ã€‚") + "フレームã®é–“ã§é»’フレームを挿入ã™ã‚‹ã€‚60Hzコンテンツを120Hzç”»é¢ã§ã‚„ã‚‹ã“ã¨ã‚’å½¹ã«ç«‹ã¤ã€‚") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, "é…延ãŒæ¸›ã‚‹ã‘ã©ãƒ“デオ途切れã®å±é™ºçŽ‡ãŒå¢—ã™ã€‚") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC_FRAMES, @@ -1806,9 +1808,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC_FRAMES, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES, "指定ã™ã‚‹ãƒãƒƒãƒ•ã‚¡ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã‚’ビデオドライãƒã«ä¼ãˆã‚‹ã€‚") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MONITOR_INDEX, - "希望ã™ã‚‹ãƒ¢ãƒ‹ã‚¿ãƒ¼ã‚’é¸æŠžã™ã‚‹ã€‚") + "希望ã™ã‚‹ç”»é¢ã‚’é¸æŠžã™ã‚‹ã€‚") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, - "モニターã®æ­£ç¢ºãªæŽ¨å®šã®ãƒ¢ãƒ‹ã‚¿ãƒ¼ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãƒ¬ãƒ¼ãƒˆ") + "ç”»é¢ã®æ­£ç¢ºãªæŽ¨å®šã®ãƒªãƒ•ãƒ¬ãƒƒã‚·ãƒ¥ãƒ¬ãƒ¼ãƒˆ") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, "ビデオ出力ã®è¨­å®šã‚’変ãˆã‚‹ã€‚") MSG_HASH(MENU_ENUM_SUBLABEL_WIFI_SETTINGS, @@ -2370,15 +2372,15 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, "コンテンツをロードã™ã‚‹å¾Œã«ãƒãƒƒãƒˆãƒ—レイã¯é–‹å§‹ã—ã¾ã™ã€‚") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, - "Browse URL" + "URLã‚’å‚ç…§" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL, - "URL Path" + "URLã®ãƒ‘ス" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_START, - "Start" + "スタート" ) MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_BOKEH, - "Bokeh") + "ボケ") From 1f3409dba80b9bdf4ef2738a322c234032487477 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 23:27:55 +0100 Subject: [PATCH 043/427] (ui_win32.c) Some minor cleanups --- ui/drivers/ui_win32.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 0fe7a67ae1..b20cea7c5c 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -115,12 +115,15 @@ typedef struct static shader_dlg_t g_shader_dlg = {{0}}; -static void shader_dlg_refresh_trackbar_label(int index) +static bool shader_dlg_refresh_trackbar_label(int index) { video_shader_ctx_t shader_info; char val_buffer[32] = {0}; video_shader_driver_get_current_shader(&shader_info); + + if (!shader_info.data) + return false; if (floorf(shader_info.data->parameters[index].current) == shader_info.data->parameters[index].current) @@ -133,6 +136,7 @@ static void shader_dlg_refresh_trackbar_label(int index) SendMessage(g_shader_dlg.controls[index].trackbar.label_val, WM_SETTEXT, 0, (LPARAM)val_buffer); + return true; } static void shader_dlg_params_refresh(void) @@ -153,14 +157,15 @@ static void shader_dlg_params_refresh(void) { case SHADER_PARAM_CTRL_CHECKBOX: { - bool checked = + bool checked = shader_info.data ? (shader_info.data->parameters[i].current == - shader_info.data->parameters[i].maximum); + shader_info.data->parameters[i].maximum) : false; SendMessage(control->checkbox.hwnd, BM_SETCHECK, checked, 0); } break; case SHADER_PARAM_CTRL_TRACKBAR: - shader_dlg_refresh_trackbar_label(i); + if (!shader_dlg_refresh_trackbar_label(i)) + break; SendMessage(control->trackbar.hwnd, TBM_SETRANGEMIN, (WPARAM)TRUE, (LPARAM)0); @@ -219,10 +224,11 @@ void shader_dlg_params_reload(void) int i, pos_x, pos_y; video_shader_ctx_t shader_info; const ui_window_t *window = ui_companion_driver_get_window_ptr(); - video_shader_driver_get_current_shader(&shader_info); shader_dlg_params_clear(); + video_shader_driver_get_current_shader(&shader_info); + if (!shader_info.data) return; if (shader_info.data->num_parameters > GFX_MAX_PARAMETERS) From 1709b6889ff4ea979e9b3d16884476c0cbcae050 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 23:32:28 +0100 Subject: [PATCH 044/427] (ui_win32.c) Use stdstring.c --- ui/drivers/ui_win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index b20cea7c5c..20a09d880f 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "../ui_companion_driver.h" @@ -543,7 +544,7 @@ static bool win32_browser( new_title[0] = '\0'; new_file[0] = '\0'; - if (title && *title) + if (!string_is_empty(title)) strlcpy(new_title, title, sizeof(new_title)); if (filename && *filename) From 864df4f55d046a7727970fb7b885d6da879e18dc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 16 Jan 2017 23:38:46 +0100 Subject: [PATCH 045/427] Move local variable --- menu/drivers/xmb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 2a436e6fbd..79d066ba1c 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1048,7 +1048,7 @@ static void xmb_update_savestate_thumbnail_image(void *data) static void xmb_selection_pointer_changed( xmb_handle_t *xmb, bool allow_animations) { - unsigned i, end, height, depth; + unsigned i, end, height; menu_animation_ctx_tag_t tag; size_t selection, num = 0; int threshold = 0; @@ -1088,10 +1088,11 @@ static void xmb_selection_pointer_changed( if (i == selection) { - ia = xmb->items.active.alpha; - iz = xmb->items.active.zoom; + unsigned depth = xmb_list_get_size(xmb, MENU_LIST_PLAIN); + + ia = xmb->items.active.alpha; + iz = xmb->items.active.zoom; - depth = xmb_list_get_size(xmb, MENU_LIST_PLAIN); if (!string_is_equal(xmb_thumbnails_ident(), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)) && (depth == 1 || xmb->categories.selection_ptr == 0)) From aae2b2a276423e770bae9e0c798a87d5e9875d11 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 00:59:29 +0100 Subject: [PATCH 046/427] (ui_win32.c) Further cleanups --- ui/drivers/ui_win32.c | 112 ++++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 20a09d880f..5e530da392 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -116,23 +116,18 @@ typedef struct static shader_dlg_t g_shader_dlg = {{0}}; -static bool shader_dlg_refresh_trackbar_label(int index) +static bool shader_dlg_refresh_trackbar_label(int index, + video_shader_ctx_t *shader_info) { - video_shader_ctx_t shader_info; char val_buffer[32] = {0}; - video_shader_driver_get_current_shader(&shader_info); - - if (!shader_info.data) - return false; - - if (floorf(shader_info.data->parameters[index].current) - == shader_info.data->parameters[index].current) + if (floorf(shader_info->data->parameters[index].current) + == shader_info->data->parameters[index].current) snprintf(val_buffer, sizeof(val_buffer), "%.0f", - shader_info.data->parameters[index].current); + shader_info->data->parameters[index].current); else snprintf(val_buffer, sizeof(val_buffer), "%.2f", - shader_info.data->parameters[index].current); + shader_info->data->parameters[index].current); SendMessage(g_shader_dlg.controls[index].trackbar.label_val, WM_SETTEXT, 0, (LPARAM)val_buffer); @@ -143,9 +138,6 @@ static bool shader_dlg_refresh_trackbar_label(int index) static void shader_dlg_params_refresh(void) { int i; - video_shader_ctx_t shader_info; - - video_shader_driver_get_current_shader(&shader_info); for (i = 0; i < GFX_MAX_PARAMETERS; i++) { @@ -158,6 +150,9 @@ static void shader_dlg_params_refresh(void) { case SHADER_PARAM_CTRL_CHECKBOX: { + video_shader_ctx_t shader_info; + video_shader_driver_get_current_shader(&shader_info); + bool checked = shader_info.data ? (shader_info.data->parameters[i].current == shader_info.data->parameters[i].maximum) : false; @@ -165,20 +160,27 @@ static void shader_dlg_params_refresh(void) } break; case SHADER_PARAM_CTRL_TRACKBAR: - if (!shader_dlg_refresh_trackbar_label(i)) - break; + { + video_shader_ctx_t shader_info; + video_shader_driver_get_current_shader(&shader_info); + if (shader_info.data && !shader_dlg_refresh_trackbar_label(i, &shader_info)) + break; - SendMessage(control->trackbar.hwnd, - TBM_SETRANGEMIN, (WPARAM)TRUE, (LPARAM)0); - SendMessage(control->trackbar.hwnd, - TBM_SETRANGEMAX, (WPARAM)TRUE, - (LPARAM)((shader_info.data->parameters[i].maximum - - shader_info.data->parameters[i].minimum) - / shader_info.data->parameters[i].step)); - SendMessage(control->trackbar.hwnd, TBM_SETPOS, (WPARAM)TRUE, - (LPARAM)((shader_info.data->parameters[i].current - - shader_info.data->parameters[i].minimum) / - shader_info.data->parameters[i].step)); + if (shader_info.data) + { + SendMessage(control->trackbar.hwnd, + TBM_SETRANGEMIN, (WPARAM)TRUE, (LPARAM)0); + SendMessage(control->trackbar.hwnd, + TBM_SETRANGEMAX, (WPARAM)TRUE, + (LPARAM)((shader_info.data->parameters[i].maximum - + shader_info.data->parameters[i].minimum) + / shader_info.data->parameters[i].step)); + SendMessage(control->trackbar.hwnd, TBM_SETPOS, (WPARAM)TRUE, + (LPARAM)((shader_info.data->parameters[i].current - + shader_info.data->parameters[i].minimum) / + shader_info.data->parameters[i].step)); + } + } break; case SHADER_PARAM_CTRL_NONE: default: @@ -193,10 +195,9 @@ static void shader_dlg_params_clear(void) for (i = 0; i < GFX_MAX_PARAMETERS; i++) { - const ui_window_t *window = ui_companion_driver_get_window_ptr(); shader_param_ctrl_t*control = &g_shader_dlg.controls[i]; - if (control->type == SHADER_PARAM_CTRL_NONE) + if (!control || control->type == SHADER_PARAM_CTRL_NONE) break; switch (control->type) @@ -204,8 +205,11 @@ static void shader_dlg_params_clear(void) case SHADER_PARAM_CTRL_NONE: break; case SHADER_PARAM_CTRL_CHECKBOX: - if (window) - window->destroy(&control->checkbox); + { + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + if (window) + window->destroy(&control->checkbox); + } break; case SHADER_PARAM_CTRL_TRACKBAR: DestroyWindow(control->trackbar.label_title); @@ -224,20 +228,19 @@ void shader_dlg_params_reload(void) RECT parent_rect; int i, pos_x, pos_y; video_shader_ctx_t shader_info; - const ui_window_t *window = ui_companion_driver_get_window_ptr(); - + const ui_window_t *window = NULL; + shader_dlg_params_clear(); video_shader_driver_get_current_shader(&shader_info); - if (!shader_info.data) - return; - if (shader_info.data->num_parameters > GFX_MAX_PARAMETERS) + if (!shader_info.data || shader_info.data->num_parameters > GFX_MAX_PARAMETERS) return; - hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); - pos_y = g_shader_dlg.parameters_start_y; - pos_x = SHADER_DLG_CTRL_X; + window = ui_companion_driver_get_window_ptr(); + hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT); + pos_y = g_shader_dlg.parameters_start_y; + pos_x = SHADER_DLG_CTRL_X; for (i = 0; i < (int)shader_info.data->num_parameters; i++) { @@ -409,25 +412,28 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message, break; case WM_HSCROLL: - i = GetWindowLong((HWND)lparam, GWL_ID); - - if (i >= GFX_MAX_PARAMETERS) - break; - - if (g_shader_dlg.controls[i].type != SHADER_PARAM_CTRL_TRACKBAR) - break; - - pos = (int)SendMessage(g_shader_dlg.controls[i].trackbar.hwnd, TBM_GETPOS, 0, 0); - { video_shader_ctx_t shader_info; video_shader_driver_get_current_shader(&shader_info); + i = GetWindowLong((HWND)lparam, GWL_ID); - shader_info.data->parameters[i].current = - shader_info.data->parameters[i].minimum + pos * shader_info.data->parameters[i].step; + if (i >= GFX_MAX_PARAMETERS) + break; + + if (g_shader_dlg.controls[i].type != SHADER_PARAM_CTRL_TRACKBAR) + break; + + pos = (int)SendMessage(g_shader_dlg.controls[i].trackbar.hwnd, TBM_GETPOS, 0, 0); + + { + + shader_info.data->parameters[i].current = + shader_info.data->parameters[i].minimum + pos * shader_info.data->parameters[i].step; + } + + if (shader_info.data) + shader_dlg_refresh_trackbar_label(i, &shader_info); } - - shader_dlg_refresh_trackbar_label(i); break; } From a9c3837cdb5adb17e8d66b059b7d31b880364833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 17 Jan 2017 01:02:15 +0100 Subject: [PATCH 047/427] Display image thumbnail in the menu background selector --- menu/drivers/xmb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 79d066ba1c..ad1aabcfff 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -890,7 +890,7 @@ static void xmb_update_thumbnail_path(void *data, unsigned i) menu_entry_get(&entry, 0, i, NULL, true); - if (entry.type == FILE_TYPE_IMAGEVIEWER) + if (entry.type == FILE_TYPE_IMAGEVIEWER || entry.type == FILE_TYPE_IMAGE) { file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0); xmb_node_t *node = (xmb_node_t*) @@ -907,7 +907,7 @@ static void xmb_update_thumbnail_path(void *data, unsigned i) return; } } - else if (xmb_list_get_selection(xmb) == 0) + else if (xmb_list_get_selection(xmb) <= XMB_SYSTEM_TAB_SETTINGS) { xmb->thumbnail_file_path[0] = '\0'; xmb->thumbnail = 0; @@ -1095,7 +1095,7 @@ static void xmb_selection_pointer_changed( if (!string_is_equal(xmb_thumbnails_ident(), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)) - && (depth == 1 || xmb->categories.selection_ptr == 0)) + && (depth == 1 || xmb_list_get_selection(xmb) <= XMB_SYSTEM_TAB_SETTINGS)) { xmb_update_thumbnail_path(xmb, i); xmb_update_thumbnail_image(xmb); @@ -1273,7 +1273,7 @@ static void xmb_list_open_new(xmb_handle_t *xmb, xmb->old_depth = xmb->depth; menu_entries_ctl(MENU_ENTRIES_CTL_SET_START, &skip); - if (xmb_list_get_selection(xmb) == 0) + if (xmb_list_get_selection(xmb) <= XMB_SYSTEM_TAB_SETTINGS) xmb_update_thumbnail_path(xmb, 0); } From c283c1eaf429b34186c1f9a449b383d19f5cd6fb Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 19:26:19 -0500 Subject: [PATCH 048/427] disable shader dialog until video_threaded issues are fixed --- gfx/drivers/gl.c | 3 ++- media/rarch.rc | 3 ++- media/rarch_ja.rc | 3 ++- ui/drivers/ui_win32.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 160427cba2..5c42dcce36 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2330,7 +2330,8 @@ static bool gl_set_shader(void *data, gl_set_shader_viewport(gl, 1); context_bind_hw_render(true); #if defined(_WIN32) && !defined(_XBOX) - shader_dlg_params_reload(); + /* Shader dialog is disabled for now, until video_threaded issues are fixed. + shader_dlg_params_reload();*/ #endif #endif diff --git a/media/rarch.rc b/media/rarch.rc index 57758d4aec..5bad253138 100644 --- a/media/rarch.rc +++ b/media/rarch.rc @@ -69,7 +69,8 @@ IDR_MENU MENU MENUITEM "10x", ID_M_WINDOW_SCALE_10X } MENUITEM "Toggle Exclusive Full Screen", ID_M_FULL_SCREEN - MENUITEM "Shader Parameters", ID_M_SHADER_PARAMETERS + // Shader dialog is disabled for now, until video_threaded issues are fixed. + //MENUITEM "Shader Parameters", ID_M_SHADER_PARAMETERS } } diff --git a/media/rarch_ja.rc b/media/rarch_ja.rc index d479e651ad..45f5423ba5 100644 --- a/media/rarch_ja.rc +++ b/media/rarch_ja.rc @@ -65,7 +65,8 @@ IDR_MENU MENU MENUITEM "10x", ID_M_WINDOW_SCALE_10X } MENUITEM "”r‘¼“I‚ȃtƒ‹ƒXƒNƒŠ[ƒ“Ø‚è‘Ö‚¦", ID_M_FULL_SCREEN - MENUITEM "ƒVƒF[ƒ_[‚̃pƒ‰ƒ[ƒ^", ID_M_SHADER_PARAMETERS + // Shader dialog is disabled for now, until video_threaded issues are fixed. + //MENUITEM "ƒVƒF[ƒ_[‚̃pƒ‰ƒ[ƒ^", ID_M_SHADER_PARAMETERS } } diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 5e530da392..b83d23dcfd 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -467,8 +467,9 @@ bool win32_window_init(WNDCLASSEX *wndclass, if (class_name != NULL) return true; + /* Shader dialog is disabled for now, until video_threaded issues are fixed. if (!win32_shader_dlg_init()) - RARCH_ERR("[WGL]: wgl_shader_dlg_init() failed.\n"); + RARCH_ERR("[WGL]: wgl_shader_dlg_init() failed.\n");*/ return true; } From 05c37bd39fb27102055dac54b213af406adb0dd4 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 02:07:19 -0500 Subject: [PATCH 049/427] initial GDI driver skeleton --- Makefile.common | 5 + config.def.h | 4 + configuration.c | 4 + gfx/common/gdi_common.h | 26 ++ gfx/common/win32_common.cpp | 1 + gfx/drivers/gdi_gfx.c | 304 ++++++++++++++++++++++ gfx/drivers_context/gdi_ctx.cpp | 325 ++++++++++++++++++++++++ gfx/drivers_font/gdi_font.c | 133 ++++++++++ gfx/font_driver.c | 34 +++ gfx/font_driver.h | 4 +- gfx/video_context_driver.c | 3 + gfx/video_context_driver.h | 1 + gfx/video_driver.c | 3 + gfx/video_driver.h | 1 + griffin/griffin.c | 7 + menu/drivers_display/menu_display_gdi.c | 101 ++++++++ menu/menu_display.c | 7 + menu/menu_display.h | 4 +- 18 files changed, 965 insertions(+), 2 deletions(-) create mode 100644 gfx/common/gdi_common.h create mode 100644 gfx/drivers/gdi_gfx.c create mode 100644 gfx/drivers_context/gdi_ctx.cpp create mode 100644 gfx/drivers_font/gdi_font.c create mode 100644 menu/drivers_display/menu_display_gdi.c diff --git a/Makefile.common b/Makefile.common index 15374c1dca..e6b455f8a3 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1164,6 +1164,11 @@ ifneq ($(findstring Win32,$(OS)),) input/drivers_keyboard/keyboard_event_win32.o \ gfx/common/win32_common.o \ frontend/drivers/platform_win32.o + + OBJ += gfx/drivers/gdi_gfx.o \ + gfx/drivers_context/gdi_ctx.o \ + gfx/drivers_font/gdi_font.o \ + menu/drivers_display/menu_display_gdi.o endif ifeq ($(HAVE_AVFOUNDATION), 1) diff --git a/config.def.h b/config.def.h index dc5b14d610..28ed46adef 100644 --- a/config.def.h +++ b/config.def.h @@ -51,6 +51,8 @@ enum video_driver_enum VIDEO_EXYNOS, VIDEO_SUNXI, VIDEO_DISPMANX, + VIDEO_CACA, + VIDEO_GDI, VIDEO_NULL }; @@ -209,6 +211,8 @@ enum record_driver_enum #define VIDEO_DEFAULT_DRIVER VIDEO_SDL #elif defined(HAVE_SDL2) #define VIDEO_DEFAULT_DRIVER VIDEO_SDL2 +#elif defined(_WIN32) && !defined(_XBOX) +#define VIDEO_DEFAULT_DRIVER VIDEO_GDI #elif defined(HAVE_DYLIB) && !defined(ANDROID) #define VIDEO_DEFAULT_DRIVER VIDEO_EXT #else diff --git a/configuration.c b/configuration.c index 00edc333da..76d2271c77 100644 --- a/configuration.c +++ b/configuration.c @@ -310,6 +310,10 @@ const char *config_get_default_video(void) return "dispmanx"; case VIDEO_SUNXI: return "sunxi"; + case VIDEO_CACA: + return "caca"; + case VIDEO_GDI: + return "gdi"; case VIDEO_NULL: break; } diff --git a/gfx/common/gdi_common.h b/gfx/common/gdi_common.h new file mode 100644 index 0000000000..31334cfb74 --- /dev/null +++ b/gfx/common/gdi_common.h @@ -0,0 +1,26 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * copyright (c) 2011-2015 - Daniel De Matteis + * copyright (c) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#ifndef __GDI_COMMON_H +#define __GDI_COMMON_H + +typedef struct gdi +{ + bool test; +} gdi_t; + +#endif diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 2179dd7d17..7a8da43e08 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -57,6 +57,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam); extern "C" bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lParam); +extern void *dinput_gdi; extern void *dinput_wgl; extern void *dinput; diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c new file mode 100644 index 0000000000..2009aa0c0b --- /dev/null +++ b/gfx/drivers/gdi_gfx.c @@ -0,0 +1,304 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include + +#include "../../driver.h" +#include "../../configuration.h" +#include "../../verbosity.h" +#include "../../menu/menu_driver.h" +#include "../common/gdi_common.h" + +static unsigned char *gdi_menu_frame = NULL; +static unsigned gdi_menu_width = 0; +static unsigned gdi_menu_height = 0; +static unsigned gdi_menu_pitch = 0; +static unsigned gdi_video_width = 0; +static unsigned gdi_video_height = 0; +static unsigned gdi_video_pitch = 0; +static bool gdi_rgb32 = 0; + +static void gdi_gfx_free(void *data); + +static void gdi_gfx_create() +{ + if(!gdi_video_width || !gdi_video_height) + { + printf("***** GDI: no width or height!\n"); + } + + //video_driver_set_size(&gdi_video_width, &gdi_video_height); +} + +static void *gdi_gfx_init(const video_info_t *video, + const input_driver_t **input, void **input_data) +{ + settings_t *settings = config_get_ptr(); + gdi_t *gdi = (gdi_t*)calloc(1, sizeof(*gdi)); + + *input = NULL; + *input_data = NULL; + + gdi_video_width = video->width; + gdi_video_height = video->height; + gdi_rgb32 = video->rgb32; + + if (video->rgb32) + gdi_video_pitch = video->width * 4; + else + gdi_video_pitch = video->width * 2; + + gdi_gfx_create(); + + if (settings->video.font_enable) + font_driver_init_osd(NULL, false, FONT_DRIVER_RENDER_GDI); + + return gdi; +} + +static bool gdi_gfx_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, uint64_t frame_count, + unsigned pitch, const char *msg) +{ + const void *frame_to_copy = frame; + unsigned width = 0; + unsigned height = 0; + bool draw = true; + + (void)data; + (void)frame; + (void)frame_width; + (void)frame_height; + (void)pitch; + (void)msg; + + if (!frame || !frame_width || !frame_height) + return true; + + if (gdi_video_width != frame_width || gdi_video_height != frame_height || gdi_video_pitch != pitch) + { + if (frame_width > 4 && frame_height > 4) + { + gdi_video_width = frame_width; + gdi_video_height = frame_height; + gdi_video_pitch = pitch; + gdi_gfx_free(NULL); + gdi_gfx_create(); + } + } + + if (gdi_menu_frame) + frame_to_copy = gdi_menu_frame; + + //width = gdi_get_canvas_width(gdi_cv); + //height = gdi_get_canvas_height(gdi_cv); + width = frame_width; + height = frame_height; + + if (frame_to_copy == frame && frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) + draw = false; + +#ifdef HAVE_MENU + menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); +#endif + + if (msg) + font_driver_render_msg(NULL, msg, NULL); + + if (draw) + { + /*gdi_dither_bitmap(gdi_cv, 0, 0, + width, + height, + gdi_dither, frame_to_copy);*/ + } + + return true; +} + +static void gdi_gfx_set_nonblock_state(void *data, bool toggle) +{ + (void)data; + (void)toggle; +} + +static bool gdi_gfx_alive(void *data) +{ + (void)data; + video_driver_set_size(&gdi_video_width, &gdi_video_height); + return true; +} + +static bool gdi_gfx_focus(void *data) +{ + (void)data; + return true; +} + +static bool gdi_gfx_suppress_screensaver(void *data, bool enable) +{ + (void)data; + (void)enable; + return false; +} + +static bool gdi_gfx_has_windowed(void *data) +{ + (void)data; + return true; +} + +static void gdi_gfx_free(void *data) +{ + (void)data; + + if (gdi_menu_frame) + { + free(gdi_menu_frame); + gdi_menu_frame = NULL; + } +} + +static bool gdi_gfx_set_shader(void *data, + enum rarch_shader_type type, const char *path) +{ + (void)data; + (void)type; + (void)path; + + return false; +} + +static void gdi_gfx_set_rotation(void *data, + unsigned rotation) +{ + (void)data; + (void)rotation; +} + +static void gdi_gfx_viewport_info(void *data, + struct video_viewport *vp) +{ + (void)data; + (void)vp; +} + +static bool gdi_gfx_read_viewport(void *data, uint8_t *buffer) +{ + (void)data; + (void)buffer; + + return true; +} + +static void gdi_set_texture_frame(void *data, + const void *frame, bool rgb32, unsigned width, unsigned height, + float alpha) +{ + unsigned pitch = width * 2; + + if (rgb32) + pitch = width * 4; + + if (gdi_menu_frame) + { + free(gdi_menu_frame); + gdi_menu_frame = NULL; + } + + if (!gdi_menu_frame || gdi_menu_width != width || gdi_menu_height != height || gdi_menu_pitch != pitch) + if (pitch && height) + gdi_menu_frame = (unsigned char*)malloc(pitch * height); + + if (gdi_menu_frame && frame && pitch && height) + memcpy(gdi_menu_frame, frame, pitch * height); +} + +static void gdi_set_osd_msg(void *data, const char *msg, + const struct font_params *params, void *font) +{ + font_driver_render_msg(font, msg, params); +} + +static const video_poke_interface_t gdi_poke_interface = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#ifdef HAVE_FBO + NULL, +#else + NULL, +#endif + NULL, + NULL, + NULL, +#if defined(HAVE_MENU) + gdi_set_texture_frame, + NULL, + gdi_set_osd_msg, + NULL, +#else + NULL, + NULL, + NULL, + NULL, +#endif + + NULL, +#ifdef HAVE_MENU + NULL, +#endif +}; + +static void gdi_gfx_get_poke_interface(void *data, + const video_poke_interface_t **iface) +{ + (void)data; + *iface = &gdi_poke_interface; +} + +static void gdi_gfx_set_viewport(void *data, unsigned viewport_width, + unsigned viewport_height, bool force_full, bool allow_rotate) +{ +} + +video_driver_t video_gdi = { + gdi_gfx_init, + gdi_gfx_frame, + gdi_gfx_set_nonblock_state, + gdi_gfx_alive, + gdi_gfx_focus, + gdi_gfx_suppress_screensaver, + gdi_gfx_has_windowed, + gdi_gfx_set_shader, + gdi_gfx_free, + "gdi", + gdi_gfx_set_viewport, + gdi_gfx_set_rotation, + gdi_gfx_viewport_info, + gdi_gfx_read_viewport, + NULL, /* read_frame_raw */ + +#ifdef HAVE_OVERLAY + NULL, /* overlay_interface */ +#endif + gdi_gfx_get_poke_interface, +}; diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp new file mode 100644 index 0000000000..4ea4baadca --- /dev/null +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -0,0 +1,325 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +/* Win32/GDI context. */ + +/* necessary for mingw32 multimon defines: */ +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K +#endif + +#include +#include + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../../configuration.h" +#include "../../dynamic.h" +#include "../../runloop.h" +#include "../../verbosity.h" +#include "../video_context_driver.h" + +#include "../common/win32_common.h" + +static HDC win32_hdc; + +static unsigned win32_major = 0; +static unsigned win32_minor = 0; +static unsigned win32_interval = 0; +static enum gfx_ctx_api win32_api = GFX_CTX_NONE; + +void *dinput_gdi; + +/*static void setup_pixel_format(HDC hdc) +{ + PIXELFORMATDESCRIPTOR pfd = {0}; + pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cColorBits = 32; + pfd.cDepthBits = 0; + pfd.cStencilBits = 0; + pfd.iLayerType = PFD_MAIN_PLANE; + + SetPixelFormat(hdc, ChoosePixelFormat(hdc, &pfd), &pfd); +}*/ + +static void gfx_ctx_gdi_check_window(void *data, bool *quit, + bool *resize, unsigned *width, unsigned *height, unsigned frame_count) +{ + win32_check_window(quit, resize, width, height); +} + +static bool gfx_ctx_gdi_set_resize(void *data, + unsigned width, unsigned height) +{ + (void)data; + (void)width; + (void)height; + + switch (win32_api) + { + case GFX_CTX_NONE: + default: + break; + } + + return false; +} + +static void gfx_ctx_gdi_update_window_title(void *data) +{ + char buf[128]; + char buf_fps[128]; + settings_t *settings = config_get_ptr(); + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + + buf[0] = buf_fps[0] = '\0'; + + if (window && video_monitor_get_fps(buf, sizeof(buf), + buf_fps, sizeof(buf_fps))) + window->set_title(&main_window, buf); + if (settings->fps_show) + runloop_msg_queue_push(buf_fps, 1, 1, false); +} + +static void gfx_ctx_gdi_get_video_size(void *data, + unsigned *width, unsigned *height) +{ + (void)data; + HWND window = win32_get_window(); + + if (!window) + { + RECT mon_rect; + MONITORINFOEX current_mon; + unsigned mon_id = 0; + HMONITOR hm_to_use = NULL; + + win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); + mon_rect = current_mon.rcMonitor; + *width = mon_rect.right - mon_rect.left; + *height = mon_rect.bottom - mon_rect.top; + } + else + { + *width = g_resize_width; + *height = g_resize_height; + } +} + +static void *gfx_ctx_gdi_init(void *video_driver) +{ + WNDCLASSEX wndclass = {0}; + + (void)video_driver; + + if (g_inited) + return NULL; + + win32_window_reset(); + win32_monitor_init(); + + wndclass.lpfnWndProc = WndProcGL; + if (!win32_window_init(&wndclass, true, NULL)) + return NULL; + + switch (win32_api) + { + case GFX_CTX_NONE: + default: + break; + } + + return (void*)"gdi"; +} + +static void gfx_ctx_gdi_destroy(void *data) +{ + HWND window = win32_get_window(); + + (void)data; + + switch (win32_api) + { + case GFX_CTX_NONE: + default: + break; + } + + if (window && win32_hdc) + { + ReleaseDC(window, win32_hdc); + win32_hdc = NULL; + } + + if (window) + { + win32_monitor_from_window(); + win32_destroy_window(); + } + + if (g_restore_desktop) + { + win32_monitor_get_info(); + g_restore_desktop = false; + } + + g_inited = false; + win32_major = 0; + win32_minor = 0; +} + +static bool gfx_ctx_gdi_set_video_mode(void *data, + unsigned width, unsigned height, + bool fullscreen) +{ + if (!win32_set_video_mode(NULL, width, height, fullscreen)) + { + RARCH_ERR("[GDI]: win32_set_video_mode failed.\n"); + goto error; + } + + switch (win32_api) + { + case GFX_CTX_NONE: + default: + break; + } + + return true; + +error: + gfx_ctx_gdi_destroy(data); + return false; +} + + +static void gfx_ctx_gdi_input_driver(void *data, + const input_driver_t **input, void **input_data) +{ + (void)data; + + dinput_gdi = input_dinput.init(); + + *input = dinput_gdi ? &input_dinput : NULL; + *input_data = dinput_gdi; +} + +static bool gfx_ctx_gdi_has_focus(void *data) +{ + return win32_has_focus(); +} + +static bool gfx_ctx_gdi_suppress_screensaver(void *data, bool enable) +{ + return win32_suppress_screensaver(data, enable); +} + +static bool gfx_ctx_gdi_has_windowed(void *data) +{ + (void)data; + + return true; +} + +static bool gfx_ctx_gdi_get_metrics(void *data, + enum display_metric_types type, float *value) +{ + return win32_get_metrics(data, type, value); +} + +static bool gfx_ctx_gdi_bind_api(void *data, + enum gfx_ctx_api api, unsigned major, unsigned minor) +{ + (void)data; + + win32_major = major; + win32_minor = minor; + win32_api = api; + + return true; +} + +static void gfx_ctx_gdi_show_mouse(void *data, bool state) +{ + (void)data; + win32_show_cursor(state); +} + +static void gfx_ctx_gdi_swap_interval(void *data, unsigned interval) +{ + (void)data; + (void)interval; +} + +static void gfx_ctx_gdi_set_flags(void *data, uint32_t flags) +{ + (void)data; + (void)flags; +} + +static uint32_t gfx_ctx_gdi_get_flags(void *data) +{ + uint32_t flags = 0; + BIT32_SET(flags, GFX_CTX_FLAGS_NONE); + return flags; +} + +static void gfx_ctx_gdi_swap_buffers(void *data) +{ + (void)data; +} + +const gfx_ctx_driver_t gfx_ctx_gdi = { + gfx_ctx_gdi_init, + gfx_ctx_gdi_destroy, + gfx_ctx_gdi_bind_api, + gfx_ctx_gdi_swap_interval, + gfx_ctx_gdi_set_video_mode, + gfx_ctx_gdi_get_video_size, + NULL, /* get_video_output_size */ + NULL, /* get_video_output_prev */ + NULL, /* get_video_output_next */ + gfx_ctx_gdi_get_metrics, + NULL, + gfx_ctx_gdi_update_window_title, + gfx_ctx_gdi_check_window, + gfx_ctx_gdi_set_resize, + gfx_ctx_gdi_has_focus, + gfx_ctx_gdi_suppress_screensaver, + gfx_ctx_gdi_has_windowed, + gfx_ctx_gdi_swap_buffers, + gfx_ctx_gdi_input_driver, + NULL, + NULL, + NULL, + gfx_ctx_gdi_show_mouse, + "gdi", + gfx_ctx_gdi_get_flags, + gfx_ctx_gdi_set_flags, + NULL, + NULL, + NULL +}; + diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c new file mode 100644 index 0000000000..2ca5c627ec --- /dev/null +++ b/gfx/drivers_font/gdi_font.c @@ -0,0 +1,133 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../font_driver.h" +#include "../../configuration.h" +#include "../../verbosity.h" +#include "../common/gdi_common.h" + +typedef struct +{ + const font_renderer_driver_t *gdi_font_driver; + void *gdi_font_data; + gdi_t *gdi; +} gdi_raster_t; + +static void *gdi_init_font(void *data, + const char *font_path, float font_size) +{ + gdi_raster_t *font = (gdi_raster_t*)calloc(1, sizeof(*font)); + + if (!font) + return NULL; + + font->gdi = (gdi_t*)data; + + font_size = 1; + + if (!font_renderer_create_default((const void**)&font->gdi_font_driver, + &font->gdi_font_data, font_path, font_size)) + { + RARCH_WARN("Couldn't initialize font renderer.\n"); + return NULL; + } + + return font; +} + +static void gdi_render_free_font(void *data) +{ + +} + +static int gdi_get_message_width(void *data, const char *msg, + unsigned msg_len, float scale) +{ + return 0; +} + +static const struct font_glyph *gdi_font_get_glyph( + void *data, uint32_t code) +{ + return NULL; +} + +static void gdi_render_msg(void *data, const char *msg, + const void *userdata) +{ + gdi_raster_t *font = (gdi_raster_t*)data; + float x, y; + unsigned width = 0, height = 0; + unsigned newX, newY; + settings_t *settings = config_get_ptr(); + const struct font_params *params = (const struct font_params*)userdata; + + if (!font || string_is_empty(msg)) + return; + + if (params) + { + x = params->x; + y = params->y; + } + else + { + x = settings->video.msg_pos_x; + y = settings->video.msg_pos_y; + } + + if (!font->gdi) + return; + + newX = x * width; + newY = height - (y * height); + + if (strlen(msg) + newX > width) + newX -= strlen(msg) + newX - width; + + //gdi_put_str(*font->gdi->gdi_cv, newX, newY, msg); + + //gdi_refresh_display(*font->gdi->gdi_display); +} + +static void gdi_font_flush_block(void* data) +{ + (void)data; +} + +static void gdi_font_bind_block(void* data, void* userdata) +{ + (void)data; +} + +font_renderer_t gdi_font = { + gdi_init_font, + gdi_render_free_font, + gdi_render_msg, + "gdi font", + gdi_font_get_glyph, /* get_glyph */ + gdi_font_bind_block, /* bind_block */ + gdi_font_flush_block, /* flush */ + gdi_get_message_width /* get_message_width */ +}; diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 9b6900121f..5fd85f93d0 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -178,6 +178,35 @@ static bool caca_font_init_first( } #endif +#if defined(_WIN32) && !defined(_XBOX) +static const font_renderer_t *gdi_font_backends[] = { + &gdi_font, + NULL, +}; + +static bool gdi_font_init_first( + const void **font_driver, void **font_handle, + void *video_data, const char *font_path, float font_size) +{ + unsigned i; + + for (i = 0; gdi_font_backends[i]; i++) + { + void *data = gdi_font_backends[i]->init( + video_data, font_path, font_size); + + if (!data) + continue; + + *font_driver = gdi_font_backends[i]; + *font_handle = data; + return true; + } + + return false; +} +#endif + #ifdef HAVE_VULKAN static const font_renderer_t *vulkan_font_backends[] = { &vulkan_raster_font, @@ -301,6 +330,11 @@ static bool font_init_first( case FONT_DRIVER_RENDER_CACA: return caca_font_init_first(font_driver, font_handle, video_data, font_path, font_size); +#endif +#if defined(_WIN32) && !defined(_XBOX) + case FONT_DRIVER_RENDER_GDI: + return gdi_font_init_first(font_driver, font_handle, + video_data, font_path, font_size); #endif case FONT_DRIVER_RENDER_DONT_CARE: /* TODO/FIXME - lookup graphics driver's 'API' */ diff --git a/gfx/font_driver.h b/gfx/font_driver.h index 6d3e374780..f2484db51f 100644 --- a/gfx/font_driver.h +++ b/gfx/font_driver.h @@ -32,7 +32,8 @@ enum font_driver_render_api FONT_DRIVER_RENDER_VITA2D, FONT_DRIVER_RENDER_CTR, FONT_DRIVER_RENDER_VULKAN_API, - FONT_DRIVER_RENDER_CACA + FONT_DRIVER_RENDER_CACA, + FONT_DRIVER_RENDER_GDI }; enum text_alignment @@ -164,6 +165,7 @@ extern font_renderer_t vita2d_vita_font; extern font_renderer_t ctr_font; extern font_renderer_t vulkan_raster_font; extern font_renderer_t caca_font; +extern font_renderer_t gdi_font; extern font_renderer_driver_t stb_font_renderer; extern font_renderer_driver_t stb_unicode_font_renderer; diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index f1b114ee61..59e223224b 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -88,6 +88,9 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { #endif #if defined(HAVE_VULKAN) && defined(HAVE_VULKAN_DISPLAY) &gfx_ctx_khr_display, +#endif +#if defined(_WIN32) && !defined(_XBOX) + &gfx_ctx_gdi, #endif &gfx_ctx_null, NULL diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 3b78e72a0a..63426451e7 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -249,6 +249,7 @@ extern const gfx_ctx_driver_t gfx_ctx_cocoagl; extern const gfx_ctx_driver_t gfx_ctx_emscripten; extern const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev; extern const gfx_ctx_driver_t gfx_ctx_khr_display; +extern const gfx_ctx_driver_t gfx_ctx_gdi; extern const gfx_ctx_driver_t gfx_ctx_null; /** diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 30148ebd0c..ef7380267c 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -227,6 +227,9 @@ static const video_driver_t *video_drivers[] = { #ifdef HAVE_XSHM &video_xshm, #endif +#if defined(_WIN32) && !defined(_XBOX) + &video_gdi, +#endif #ifdef HAVE_CACA &video_caca, #endif diff --git a/gfx/video_driver.h b/gfx/video_driver.h index e6f83c1a21..6efb630b8b 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -563,6 +563,7 @@ extern video_driver_t video_sunxi; extern video_driver_t video_drm; extern video_driver_t video_xshm; extern video_driver_t video_caca; +extern video_driver_t video_gdi; extern video_driver_t video_null; extern const void *frame_cache_data; diff --git a/griffin/griffin.c b/griffin/griffin.c index 041d9b92c9..bd09df0a0a 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -402,6 +402,9 @@ FONTS #include "../gfx/drivers_font/caca_font.c" #endif +#if defined(_WIN32) && !defined(_XBOX) +#include "../gfx/drivers_font/gdi_font.c" +#endif #if defined(HAVE_VULKAN) #include "../gfx/drivers_font/vulkan_raster_font.c" @@ -994,6 +997,10 @@ MENU #include "../menu/drivers_display/menu_display_caca.c" #endif +#if defined(_WIN32) && !defined(_XBOX) +#include "../menu/drivers_display/menu_display_gdi.c" +#endif + #endif diff --git a/menu/drivers_display/menu_display_gdi.c b/menu/drivers_display/menu_display_gdi.c new file mode 100644 index 0000000000..18c804c22d --- /dev/null +++ b/menu/drivers_display/menu_display_gdi.c @@ -0,0 +1,101 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include + +#include +#include + +#include "../../config.def.h" +#include "../../gfx/font_driver.h" +#include "../../gfx/video_context_driver.h" + +#include "../menu_display.h" + +static void *menu_display_gdi_get_default_mvp(void) +{ + return NULL; +} + +static void menu_display_gdi_blend_begin(void) +{ +} + +static void menu_display_gdi_blend_end(void) +{ +} + +static void menu_display_gdi_draw(void *data) +{ + (void)data; +} + +static void menu_display_gdi_draw_pipeline(void *data) +{ + (void)data; +} + +static void menu_display_gdi_viewport(void *data) +{ + (void)data; +} + +static void menu_display_gdi_restore_clear_color(void) +{ +} + +static void menu_display_gdi_clear_color(menu_display_ctx_clearcolor_t *clearcolor) +{ + (void)clearcolor; +} + +static bool menu_display_gdi_font_init_first( + void **font_handle, void *video_data, + const char *font_path, float font_size) +{ + font_data_t **handle = (font_data_t**)font_handle; + *handle = font_driver_init_first(video_data, + font_path, font_size, true, FONT_DRIVER_RENDER_GDI); + return *handle; +} + +static const float *menu_display_gdi_get_default_vertices(void) +{ + static float dummy[16] = {0.0f}; + return &dummy[0]; +} + +static const float *menu_display_gdi_get_default_tex_coords(void) +{ + static float dummy[16] = {0.0f}; + return &dummy[0]; +} + +menu_display_ctx_driver_t menu_display_ctx_gdi = { + menu_display_gdi_draw, + menu_display_gdi_draw_pipeline, + menu_display_gdi_viewport, + menu_display_gdi_blend_begin, + menu_display_gdi_blend_end, + menu_display_gdi_restore_clear_color, + menu_display_gdi_clear_color, + menu_display_gdi_get_default_mvp, + menu_display_gdi_get_default_vertices, + menu_display_gdi_get_default_tex_coords, + menu_display_gdi_font_init_first, + MENU_VIDEO_DRIVER_GDI, + "menu_display_gdi", +}; diff --git a/menu/menu_display.c b/menu/menu_display.c index d2eaf151e0..6e45e1fbc7 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -82,6 +82,9 @@ static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = { #endif #ifdef HAVE_CACA &menu_display_ctx_caca, +#endif +#if defined(_WIN32) && !defined(_XBOX) + &menu_display_ctx_gdi, #endif &menu_display_ctx_null, NULL, @@ -140,6 +143,10 @@ static bool menu_display_check_compatibility( if (string_is_equal(video_driver, "caca")) return true; break; + case MENU_VIDEO_DRIVER_GDI: + if (string_is_equal(video_driver, "gdi")) + return true; + break; } return false; diff --git a/menu/menu_display.h b/menu/menu_display.h index d58c00df12..6e7faa5c42 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -95,7 +95,8 @@ enum menu_display_driver_type MENU_VIDEO_DRIVER_DIRECT3D, MENU_VIDEO_DRIVER_VITA2D, MENU_VIDEO_DRIVER_CTR, - MENU_VIDEO_DRIVER_CACA + MENU_VIDEO_DRIVER_CACA, + MENU_VIDEO_DRIVER_GDI }; typedef struct menu_display_ctx_clearcolor @@ -294,6 +295,7 @@ extern menu_display_ctx_driver_t menu_display_ctx_d3d; extern menu_display_ctx_driver_t menu_display_ctx_vita2d; extern menu_display_ctx_driver_t menu_display_ctx_ctr; extern menu_display_ctx_driver_t menu_display_ctx_caca; +extern menu_display_ctx_driver_t menu_display_ctx_gdi; extern menu_display_ctx_driver_t menu_display_ctx_null; RETRO_END_DECLS From e6d7116da0edc020d97ad1809893e41e8c40eabe Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 14:03:01 -0500 Subject: [PATCH 050/427] create GDI window --- gfx/common/gdi_common.h | 2 +- gfx/drivers/gdi_gfx.c | 85 ++++++++++++++++++++++++++++++++++++++ gfx/video_context_driver.h | 3 +- 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/gfx/common/gdi_common.h b/gfx/common/gdi_common.h index 31334cfb74..b4acb0afb5 100644 --- a/gfx/common/gdi_common.h +++ b/gfx/common/gdi_common.h @@ -20,7 +20,7 @@ typedef struct gdi { - bool test; + WNDCLASSEX wndclass; } gdi_t; #endif diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 2009aa0c0b..afac35945f 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -47,8 +47,12 @@ static void gdi_gfx_create() static void *gdi_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { + unsigned full_x, full_y; settings_t *settings = config_get_ptr(); gdi_t *gdi = (gdi_t*)calloc(1, sizeof(*gdi)); + const gfx_ctx_driver_t *ctx_driver = NULL; + gfx_ctx_input_t inp; + gfx_ctx_mode_t mode; *input = NULL; *input_data = NULL; @@ -64,10 +68,91 @@ static void *gdi_gfx_init(const video_info_t *video, gdi_gfx_create(); + ctx_driver = video_context_driver_init_first(gdi, + settings->video.context_driver, + GFX_CTX_GDI_API, 1, 0, false); + if (!ctx_driver) + goto error; + + video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); + +#ifdef HAVE_WINDOW + win32_window_init(&gdi->wndclass, true, NULL); +#endif + +#ifdef HAVE_MONITOR + bool windowed_full; + RECT mon_rect; + MONITORINFOEX current_mon; + HMONITOR hm_to_use; + + win32_monitor_info(¤t_mon, &hm_to_use, &d3d->cur_mon_id); + mon_rect = current_mon.rcMonitor; + g_resize_width = video->width; + g_resize_height = video->height; + + windowed_full = settings->video.windowed_fullscreen; + + full_x = (windowed_full || video->width == 0) ? + (mon_rect.right - mon_rect.left) : video->width; + full_y = (windowed_full || video->height == 0) ? + (mon_rect.bottom - mon_rect.top) : video->height; + RARCH_LOG("[GDI]: Monitor size: %dx%d.\n", + (int)(mon_rect.right - mon_rect.left), + (int)(mon_rect.bottom - mon_rect.top)); +#else + { + video_context_driver_get_video_size(&mode); + + full_x = mode.width; + full_y = mode.height; + } +#endif + { + unsigned new_width = video->fullscreen ? full_x : video->width; + unsigned new_height = video->fullscreen ? full_y : video->height; + mode.width = new_width; + mode.height = new_height; + mode.fullscreen = video->fullscreen; + + video_context_driver_set_video_mode(&mode); + video_driver_set_size(&new_width, &new_height); + } + +#ifdef HAVE_WINDOW + DWORD style; + unsigned win_width, win_height; + RECT rect = {0}; + + video_driver_get_size(&win_width, &win_height); + + win32_set_style(¤t_mon, &hm_to_use, &win_width, &win_height, + video->fullscreen, windowed_full, &rect, &mon_rect, &style); + + win32_window_create(gdi, style, &mon_rect, win_width, + win_height, video->fullscreen); + + win32_set_window(&win_width, &win_height, video->fullscreen, + windowed_full, &rect); +#endif + if (settings->video.font_enable) font_driver_init_osd(NULL, false, FONT_DRIVER_RENDER_GDI); + inp.input = input; + inp.input_data = input_data; + + video_context_driver_input_driver(&inp); + + RARCH_LOG("[GDI]: Init complete.\n"); + return gdi; + +error: + video_context_driver_destroy(); + if (gdi) + free(gdi); + return NULL; } static bool gdi_gfx_frame(void *data, const void *frame, diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 63426451e7..55a150c177 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -37,7 +37,8 @@ enum gfx_ctx_api GFX_CTX_DIRECT3D8_API, GFX_CTX_DIRECT3D9_API, GFX_CTX_OPENVG_API, - GFX_CTX_VULKAN_API + GFX_CTX_VULKAN_API, + GFX_CTX_GDI_API }; enum display_metric_types From 2c6a24653cad173d0fc6d9be8c21c5c48e1db1d6 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 14:36:32 -0500 Subject: [PATCH 051/427] testing --- gfx/drivers/gdi_gfx.c | 103 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 95 insertions(+), 8 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index afac35945f..7686be526a 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -53,6 +53,8 @@ static void *gdi_gfx_init(const video_info_t *video, const gfx_ctx_driver_t *ctx_driver = NULL; gfx_ctx_input_t inp; gfx_ctx_mode_t mode; + unsigned win_width = 0, win_height = 0; + unsigned temp_width = 0, temp_height = 0; *input = NULL; *input_data = NULL; @@ -76,7 +78,9 @@ static void *gdi_gfx_init(const video_info_t *video, video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); -#ifdef HAVE_WINDOW + RARCH_LOG("Found GDI context: %s\n", ctx_driver->ident); + +/*#ifdef HAVE_WINDOW win32_window_init(&gdi->wndclass, true, NULL); #endif @@ -135,15 +139,60 @@ static void *gdi_gfx_init(const video_info_t *video, win32_set_window(&win_width, &win_height, video->fullscreen, windowed_full, &rect); #endif +*/ - if (settings->video.font_enable) - font_driver_init_osd(NULL, false, FONT_DRIVER_RENDER_GDI); + video_context_driver_get_video_size(&mode); + + full_x = mode.width; + full_y = mode.height; + mode.width = 0; + mode.height = 0; + + RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); + + win_width = video->width; + win_height = video->height; + + if (video->fullscreen && (win_width == 0) && (win_height == 0)) + { + win_width = full_x; + win_height = full_y; + } + + mode.width = win_width; + mode.height = win_height; + mode.fullscreen = video->fullscreen; + + if (!video_context_driver_set_video_mode(&mode)) + goto error; + + mode.width = 0; + mode.height = 0; + + video_context_driver_get_video_size(&mode); + + temp_width = mode.width; + temp_height = mode.height; + mode.width = 0; + mode.height = 0; + + /* Get real known video size, which might have been altered by context. */ + + if (temp_width != 0 && temp_height != 0) + video_driver_set_size(&temp_width, &temp_height); + + video_driver_get_size(&temp_width, &temp_height); + + RARCH_LOG("GDI: Using resolution %ux%u\n", temp_width, temp_height); inp.input = input; inp.input_data = input_data; video_context_driver_input_driver(&inp); + if (settings->video.font_enable) + font_driver_init_osd(NULL, false, FONT_DRIVER_RENDER_GDI); + RARCH_LOG("[GDI]: Init complete.\n"); return gdi; @@ -249,13 +298,20 @@ static bool gdi_gfx_has_windowed(void *data) static void gdi_gfx_free(void *data) { - (void)data; + gdi_t *gdi = (gdi_t*)data; if (gdi_menu_frame) { free(gdi_menu_frame); gdi_menu_frame = NULL; } + + if (!gdi) + return; + + font_driver_free_osd(); + video_context_driver_free(); + free(gdi); } static bool gdi_gfx_set_shader(void *data, @@ -319,14 +375,45 @@ static void gdi_set_osd_msg(void *data, const char *msg, font_driver_render_msg(font, msg, params); } +static void gdi_get_video_output_size(void *data, + unsigned *width, unsigned *height) +{ + gfx_ctx_size_t size_data; + size_data.width = width; + size_data.height = height; + video_context_driver_get_video_output_size(&size_data); +} + +static void gdi_get_video_output_prev(void *data) +{ + video_context_driver_get_video_output_prev(); +} + +static void gdi_get_video_output_next(void *data) +{ + video_context_driver_get_video_output_next(); +} + +static void gdi_set_video_mode(void *data, unsigned width, unsigned height, + bool fullscreen) +{ + gfx_ctx_mode_t mode; + + mode.width = width; + mode.height = height; + mode.fullscreen = fullscreen; + + video_context_driver_set_video_mode(&mode); +} + static const video_poke_interface_t gdi_poke_interface = { NULL, NULL, + gdi_set_video_mode, NULL, - NULL, - NULL, - NULL, - NULL, + gdi_get_video_output_size, + gdi_get_video_output_prev, + gdi_get_video_output_next, #ifdef HAVE_FBO NULL, #else From a7a1f093c0db373579f5cda0e8b1a9b02cd18cd1 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 22:57:00 -0500 Subject: [PATCH 052/427] add GDI message loop --- gfx/common/win32_common.cpp | 61 ++++++++++++++++++++++++++++++--- gfx/common/win32_common.h | 3 ++ gfx/drivers_context/gdi_ctx.cpp | 2 +- 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 7a8da43e08..d7f5607e53 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -510,6 +510,50 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, return DefWindowProc(hwnd, message, wparam, lparam); } +LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, + WPARAM wparam, LPARAM lparam) +{ + LRESULT ret; + bool quit = false; + + if (message == WM_NCLBUTTONDBLCLK) + doubleclick_on_titlebar = true; + + switch (message) + { + case WM_DROPFILES: + case WM_SYSCOMMAND: + case WM_CHAR: + case WM_KEYDOWN: + case WM_KEYUP: + case WM_SYSKEYUP: + case WM_SYSKEYDOWN: + case WM_CLOSE: + case WM_DESTROY: + case WM_QUIT: + case WM_SIZE: + case WM_COMMAND: + ret = WndProcCommon(&quit, hwnd, message, wparam, lparam); + if (quit) + return ret; + break; + case WM_CREATE: + { + ui_window_win32_t win32_window; + win32_window.hwnd = hwnd; + + g_inited = true; + + ui_window_win32_set_droppable(&win32_window, true); + } + return 0; + } + + if (dinput_gdi && dinput_handle_message(dinput_gdi, message, wparam, lparam)) + return 0; + return DefWindowProc(hwnd, message, wparam, lparam); +} + bool win32_window_create(void *data, unsigned style, RECT *mon_rect, unsigned width, unsigned height, bool fullscreen) @@ -781,6 +825,7 @@ bool win32_set_video_mode(void *data, RECT rect = {0}; HMONITOR hm_to_use = NULL; settings_t *settings = config_get_ptr(); + int res = 0; win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); @@ -798,11 +843,19 @@ bool win32_set_video_mode(void *data, win32_set_window(&width, &height, fullscreen, windowed_full, &rect); - /* Wait until context is created (or failed to do so ...) */ - while (!g_inited && !g_quit && GetMessage(&msg, main_window.hwnd, 0, 0)) + /* Wait until context is created (or failed to do so ...). + * Please don't remove the (res = ) as GetMessage can return -1. */ + while (!g_inited && !g_quit && (res = GetMessage(&msg, main_window.hwnd, 0, 0)) != 0) { - TranslateMessage(&msg); - DispatchMessage(&msg); + if (res == -1) + { + RARCH_ERR("GetMessage error code %d\n", GetLastError()); + } + else + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } } if (g_quit) diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 6e41231600..b1d7542f74 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -111,6 +111,9 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); +LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, + WPARAM wparam, LPARAM lparam); + #ifdef _XBOX BOOL IsIconic(HWND hwnd); #endif diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 4ea4baadca..61a3b0973e 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -140,7 +140,7 @@ static void *gfx_ctx_gdi_init(void *video_driver) win32_window_reset(); win32_monitor_init(); - wndclass.lpfnWndProc = WndProcGL; + wndclass.lpfnWndProc = WndProcGDI; if (!win32_window_init(&wndclass, true, NULL)) return NULL; From 33520fca6f877b751971c63740597a5c5f2a8e1d Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 23:13:08 -0500 Subject: [PATCH 053/427] set win32_hdc for gdi --- gfx/common/win32_common.cpp | 2 +- gfx/common/win32_common.h | 1 + gfx/drivers_context/gdi_ctx.cpp | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index d7f5607e53..05beed2ea6 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -542,7 +542,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, ui_window_win32_t win32_window; win32_window.hwnd = hwnd; - g_inited = true; + create_gdi_context(hwnd, &g_quit); ui_window_win32_set_droppable(&win32_window, true); } diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index b1d7542f74..c35306a0c3 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -51,6 +51,7 @@ void win32_monitor_get_info(void); void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id); void create_graphics_context(HWND hwnd, bool *quit); +void create_gdi_context(HWND hwnd, bool *quit); bool win32_shader_dlg_init(void); void shader_dlg_show(HWND parent_hwnd); diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 61a3b0973e..a71e63ab26 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -291,6 +291,13 @@ static void gfx_ctx_gdi_swap_buffers(void *data) (void)data; } +void create_gdi_context(HWND hwnd, bool *quit) +{ + (void)quit; + win32_hdc = GetDC(hwnd); + g_inited = true; +} + const gfx_ctx_driver_t gfx_ctx_gdi = { gfx_ctx_gdi_init, gfx_ctx_gdi_destroy, From fb7c3f4c37c58727444928f7dade6e88d49a5150 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 23:30:37 -0500 Subject: [PATCH 054/427] set pixel format for GDI driver --- gfx/drivers_context/gdi_ctx.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index a71e63ab26..3a8706e0d1 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -49,12 +49,12 @@ static enum gfx_ctx_api win32_api = GFX_CTX_NONE; void *dinput_gdi; -/*static void setup_pixel_format(HDC hdc) +static void setup_pixel_format(HDC hdc) { PIXELFORMATDESCRIPTOR pfd = {0}; pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); pfd.nVersion = 1; - pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits = 32; pfd.cDepthBits = 0; @@ -62,7 +62,7 @@ void *dinput_gdi; pfd.iLayerType = PFD_MAIN_PLANE; SetPixelFormat(hdc, ChoosePixelFormat(hdc, &pfd), &pfd); -}*/ +} static void gfx_ctx_gdi_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height, unsigned frame_count) @@ -295,6 +295,9 @@ void create_gdi_context(HWND hwnd, bool *quit) { (void)quit; win32_hdc = GetDC(hwnd); + + setup_pixel_format(win32_hdc); + g_inited = true; } From bc8f9f7f3fb4aedf2c307a7133aa1834d6ad0fc6 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 23:35:13 -0500 Subject: [PATCH 055/427] add SwapBuffers() for gdi --- gfx/drivers_context/gdi_ctx.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 3a8706e0d1..4d93578a38 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -289,6 +289,8 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) static void gfx_ctx_gdi_swap_buffers(void *data) { (void)data; + + SwapBuffers(win32_hdc); } void create_gdi_context(HWND hwnd, bool *quit) From 6df175bd31768f1c594336a945a49179de87f015 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 4 Jan 2017 23:50:59 -0500 Subject: [PATCH 056/427] GDI paint test --- gfx/common/win32_common.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 05beed2ea6..8337d1f179 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -521,6 +521,12 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, switch (message) { + case WM_PAINT: + PAINTSTRUCT ps; + HDC hdc = BeginPaint(hwnd, &ps); + TextOut(hdc, 0, 0, "Hello, Windows!", 15); + EndPaint(hwnd, &ps); + break; case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: From 49d7be98139b22b802f02380851b72566d30c85e Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 5 Jan 2017 17:21:13 -0500 Subject: [PATCH 057/427] MSVC GDI buildfix --- gfx/common/win32_common.cpp | 17 +++++++++---- gfx/common/win32_common.h | 7 +++++- gfx/drivers/gdi_gfx.c | 12 +++++++++- gfx/drivers_context/gdi_ctx.cpp | 42 ++++++++++++++++----------------- griffin/griffin.c | 5 +++- griffin/griffin_cpp.cpp | 4 ++++ 6 files changed, 59 insertions(+), 28 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 8337d1f179..4adff55e2f 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -515,6 +515,10 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, { LRESULT ret; bool quit = false; + PAINTSTRUCT ps; + HDC hdc; + RECT rc; + POINT aptStar[6] = {50,2, 2,98, 98,33, 2,33, 98,98, 50,2}; if (message == WM_NCLBUTTONDBLCLK) doubleclick_on_titlebar = true; @@ -522,11 +526,15 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, switch (message) { case WM_PAINT: - PAINTSTRUCT ps; - HDC hdc = BeginPaint(hwnd, &ps); - TextOut(hdc, 0, 0, "Hello, Windows!", 15); + hdc = BeginPaint(hwnd, &ps); + //TextOut(hdc, 0, 0, "Hello, Windows!", 15); + GetClientRect(hwnd, &rc); + SetMapMode(hdc, MM_ANISOTROPIC); + SetWindowExtEx(hdc, 100, 100, NULL); + SetViewportExtEx(hdc, rc.right, rc.bottom, NULL); + Polyline(hdc, aptStar, 6); EndPaint(hwnd, &ps); - break; + return 0L; case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: @@ -856,6 +864,7 @@ bool win32_set_video_mode(void *data, if (res == -1) { RARCH_ERR("GetMessage error code %d\n", GetLastError()); + break; } else { diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index c35306a0c3..37dbd6efbc 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -85,7 +85,13 @@ bool win32_get_metrics(void *data, void win32_show_cursor(bool state); +#ifdef __cplusplus +extern "C" { +#endif HWND win32_get_window(void); +#ifdef __cplusplus +} +#endif bool win32_has_focus(void); @@ -96,7 +102,6 @@ void win32_set_window(unsigned *width, unsigned *height, bool fullscreen, bool windowed_full, void *rect_data); #ifndef _XBOX -/* FIXME: It should not be necessary to add the W after MONITORINFOEX, but linking fails without it. */ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use, unsigned *width, unsigned *height, bool fullscreen, bool windowed_full, RECT *rect, RECT *mon_rect, DWORD *style); diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 7686be526a..93ff82e2fc 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -23,6 +23,10 @@ #include "../../menu/menu_driver.h" #include "../common/gdi_common.h" +#if defined(_WIN32) && !defined(_XBOX) +#include "../common/win32_common.h" +#endif + static unsigned char *gdi_menu_frame = NULL; static unsigned gdi_menu_width = 0; static unsigned gdi_menu_height = 0; @@ -212,8 +216,8 @@ static bool gdi_gfx_frame(void *data, const void *frame, unsigned width = 0; unsigned height = 0; bool draw = true; + gdi_t *gdi = (gdi_t*)data; - (void)data; (void)frame; (void)frame_width; (void)frame_height; @@ -253,6 +257,10 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(NULL, msg, NULL); + video_context_driver_update_window_title(); + + video_context_driver_swap_buffers(); + if (draw) { /*gdi_dither_bitmap(gdi_cv, 0, 0, @@ -261,6 +269,8 @@ static bool gdi_gfx_frame(void *data, const void *frame, gdi_dither, frame_to_copy);*/ } + //UpdateWindow(win32_get_window()); + return true; } diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 4d93578a38..a2a8c12abb 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -40,16 +40,16 @@ #include "../common/win32_common.h" -static HDC win32_hdc; +static HDC win32_gdi_hdc; -static unsigned win32_major = 0; -static unsigned win32_minor = 0; -static unsigned win32_interval = 0; -static enum gfx_ctx_api win32_api = GFX_CTX_NONE; +static unsigned win32_gdi_major = 0; +static unsigned win32_gdi_minor = 0; +static unsigned win32_gdi_interval = 0; +static enum gfx_ctx_api win32_gdi_api = GFX_CTX_NONE; void *dinput_gdi; -static void setup_pixel_format(HDC hdc) +static void setup_gdi_pixel_format(HDC hdc) { PIXELFORMATDESCRIPTOR pfd = {0}; pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); @@ -77,7 +77,7 @@ static bool gfx_ctx_gdi_set_resize(void *data, (void)width; (void)height; - switch (win32_api) + switch (win32_gdi_api) { case GFX_CTX_NONE: default: @@ -144,7 +144,7 @@ static void *gfx_ctx_gdi_init(void *video_driver) if (!win32_window_init(&wndclass, true, NULL)) return NULL; - switch (win32_api) + switch (win32_gdi_api) { case GFX_CTX_NONE: default: @@ -160,17 +160,17 @@ static void gfx_ctx_gdi_destroy(void *data) (void)data; - switch (win32_api) + switch (win32_gdi_api) { case GFX_CTX_NONE: default: break; } - if (window && win32_hdc) + if (window && win32_gdi_hdc) { - ReleaseDC(window, win32_hdc); - win32_hdc = NULL; + ReleaseDC(window, win32_gdi_hdc); + win32_gdi_hdc = NULL; } if (window) @@ -186,8 +186,8 @@ static void gfx_ctx_gdi_destroy(void *data) } g_inited = false; - win32_major = 0; - win32_minor = 0; + win32_gdi_major = 0; + win32_gdi_minor = 0; } static bool gfx_ctx_gdi_set_video_mode(void *data, @@ -200,7 +200,7 @@ static bool gfx_ctx_gdi_set_video_mode(void *data, goto error; } - switch (win32_api) + switch (win32_gdi_api) { case GFX_CTX_NONE: default: @@ -254,9 +254,9 @@ static bool gfx_ctx_gdi_bind_api(void *data, { (void)data; - win32_major = major; - win32_minor = minor; - win32_api = api; + win32_gdi_major = major; + win32_gdi_minor = minor; + win32_gdi_api = api; return true; } @@ -290,15 +290,15 @@ static void gfx_ctx_gdi_swap_buffers(void *data) { (void)data; - SwapBuffers(win32_hdc); + SwapBuffers(win32_gdi_hdc); } void create_gdi_context(HWND hwnd, bool *quit) { (void)quit; - win32_hdc = GetDC(hwnd); + win32_gdi_hdc = GetDC(hwnd); - setup_pixel_format(win32_hdc); + setup_gdi_pixel_format(win32_gdi_hdc); g_inited = true; } diff --git a/griffin/griffin.c b/griffin/griffin.c index bd09df0a0a..8a2942388b 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -221,7 +221,6 @@ VIDEO CONTEXT #endif - /*============================================================ VIDEO SHADERS ============================================================ */ @@ -358,6 +357,10 @@ VIDEO DRIVER #endif #include "../gfx/drivers/nullgfx.c" +#if defined(_WIN32) && !defined(_XBOX) +#include "../gfx/drivers/gdi_gfx.c" +#endif + /*============================================================ FONTS ============================================================ */ diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index 0207179676..e01399c174 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -115,6 +115,10 @@ UI COMMON CONTEXT #include "../gfx/drivers_context/wgl_ctx.cpp" #endif +#if defined(_WIN32) && !defined(_XBOX) +#include "../gfx/drivers_context/gdi_ctx.cpp" +#endif + #if defined(HAVE_FFMPEG) #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES3) #include "../cores/libretro-ffmpeg/fft/fft.cpp" From dd2778fb3289b9829d7f91e400aefd82e153be0a Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 5 Jan 2017 22:17:48 -0500 Subject: [PATCH 058/427] GDI text testing --- gfx/common/win32_common.cpp | 14 -------------- gfx/drivers_font/gdi_font.c | 23 +++++++++++++++++++---- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 4adff55e2f..82af6fe650 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -515,26 +515,12 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, { LRESULT ret; bool quit = false; - PAINTSTRUCT ps; - HDC hdc; - RECT rc; - POINT aptStar[6] = {50,2, 2,98, 98,33, 2,33, 98,98, 50,2}; if (message == WM_NCLBUTTONDBLCLK) doubleclick_on_titlebar = true; switch (message) { - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - //TextOut(hdc, 0, 0, "Hello, Windows!", 15); - GetClientRect(hwnd, &rc); - SetMapMode(hdc, MM_ANISOTROPIC); - SetWindowExtEx(hdc, 100, 100, NULL); - SetViewportExtEx(hdc, rc.right, rc.bottom, NULL); - Polyline(hdc, aptStar, 6); - EndPaint(hwnd, &ps); - return 0L; case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index 2ca5c627ec..e7ae5a74a1 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -17,6 +17,7 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -26,6 +27,10 @@ #include "../../configuration.h" #include "../../verbosity.h" #include "../common/gdi_common.h" +#include "../common/win32_common.h" + +#include +#include typedef struct { @@ -82,6 +87,8 @@ static void gdi_render_msg(void *data, const char *msg, unsigned newX, newY; settings_t *settings = config_get_ptr(); const struct font_params *params = (const struct font_params*)userdata; + HDC hdc; + HWND hwnd = win32_get_window(); if (!font || string_is_empty(msg)) return; @@ -100,15 +107,23 @@ static void gdi_render_msg(void *data, const char *msg, if (!font->gdi) return; - newX = x * width; - newY = height - (y * height); + newX = x;//x * width; + newY = y;//height - (y * height); - if (strlen(msg) + newX > width) - newX -= strlen(msg) + newX - width; + //if (strlen(msg) + newX > width) + // newX -= strlen(msg) + newX - width; //gdi_put_str(*font->gdi->gdi_cv, newX, newY, msg); //gdi_refresh_display(*font->gdi->gdi_display); + + printf("drawing text: %s at %d x %d\n", msg, newX, newY); + + hdc = GetDC(hwnd); + TextOut(hdc, newX, newY, msg, utf8len(msg)); + ReleaseDC(hwnd, hdc); + + UpdateWindow(hwnd); } static void gdi_font_flush_block(void* data) From 177d8114754fd67b9c9079cf53cdc8dab4f77f04 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 6 Jan 2017 19:55:28 -0500 Subject: [PATCH 059/427] GDI driver partially visible with RGUI/game now, need to figure out why it isn't totally visible. Also need to stretch the frame, swap red/blue and flip vertically. --- gfx/drivers/gdi_gfx.c | 38 ++++++++++++++++++++++++++----------- gfx/drivers_font/gdi_font.c | 18 +++++------------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 93ff82e2fc..20804a772a 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -34,6 +34,7 @@ static unsigned gdi_menu_pitch = 0; static unsigned gdi_video_width = 0; static unsigned gdi_video_height = 0; static unsigned gdi_video_pitch = 0; +static unsigned gdi_video_bits = 0; static bool gdi_rgb32 = 0; static void gdi_gfx_free(void *data); @@ -67,6 +68,8 @@ static void *gdi_gfx_init(const video_info_t *video, gdi_video_height = video->height; gdi_rgb32 = video->rgb32; + gdi_video_bits = video->rgb32 ? 32 : 16; + if (video->rgb32) gdi_video_pitch = video->width * 4; else @@ -141,7 +144,7 @@ static void *gdi_gfx_init(const video_info_t *video, win_height, video->fullscreen); win32_set_window(&win_width, &win_height, video->fullscreen, - windowed_full, &rect); + windowed_full, &rect); #endif */ @@ -218,12 +221,6 @@ static bool gdi_gfx_frame(void *data, const void *frame, bool draw = true; gdi_t *gdi = (gdi_t*)data; - (void)frame; - (void)frame_width; - (void)frame_height; - (void)pitch; - (void)msg; - if (!frame || !frame_width || !frame_height) return true; @@ -257,18 +254,37 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(NULL, msg, NULL); - video_context_driver_update_window_title(); - - video_context_driver_swap_buffers(); - if (draw) { /*gdi_dither_bitmap(gdi_cv, 0, 0, width, height, gdi_dither, frame_to_copy);*/ + unsigned win_width, win_height; + HWND hwnd = win32_get_window(); + HDC dc = GetDC(hwnd); + BITMAPINFO info; + + video_driver_get_size(&win_width, &win_height); + + ZeroMemory(&info, sizeof(BITMAPINFO)); + info.bmiHeader.biBitCount = gdi_video_bits; + info.bmiHeader.biWidth = width; + info.bmiHeader.biHeight = height; + info.bmiHeader.biPlanes = 1; + info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + info.bmiHeader.biSizeImage = pitch * height; + info.bmiHeader.biCompression = BI_RGB; + + StretchDIBits(dc, 0, 0, win_width, win_height, 0, 0, width, height, + frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); + ReleaseDC(hwnd, dc); } + video_context_driver_update_window_title(); + + video_context_driver_swap_buffers(); + //UpdateWindow(win32_get_window()); return true; diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index e7ae5a74a1..b1f2cab663 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -24,6 +24,7 @@ #endif #include "../font_driver.h" +#include "../video_driver.h" #include "../../configuration.h" #include "../../verbosity.h" #include "../common/gdi_common.h" @@ -93,6 +94,8 @@ static void gdi_render_msg(void *data, const char *msg, if (!font || string_is_empty(msg)) return; + video_driver_get_size(&width, &height); + if (params) { x = params->x; @@ -107,23 +110,12 @@ static void gdi_render_msg(void *data, const char *msg, if (!font->gdi) return; - newX = x;//x * width; - newY = y;//height - (y * height); - - //if (strlen(msg) + newX > width) - // newX -= strlen(msg) + newX - width; - - //gdi_put_str(*font->gdi->gdi_cv, newX, newY, msg); - - //gdi_refresh_display(*font->gdi->gdi_display); - - printf("drawing text: %s at %d x %d\n", msg, newX, newY); + newX = x * width; + newY = height - (y * height); hdc = GetDC(hwnd); TextOut(hdc, newX, newY, msg, utf8len(msg)); ReleaseDC(hwnd, hdc); - - UpdateWindow(hwnd); } static void gdi_font_flush_block(void* data) From 90ef57948c618134eeb5dfa8296fb4c294b19b2d Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 7 Jan 2017 01:00:13 -0500 Subject: [PATCH 060/427] GDI testing --- gfx/drivers/gdi_gfx.c | 44 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 20804a772a..373b6a30bc 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -256,16 +256,13 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (draw) { - /*gdi_dither_bitmap(gdi_cv, 0, 0, - width, - height, - gdi_dither, frame_to_copy);*/ unsigned win_width, win_height; HWND hwnd = win32_get_window(); HDC dc = GetDC(hwnd); BITMAPINFO info; + gfx_ctx_mode_t mode; - video_driver_get_size(&win_width, &win_height); + video_context_driver_get_video_size(&mode); ZeroMemory(&info, sizeof(BITMAPINFO)); info.bmiHeader.biBitCount = gdi_video_bits; @@ -275,8 +272,43 @@ static bool gdi_gfx_frame(void *data, const void *frame, info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); info.bmiHeader.biSizeImage = pitch * height; info.bmiHeader.biCompression = BI_RGB; +/* + if (gdi_rgb32) + { + info.bmiColors[0].rgbBlue = 0xFF; + info.bmiColors[0].rgbGreen = 0x00; + info.bmiColors[0].rgbRed = 0x00; + info.bmiColors[0].rgbReserved = 0x00; - StretchDIBits(dc, 0, 0, win_width, win_height, 0, 0, width, height, + info.bmiColors[1].rgbBlue = 0x00; + info.bmiColors[1].rgbGreen = 0xFF; + info.bmiColors[1].rgbRed = 0x00; + info.bmiColors[1].rgbReserved = 0x00; + + info.bmiColors[2].rgbBlue = 0x00; + info.bmiColors[2].rgbGreen = 0x00; + info.bmiColors[2].rgbRed = 0xFF; + info.bmiColors[2].rgbReserved = 0x00; + } + else + { + info.bmiColors[0].rgbBlue = 0x1F; + info.bmiColors[0].rgbGreen = 0x00; + info.bmiColors[0].rgbRed = 0x00; + info.bmiColors[0].rgbReserved = 0x00; + + info.bmiColors[1].rgbBlue = 0x00; + info.bmiColors[1].rgbGreen = 0x1F; + info.bmiColors[1].rgbRed = 0x00; + info.bmiColors[1].rgbReserved = 0x00; + + info.bmiColors[2].rgbBlue = 0x00; + info.bmiColors[2].rgbGreen = 0x00; + info.bmiColors[2].rgbRed = 0x1F; + info.bmiColors[2].rgbReserved = 0x00; + } +*/ + StretchDIBits(dc, 0, 0, mode.width, mode.height, 0, 0, width, height, frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); ReleaseDC(hwnd, dc); } From 8eba18a54fda9d683128b37e6bfa35ef80097910 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 8 Jan 2017 15:27:51 -0500 Subject: [PATCH 061/427] GDI: xmb draws for a few seconds and then freezes --- gfx/common/win32_common.cpp | 14 ++++++++++++++ gfx/drivers/gdi_gfx.c | 17 +++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 82af6fe650..60e67122a6 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -521,6 +521,20 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, switch (message) { + case WM_PAINT: + { + PAINTSTRUCT ps; + HDC hdc = BeginPaint(hwnd, &ps); + + // All painting occurs here, between BeginPaint and EndPaint. + + FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); + + EndPaint(hwnd, &ps); + break; + } + case WM_ERASEBKGND: + break; case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 373b6a30bc..6ed6baf16e 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -220,6 +220,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, unsigned height = 0; bool draw = true; gdi_t *gdi = (gdi_t*)data; + HWND hwnd = win32_get_window(); if (!frame || !frame_width || !frame_height) return true; @@ -256,12 +257,14 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (draw) { - unsigned win_width, win_height; - HWND hwnd = win32_get_window(); - HDC dc = GetDC(hwnd); + HDC winDC = GetDC(hwnd); + HDC dc = CreateCompatibleDC(winDC); + HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); BITMAPINFO info; gfx_ctx_mode_t mode; + SelectObject(dc, bmp); + video_context_driver_get_video_size(&mode); ZeroMemory(&info, sizeof(BITMAPINFO)); @@ -310,15 +313,17 @@ static bool gdi_gfx_frame(void *data, const void *frame, */ StretchDIBits(dc, 0, 0, mode.width, mode.height, 0, 0, width, height, frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); - ReleaseDC(hwnd, dc); + DeleteObject(bmp); + DeleteDC(dc); + ReleaseDC(hwnd, winDC); } + InvalidateRect(hwnd, NULL, true); + video_context_driver_update_window_title(); video_context_driver_swap_buffers(); - //UpdateWindow(win32_get_window()); - return true; } From 6fe2a974a5e996fb6d6ea68ee254220eab154fcc Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 8 Jan 2017 22:20:43 -0500 Subject: [PATCH 062/427] GDI: does not freeze after a few seconds anymore, but the window still freezes when moving the mouse into it --- gfx/common/win32_common.cpp | 5 ++--- gfx/drivers/gdi_gfx.c | 29 ++++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 60e67122a6..d283b72f69 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -528,13 +528,12 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, // All painting occurs here, between BeginPaint and EndPaint. - FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); + //FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); EndPaint(hwnd, &ps); + return 0; break; } - case WM_ERASEBKGND: - break; case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 6ed6baf16e..023b536446 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -258,12 +258,23 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (draw) { HDC winDC = GetDC(hwnd); - HDC dc = CreateCompatibleDC(winDC); + HDC memDC = CreateCompatibleDC(winDC); HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); + HBITMAP bmp_old; BITMAPINFO info; gfx_ctx_mode_t mode; + RECT rect; + HBRUSH brush; - SelectObject(dc, bmp); + GetClientRect(hwnd, &rect); + + bmp_old = SelectObject(memDC, bmp); + + brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); + + FillRect(memDC, &rect, brush); + + DeleteObject(brush); video_context_driver_get_video_size(&mode); @@ -311,14 +322,22 @@ static bool gdi_gfx_frame(void *data, const void *frame, info.bmiColors[2].rgbReserved = 0x00; } */ - StretchDIBits(dc, 0, 0, mode.width, mode.height, 0, 0, width, height, + StretchDIBits(memDC, 0, 0, mode.width, mode.height, 0, 0, width, height, frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); + + BitBlt(winDC, + rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, + memDC, 0, 0, SRCCOPY); + + SelectObject(memDC, bmp_old); + DeleteObject(bmp); - DeleteDC(dc); + DeleteDC(memDC); ReleaseDC(hwnd, winDC); } - InvalidateRect(hwnd, NULL, true); + //InvalidateRect(hwnd, NULL, true); video_context_driver_update_window_title(); From bdc68e679f138311b876ddfb85bbeef3ddfe73ac Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 9 Jan 2017 00:52:36 -0500 Subject: [PATCH 063/427] GDI: flip image and render text after other graphics --- gfx/drivers/gdi_gfx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 023b536446..af297d301a 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -252,9 +252,6 @@ static bool gdi_gfx_frame(void *data, const void *frame, menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); #endif - if (msg) - font_driver_render_msg(NULL, msg, NULL); - if (draw) { HDC winDC = GetDC(hwnd); @@ -281,7 +278,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, ZeroMemory(&info, sizeof(BITMAPINFO)); info.bmiHeader.biBitCount = gdi_video_bits; info.bmiHeader.biWidth = width; - info.bmiHeader.biHeight = height; + info.bmiHeader.biHeight = -height; info.bmiHeader.biPlanes = 1; info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); info.bmiHeader.biSizeImage = pitch * height; @@ -337,6 +334,9 @@ static bool gdi_gfx_frame(void *data, const void *frame, ReleaseDC(hwnd, winDC); } + if (msg) + font_driver_render_msg(NULL, msg, NULL); + //InvalidateRect(hwnd, NULL, true); video_context_driver_update_window_title(); From 6c62901ae5e218db6ef570929299b2dcf1d7101a Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 10 Jan 2017 23:46:12 -0500 Subject: [PATCH 064/427] GDI: fix window not responding, but menu corruption still happens if set_gdi_pixel_format is called --- gfx/common/win32_common.cpp | 17 +++++++++-------- gfx/drivers/gdi_gfx.c | 21 +++++++++++++++++++-- gfx/drivers_context/gdi_ctx.cpp | 2 +- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index d283b72f69..8e609e3463 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -521,19 +521,20 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, switch (message) { - case WM_PAINT: - { - PAINTSTRUCT ps; + //case WM_PAINT: + //{ + /*PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); // All painting occurs here, between BeginPaint and EndPaint. - //FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); + FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); - EndPaint(hwnd, &ps); - return 0; - break; - } + EndPaint(hwnd, &ps);*/ + //return DefWindowProc(hwnd, message, wparam, lparam); + //return 0; + //break; + //} case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index af297d301a..ef59184017 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -354,8 +354,25 @@ static void gdi_gfx_set_nonblock_state(void *data, bool toggle) static bool gdi_gfx_alive(void *data) { - (void)data; - video_driver_set_size(&gdi_video_width, &gdi_video_height); + gfx_ctx_size_t size_data; + unsigned temp_width = 0; + unsigned temp_height = 0; + bool quit = false; + bool resize = false; + + /* Needed because some context drivers don't track their sizes */ + video_driver_get_size(&temp_width, &temp_height); + + size_data.quit = &quit; + size_data.resize = &resize; + size_data.width = &temp_width; + size_data.height = &temp_height; + + video_context_driver_check_window(&size_data); + + if (temp_width != 0 && temp_height != 0) + video_driver_set_size(&temp_width, &temp_height); + return true; } diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index a2a8c12abb..d7a5d95b98 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -298,7 +298,7 @@ void create_gdi_context(HWND hwnd, bool *quit) (void)quit; win32_gdi_hdc = GetDC(hwnd); - setup_gdi_pixel_format(win32_gdi_hdc); + //setup_gdi_pixel_format(win32_gdi_hdc); g_inited = true; } From 69bac11f029bdfc464f45c314218c103342e578f Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 11 Jan 2017 00:44:34 -0500 Subject: [PATCH 065/427] GDI: fix window not clearing on every frame, requires both FillRect calls and InvalidateRect --- gfx/common/win32_common.cpp | 14 +++++++------- gfx/drivers/gdi_gfx.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 8e609e3463..655f2c40d3 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -521,20 +521,20 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, switch (message) { - //case WM_PAINT: - //{ - /*PAINTSTRUCT ps; + case WM_PAINT: + { + PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); // All painting occurs here, between BeginPaint and EndPaint. - FillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOW+1)); + FillRect(hdc, &ps.rcPaint, (HBRUSH)(COLOR_WINDOW + 1)); - EndPaint(hwnd, &ps);*/ + EndPaint(hwnd, &ps); //return DefWindowProc(hwnd, message, wparam, lparam); //return 0; - //break; - //} + break; + } case WM_DROPFILES: case WM_SYSCOMMAND: case WM_CHAR: diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index ef59184017..aa783fad3a 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -337,7 +337,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(NULL, msg, NULL); - //InvalidateRect(hwnd, NULL, true); + InvalidateRect(hwnd, NULL, true); video_context_driver_update_window_title(); From acd6826df93745b9a302ffdb2f443823745905e6 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 12 Jan 2017 15:03:27 -0500 Subject: [PATCH 066/427] GDI: stretch video output to fill window --- gfx/common/win32_common.cpp | 12 +++-- gfx/common/win32_common.h | 9 ++++ gfx/drivers/gdi_gfx.c | 85 ++++++++++++++++++++++----------- gfx/drivers_context/gdi_ctx.cpp | 2 +- 4 files changed, 75 insertions(+), 33 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 655f2c40d3..19928d2c65 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -43,6 +43,11 @@ #include "../../retroarch.h" #include "../video_thread_wrapper.h" #include + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #ifndef _MSC_VER extern "C" { #endif @@ -526,9 +531,10 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); - // All painting occurs here, between BeginPaint and EndPaint. - - FillRect(hdc, &ps.rcPaint, (HBRUSH)(COLOR_WINDOW + 1)); +#ifdef HAVE_MENU + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL))// || gdi_has_menu_frame()) + FillRect(hdc, &ps.rcPaint, (HBRUSH)(COLOR_WINDOW + 1)); +#endif EndPaint(hwnd, &ps); //return DefWindowProc(hwnd, message, wparam, lparam); diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 37dbd6efbc..ffd27fc17f 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -51,8 +51,17 @@ void win32_monitor_get_info(void); void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id); void create_graphics_context(HWND hwnd, bool *quit); + void create_gdi_context(HWND hwnd, bool *quit); +#ifdef __cplusplus +extern "C" { +#endif +bool gdi_has_menu_frame(void); +#ifdef __cplusplus +} +#endif + bool win32_shader_dlg_init(void); void shader_dlg_show(HWND parent_hwnd); void shader_dlg_params_reload(void); diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index aa783fad3a..dcea853531 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -35,7 +35,9 @@ static unsigned gdi_video_width = 0; static unsigned gdi_video_height = 0; static unsigned gdi_video_pitch = 0; static unsigned gdi_video_bits = 0; -static bool gdi_rgb32 = 0; +static unsigned gdi_menu_bits = 0; +static bool gdi_rgb32 = false; +static bool gdi_menu_rgb32 = false; static void gdi_gfx_free(void *data); @@ -218,13 +220,20 @@ static bool gdi_gfx_frame(void *data, const void *frame, const void *frame_to_copy = frame; unsigned width = 0; unsigned height = 0; + unsigned bits = gdi_video_bits; bool draw = true; gdi_t *gdi = (gdi_t*)data; + gfx_ctx_mode_t mode; HWND hwnd = win32_get_window(); + RECT rect; if (!frame || !frame_width || !frame_height) return true; +#ifdef HAVE_MENU + menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); +#endif + if (gdi_video_width != frame_width || gdi_video_height != frame_height || gdi_video_pitch != pitch) { if (frame_width > 4 && frame_height > 4) @@ -232,25 +241,33 @@ static bool gdi_gfx_frame(void *data, const void *frame, gdi_video_width = frame_width; gdi_video_height = frame_height; gdi_video_pitch = pitch; - gdi_gfx_free(NULL); - gdi_gfx_create(); + //gdi_gfx_free(NULL); + //gdi_gfx_create(); } } if (gdi_menu_frame) + { frame_to_copy = gdi_menu_frame; + width = gdi_menu_width; + height = gdi_menu_height; + pitch = gdi_menu_pitch; + bits = gdi_menu_bits; + } + else + { + width = gdi_video_width; + height = gdi_video_height; + pitch = gdi_video_pitch; - //width = gdi_get_canvas_width(gdi_cv); - //height = gdi_get_canvas_height(gdi_cv); - width = frame_width; - height = frame_height; + if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) + draw = false; + } - if (frame_to_copy == frame && frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) - draw = false; + GetClientRect(hwnd, &rect); + video_context_driver_get_video_size(&mode); -#ifdef HAVE_MENU - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); -#endif + //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height); if (draw) { @@ -259,29 +276,24 @@ static bool gdi_gfx_frame(void *data, const void *frame, HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); HBITMAP bmp_old; BITMAPINFO info; - gfx_ctx_mode_t mode; - RECT rect; - HBRUSH brush; - - GetClientRect(hwnd, &rect); + //HBRUSH brush; + int ret = 0; bmp_old = SelectObject(memDC, bmp); - brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); + //brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); - FillRect(memDC, &rect, brush); + //FillRect(memDC, &rect, brush); - DeleteObject(brush); - - video_context_driver_get_video_size(&mode); + //DeleteObject(brush); ZeroMemory(&info, sizeof(BITMAPINFO)); - info.bmiHeader.biBitCount = gdi_video_bits; + info.bmiHeader.biBitCount = bits; info.bmiHeader.biWidth = width; info.bmiHeader.biHeight = -height; info.bmiHeader.biPlanes = 1; info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info.bmiHeader.biSizeImage = pitch * height; + info.bmiHeader.biSizeImage = 0;//pitch * height; info.bmiHeader.biCompression = BI_RGB; /* if (gdi_rgb32) @@ -319,13 +331,17 @@ static bool gdi_gfx_frame(void *data, const void *frame, info.bmiColors[2].rgbReserved = 0x00; } */ - StretchDIBits(memDC, 0, 0, mode.width, mode.height, 0, 0, width, height, + ret = StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); - BitBlt(winDC, - rect.left, rect.top, - rect.right - rect.left, rect.bottom - rect.top, - memDC, 0, 0, SRCCOPY); + //printf("StretchDIBits: %d\n", ret); + + ret = StretchBlt(winDC, + 0, 0, + mode.width, mode.height, + memDC, 0, 0, width, height, SRCCOPY); + + //printf("BitBlt: %d\n", ret); SelectObject(memDC, bmp_old); @@ -465,7 +481,13 @@ static void gdi_set_texture_frame(void *data, gdi_menu_frame = (unsigned char*)malloc(pitch * height); if (gdi_menu_frame && frame && pitch && height) + { memcpy(gdi_menu_frame, frame, pitch * height); + gdi_menu_width = width; + gdi_menu_height = height; + gdi_menu_pitch = pitch; + gdi_menu_bits = rgb32 ? 32 : 16; + } } static void gdi_set_osd_msg(void *data, const char *msg, @@ -551,6 +573,11 @@ static void gdi_gfx_set_viewport(void *data, unsigned viewport_width, { } +bool gdi_has_menu_frame() +{ + return (gdi_menu_frame != NULL); +} + video_driver_t video_gdi = { gdi_gfx_init, gdi_gfx_frame, diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index d7a5d95b98..a2a8c12abb 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -298,7 +298,7 @@ void create_gdi_context(HWND hwnd, bool *quit) (void)quit; win32_gdi_hdc = GetDC(hwnd); - //setup_gdi_pixel_format(win32_gdi_hdc); + setup_gdi_pixel_format(win32_gdi_hdc); g_inited = true; } From 6b89064242e1d589dff852eb17657464448cec82 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 12 Jan 2017 15:25:06 -0500 Subject: [PATCH 067/427] GDI: no more alternating black lines, but now video only takes up half the window --- gfx/drivers/gdi_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index dcea853531..f4ca0e9d63 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -267,7 +267,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, GetClientRect(hwnd, &rect); video_context_driver_get_video_size(&mode); - //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height); + //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d pitch %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height, pitch); if (draw) { @@ -289,11 +289,11 @@ static bool gdi_gfx_frame(void *data, const void *frame, ZeroMemory(&info, sizeof(BITMAPINFO)); info.bmiHeader.biBitCount = bits; - info.bmiHeader.biWidth = width; + info.bmiHeader.biWidth = pitch; info.bmiHeader.biHeight = -height; info.bmiHeader.biPlanes = 1; info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info.bmiHeader.biSizeImage = 0;//pitch * height; + info.bmiHeader.biSizeImage = 0; info.bmiHeader.biCompression = BI_RGB; /* if (gdi_rgb32) From f51472395a507b490dd374ab877cefdeb66548e8 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 12 Jan 2017 17:44:24 -0500 Subject: [PATCH 068/427] GDI: fix bad color due to reading as RGB555 instead of 565 --- gfx/drivers/gdi_gfx.c | 61 ++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 41 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index f4ca0e9d63..6927592898 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -267,7 +267,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, GetClientRect(hwnd, &rect); video_context_driver_get_video_size(&mode); - //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d pitch %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height, pitch); + //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d pitch %d bits %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height, pitch, bits); if (draw) { @@ -275,7 +275,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, HDC memDC = CreateCompatibleDC(winDC); HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); HBITMAP bmp_old; - BITMAPINFO info; + BITMAPINFO *info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); //HBRUSH brush; int ret = 0; @@ -287,52 +287,29 @@ static bool gdi_gfx_frame(void *data, const void *frame, //DeleteObject(brush); - ZeroMemory(&info, sizeof(BITMAPINFO)); - info.bmiHeader.biBitCount = bits; - info.bmiHeader.biWidth = pitch; - info.bmiHeader.biHeight = -height; - info.bmiHeader.biPlanes = 1; - info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info.bmiHeader.biSizeImage = 0; - info.bmiHeader.biCompression = BI_RGB; -/* - if (gdi_rgb32) + info->bmiHeader.biBitCount = bits; + info->bmiHeader.biWidth = pitch; + info->bmiHeader.biHeight = -height; + info->bmiHeader.biPlanes = 1; + info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER) + (3 * sizeof(RGBQUAD)); + info->bmiHeader.biSizeImage = 0; + + if (bits == 16) { - info.bmiColors[0].rgbBlue = 0xFF; - info.bmiColors[0].rgbGreen = 0x00; - info.bmiColors[0].rgbRed = 0x00; - info.bmiColors[0].rgbReserved = 0x00; + unsigned *masks = (unsigned*)info->bmiColors; - info.bmiColors[1].rgbBlue = 0x00; - info.bmiColors[1].rgbGreen = 0xFF; - info.bmiColors[1].rgbRed = 0x00; - info.bmiColors[1].rgbReserved = 0x00; + info->bmiHeader.biCompression = BI_BITFIELDS; - info.bmiColors[2].rgbBlue = 0x00; - info.bmiColors[2].rgbGreen = 0x00; - info.bmiColors[2].rgbRed = 0xFF; - info.bmiColors[2].rgbReserved = 0x00; + /* map RGB565 color bits, default is 555 */ + masks[0] = 0xF800; + masks[1] = 0x07E0; + masks[2] = 0x1F; } else - { - info.bmiColors[0].rgbBlue = 0x1F; - info.bmiColors[0].rgbGreen = 0x00; - info.bmiColors[0].rgbRed = 0x00; - info.bmiColors[0].rgbReserved = 0x00; + info->bmiHeader.biCompression = BI_RGB; - info.bmiColors[1].rgbBlue = 0x00; - info.bmiColors[1].rgbGreen = 0x1F; - info.bmiColors[1].rgbRed = 0x00; - info.bmiColors[1].rgbReserved = 0x00; - - info.bmiColors[2].rgbBlue = 0x00; - info.bmiColors[2].rgbGreen = 0x00; - info.bmiColors[2].rgbRed = 0x1F; - info.bmiColors[2].rgbReserved = 0x00; - } -*/ ret = StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, - frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); + frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); //printf("StretchDIBits: %d\n", ret); @@ -348,6 +325,8 @@ static bool gdi_gfx_frame(void *data, const void *frame, DeleteObject(bmp); DeleteDC(memDC); ReleaseDC(hwnd, winDC); + + free(info); } if (msg) From 0ee3f39d76855e87b769acac59b59952c313d00b Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 12 Jan 2017 20:12:55 -0500 Subject: [PATCH 069/427] GDI: no more flicker --- gfx/drivers/gdi_gfx.c | 4 ++-- menu/drivers_display/menu_display_gdi.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 6927592898..84a5fce764 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -332,11 +332,11 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (msg) font_driver_render_msg(NULL, msg, NULL); - InvalidateRect(hwnd, NULL, true); + InvalidateRect(hwnd, NULL, false); video_context_driver_update_window_title(); - video_context_driver_swap_buffers(); + //video_context_driver_swap_buffers(); return true; } diff --git a/menu/drivers_display/menu_display_gdi.c b/menu/drivers_display/menu_display_gdi.c index 18c804c22d..1a49da97a3 100644 --- a/menu/drivers_display/menu_display_gdi.c +++ b/menu/drivers_display/menu_display_gdi.c @@ -25,6 +25,10 @@ #include "../menu_display.h" +#if defined(_WIN32) && !defined(_XBOX) +#include "../common/win32_common.h" +#endif + static void *menu_display_gdi_get_default_mvp(void) { return NULL; @@ -55,11 +59,25 @@ static void menu_display_gdi_viewport(void *data) static void menu_display_gdi_restore_clear_color(void) { + /*HBRUSH brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); + RECT rect; + HWND hwnd = win32_get_window(); + HDC hdc = GetDC(hwnd); + + GetClientRect(hwnd, &rect); + + FillRect(hdc, &rect, brush); + + DeleteObject(brush); + + ReleaseDC(hwnd, hdc);*/ } static void menu_display_gdi_clear_color(menu_display_ctx_clearcolor_t *clearcolor) { (void)clearcolor; + + menu_display_gdi_restore_clear_color(); } static bool menu_display_gdi_font_init_first( From d6300a7946e43bc75aae4a7d67a44fc7c164b567 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 00:52:55 -0500 Subject: [PATCH 070/427] GDI: video correctly fills the screen now, but resolution is poor. why is it scaled down by half? --- gfx/drivers/gdi_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 84a5fce764..89725e7b42 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -273,7 +273,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, { HDC winDC = GetDC(hwnd); HDC memDC = CreateCompatibleDC(winDC); - HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); + HBITMAP bmp = CreateCompatibleBitmap(winDC, pitch, height); HBITMAP bmp_old; BITMAPINFO *info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); //HBRUSH brush; @@ -308,7 +308,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, else info->bmiHeader.biCompression = BI_RGB; - ret = StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, + ret = StretchDIBits(memDC, 0, 0, pitch, height, 0, 0, pitch, height, frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); //printf("StretchDIBits: %d\n", ret); @@ -316,7 +316,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, ret = StretchBlt(winDC, 0, 0, mode.width, mode.height, - memDC, 0, 0, width, height, SRCCOPY); + memDC, 0, 0, width, height / 2, SRCCOPY); //printf("BitBlt: %d\n", ret); From c09996cd22307eaf50000d730331219fc9a99b7e Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 00:54:38 -0500 Subject: [PATCH 071/427] GDI: don't need to store the padding --- gfx/drivers/gdi_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 89725e7b42..b010ac4ea4 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -273,7 +273,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, { HDC winDC = GetDC(hwnd); HDC memDC = CreateCompatibleDC(winDC); - HBITMAP bmp = CreateCompatibleBitmap(winDC, pitch, height); + HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); HBITMAP bmp_old; BITMAPINFO *info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); //HBRUSH brush; @@ -308,7 +308,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, else info->bmiHeader.biCompression = BI_RGB; - ret = StretchDIBits(memDC, 0, 0, pitch, height, 0, 0, pitch, height, + ret = StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); //printf("StretchDIBits: %d\n", ret); From 8d9a43eec6be5f55cc4dd78844a14f93f7c41866 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 14:00:49 -0500 Subject: [PATCH 072/427] GDI: pitch seems to be reported wrong? this looks correct now --- gfx/drivers/gdi_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index b010ac4ea4..bf1e8b4c99 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -288,7 +288,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, //DeleteObject(brush); info->bmiHeader.biBitCount = bits; - info->bmiHeader.biWidth = pitch; + info->bmiHeader.biWidth = pitch / 2; info->bmiHeader.biHeight = -height; info->bmiHeader.biPlanes = 1; info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER) + (3 * sizeof(RGBQUAD)); @@ -316,7 +316,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, ret = StretchBlt(winDC, 0, 0, mode.width, mode.height, - memDC, 0, 0, width, height / 2, SRCCOPY); + memDC, 0, 0, width, height, SRCCOPY); //printf("BitBlt: %d\n", ret); From 69ce5bdd652167c3a454b9421e2f5013657a875c Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 14:07:00 -0500 Subject: [PATCH 073/427] GDI: allow menu drivers to be built without acceleration --- qb/config.libs.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 06298da402..937649064c 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -451,13 +451,17 @@ if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH" if [ "$HAVE_RGUI" = 'no' ]; then HAVE_MATERIALUI=no HAVE_XMB=no - HAVE_ZARCH=no + HAVE_ZARCH=no echo "Notice: RGUI not available, MaterialUI, XMB and ZARCH will also be disabled." elif [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then - HAVE_MATERIALUI=no - HAVE_XMB=no + if [ "$OS" = 'Win32' ]; then + echo "Notice: Hardware rendering context not available, the GDI video driver must be used." + else + HAVE_MATERIALUI=no + HAVE_XMB=no HAVE_ZARCH=no - echo "Notice: Hardware rendering context not available, XMB, MaterialUI and ZARCH will also be disabled." + echo "Notice: Hardware rendering context not available, XMB, MaterialUI and ZARCH will also be disabled." + fi fi fi From 7c6bf6aaf74aa124f023bd1cccada42bbbee55c4 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 14:31:36 -0500 Subject: [PATCH 074/427] fix msys2 compilation when opengl, vulkan and d3d9 are disabled --- gfx/common/win32_common.cpp | 12 ++++++++++++ gfx/common/win32_common.h | 4 ++++ menu/drivers_display/menu_display_gdi.c | 2 +- qb/config.libs.sh | 4 +++- ui/drivers/ui_win32.c | 5 ++++- 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 19928d2c65..3274a77c15 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -60,11 +60,13 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam); } #endif +#ifdef HAVE_D3D9 extern "C" bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lParam); extern void *dinput_gdi; extern void *dinput_wgl; extern void *dinput; +#endif unsigned g_resize_width = 0; unsigned g_resize_height = 0; @@ -426,6 +428,7 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message, extern void ui_window_win32_set_droppable(void *data, bool droppable); +#ifdef HAVE_D3D9 LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { @@ -466,11 +469,15 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, return 0; } +#ifdef HAVE_D3D9 if (dinput && dinput_handle_message(dinput, message, wparam, lparam)) return 0; +#endif return DefWindowProc(hwnd, message, wparam, lparam); } +#endif +#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN) LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { @@ -510,10 +517,13 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, return 0; } +#ifdef HAVE_D3D9 if (dinput_wgl && dinput_handle_message(dinput_wgl, message, wparam, lparam)) return 0; +#endif return DefWindowProc(hwnd, message, wparam, lparam); } +#endif LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) @@ -569,8 +579,10 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, return 0; } +#ifdef HAVE_D3D9 if (dinput_gdi && dinput_handle_message(dinput_gdi, message, wparam, lparam)) return 0; +#endif return DefWindowProc(hwnd, message, wparam, lparam); } diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index ffd27fc17f..61aa2849b7 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -120,11 +120,15 @@ void win32_window_reset(void); void win32_destroy_window(void); +#ifdef HAVE_D3D9 LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); +#endif +#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN) LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); +#endif LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); diff --git a/menu/drivers_display/menu_display_gdi.c b/menu/drivers_display/menu_display_gdi.c index 1a49da97a3..e04541c9ea 100644 --- a/menu/drivers_display/menu_display_gdi.c +++ b/menu/drivers_display/menu_display_gdi.c @@ -26,7 +26,7 @@ #include "../menu_display.h" #if defined(_WIN32) && !defined(_XBOX) -#include "../common/win32_common.h" +#include "../../gfx/common/win32_common.h" #endif static void *menu_display_gdi_get_default_mvp(void) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 937649064c..d20d7efe1b 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -455,7 +455,9 @@ if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH" echo "Notice: RGUI not available, MaterialUI, XMB and ZARCH will also be disabled." elif [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then if [ "$OS" = 'Win32' ]; then - echo "Notice: Hardware rendering context not available, the GDI video driver must be used." + HAVE_SHADERPIPELINE=no + HAVE_VULKAN=no + echo "Notice: Hardware rendering context not available." else HAVE_MATERIALUI=no HAVE_XMB=no diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index b83d23dcfd..42777b92ea 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -364,6 +364,7 @@ void shader_dlg_show(HWND parent_hwnd) window->set_focused(&g_shader_dlg.window); } +#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN) static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { @@ -440,6 +441,7 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message, return DefWindowProc(hwnd, message, wparam, lparam); } +#endif bool win32_window_init(WNDCLASSEX *wndclass, bool fullscreen, const char *class_name) @@ -475,6 +477,7 @@ bool win32_window_init(WNDCLASSEX *wndclass, bool win32_shader_dlg_init(void) { +#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN) static bool inited = false; int pos_y; HFONT hFont; @@ -522,7 +525,7 @@ bool win32_shader_dlg_init(void) pos_y += SHADER_DLG_SEPARATOR_HEIGHT + SHADER_DLG_CTRL_MARGIN; g_shader_dlg.parameters_start_y = pos_y; - +#endif return true; } From 7acfa39fb938e9ff1642e6726e5ccb335c610585 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 14:37:24 -0500 Subject: [PATCH 075/427] GDI: MSVC2010 build fix --- gfx/drivers/gdi_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index bf1e8b4c99..5681ffa212 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -279,7 +279,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, //HBRUSH brush; int ret = 0; - bmp_old = SelectObject(memDC, bmp); + bmp_old = (HBITMAP)SelectObject(memDC, bmp); //brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); From 061c13b84c7571a55b2ff62c78ea07037a3bd7df Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 13 Jan 2017 23:54:21 -0500 Subject: [PATCH 076/427] fix XP runtime error with MinGW --- ui/drivers/ui_win32.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 42777b92ea..7514a0a5a5 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -613,7 +613,12 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) * This is needed for proper multi-byte string display until Unicode is fully supported. */ MultiByteToWideChar(CP_UTF8, 0, title, -1, title_wide, sizeof(title_wide) / sizeof(title_wide[0])); +#if !defined(_MSC_VER) && (_WIN32_WINNT > _WIN32_WINNT_WINXP) + /* MinGW does not define wcstombs_s for XP, but MSVC does */ wcstombs_s(&converted, title_cp, sizeof(title_cp), title_wide, sizeof(title_cp) - 1); +#else + wcstombs(title_cp, title_wide, sizeof(title_cp) - 1); +#endif if (!win32_browser(owner, win32_file, extensions, title_cp, initial_dir)) From e1f4db8081b083501d9c1c92a1b6b743bd2c6669 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 14 Jan 2017 04:06:56 -0500 Subject: [PATCH 077/427] Win2000 buildfixes --- audio/drivers/xaudio.cpp | 5 +++++ file_path_special.c | 2 +- frontend/drivers/platform_win32.c | 4 ++-- gfx/common/win32_common.cpp | 5 +++++ gfx/drivers/d3d.cpp | 8 ++++---- gfx/drivers_font/d3d_w32_font.cpp | 2 +- griffin/griffin.c | 2 +- intl/msg_hash_chs.c | 1 + intl/msg_hash_pl.c | 1 + libretro-common/net/net_ifinfo.c | 8 ++++---- libretro-common/rthreads/rthreads.c | 3 +++ menu/drivers/xmb.c | 2 +- ui/drivers/ui_win32.c | 3 ++- 13 files changed, 31 insertions(+), 15 deletions(-) diff --git a/audio/drivers/xaudio.cpp b/audio/drivers/xaudio.cpp index 36de2720ed..c47cb07fd4 100644 --- a/audio/drivers/xaudio.cpp +++ b/audio/drivers/xaudio.cpp @@ -29,6 +29,11 @@ #include #include +#if defined(_MSC_VER) && (_WIN32_WINNT <= _WIN32_WINNT_WIN2K) +/* needed for CoInitializeEx */ +#define _WIN32_DCOM +#endif + #include "xaudio.h" #include "../audio_driver.h" diff --git a/file_path_special.c b/file_path_special.c index 2957c0d444..fb96d87d21 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -285,7 +285,7 @@ void fill_pathname_application_path(char *s, size_t len) #endif #ifdef HAVE_XMB -const char *xmb_theme_ident(void); +const char* xmb_theme_ident(void); #endif void fill_pathname_application_special(char *s, size_t len, enum application_special_type type) diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index b7da98da6d..03e79a1054 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -328,7 +328,7 @@ static uint64_t frontend_win32_get_mem_used(void) static void frontend_win32_attach_console(void) { #ifdef _WIN32 -#if(_WIN32_WINNT >= 0x0500) +#ifdef _WIN32_WINNT_WINXP if (!AttachConsole(ATTACH_PARENT_PROCESS)) { AllocConsole(); @@ -343,7 +343,7 @@ static void frontend_win32_attach_console(void) static void frontend_win32_detach_console(void) { #if defined(_WIN32) && !defined(_XBOX) -#if(_WIN32_WINNT >= 0x0500) +#ifdef _WIN32_WINNT_WINXP if (!AttachConsole(ATTACH_PARENT_PROCESS)) { HWND wnd = GetConsoleWindow(); diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 3274a77c15..625b6d1a72 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -114,7 +114,9 @@ typedef enum _POWER_REQUEST_TYPE #define POWER_REQUEST_CONTEXT_DETAILED_STRING 2 #endif +#ifdef _WIN32_WINNT_WIN7 typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_REQUEST_CONTEXT; +#endif #ifndef MAX_MONITORS #define MAX_MONITORS 9 @@ -585,6 +587,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, #endif return DefWindowProc(hwnd, message, wparam, lparam); } +#endif bool win32_window_create(void *data, unsigned style, RECT *mon_rect, unsigned width, @@ -724,6 +727,7 @@ bool win32_suppress_screensaver(void *data, bool enable) if (major*100+minor >= 601) { +#ifdef _WIN32_WINNT_WIN7 /* Windows 7, 8, 10 codepath */ typedef HANDLE (WINAPI * PowerCreateRequestPtr)(REASON_CONTEXT *context); typedef BOOL (WINAPI * PowerSetRequestPtr)(HANDLE PowerRequest, @@ -748,6 +752,7 @@ bool win32_suppress_screensaver(void *data, bool enable) powerSetRequest( Request, PowerRequestDisplayRequired); return true; } +#endif } else { diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 9503a0cdf3..46e706e675 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -259,18 +259,18 @@ static bool d3d_init_multipass(d3d_video_t *d3d) } memset(&d3d->shader, 0, sizeof(d3d->shader)); - +#ifdef HAVE_SHADERPIPELINE if (!video_shader_read_conf_cgp(conf, &d3d->shader)) { config_file_free(conf); RARCH_ERR("Failed to parse CGP file.\n"); return false; } - +#endif config_file_free(conf); - +#ifdef HAVE_SHADERPIPELINE video_shader_resolve_relative(&d3d->shader, d3d->shader_path.c_str()); - +#endif RARCH_LOG("[D3D9 Meta-Cg] Found %u shaders.\n", d3d->shader.passes); for (i = 0; i < d3d->shader.passes; i++) diff --git a/gfx/drivers_font/d3d_w32_font.cpp b/gfx/drivers_font/d3d_w32_font.cpp index 1fd5065782..88ad1b5912 100644 --- a/gfx/drivers_font/d3d_w32_font.cpp +++ b/gfx/drivers_font/d3d_w32_font.cpp @@ -46,7 +46,7 @@ static void *d3dfonts_w32_init_font(void *video_data, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_PITCH, -#ifdef _MSC_VER /* MSVC needs w_char* */ +#if defined(_MSC_VER) && _WIN32_WINNT > 0x0500 /* MSVC needs w_char* starting with XP */ L"Verdana" /* Hardcode FTL */ #else "Verdana" diff --git a/griffin/griffin.c b/griffin/griffin.c index 8a2942388b..2b040232cc 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1011,7 +1011,7 @@ MENU #include "../menu/drivers/rgui.c" #endif -#if defined(HAVE_OPENGL) || defined(HAVE_VITA2D) || defined(_3DS) +#if defined(HAVE_OPENGL) || defined(HAVE_VITA2D) || defined(_3DS) || defined(_MSC_VER) #ifdef HAVE_XMB #include "../menu/drivers/xmb.c" #endif diff --git a/intl/msg_hash_chs.c b/intl/msg_hash_chs.c index 5afbaa8a9e..b0505b3990 100644 --- a/intl/msg_hash_chs.c +++ b/intl/msg_hash_chs.c @@ -26,6 +26,7 @@ #if defined(_MSC_VER) && !defined(_XBOX) /* https://support.microsoft.com/en-us/kb/980263 */ #pragma execution_character_set("utf-8") +#pragma warning( disable : 4566 ) #endif int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len) diff --git a/intl/msg_hash_pl.c b/intl/msg_hash_pl.c index ec477cd01c..edd84cdf75 100644 --- a/intl/msg_hash_pl.c +++ b/intl/msg_hash_pl.c @@ -20,6 +20,7 @@ #if defined(_MSC_VER) && !defined(_XBOX) /* https://support.microsoft.com/en-us/kb/980263 */ #pragma execution_character_set("utf-8") +#pragma warning( disable: 4566 ) #endif int menu_hash_get_help_pl_enum(enum msg_hash_enums msg, char *s, size_t len) diff --git a/libretro-common/net/net_ifinfo.c b/libretro-common/net/net_ifinfo.c index 5432f5a73d..8cec6432bf 100644 --- a/libretro-common/net/net_ifinfo.c +++ b/libretro-common/net/net_ifinfo.c @@ -71,10 +71,10 @@ bool net_ifinfo_new(net_ifinfo_t *list) { unsigned k = 0; #if defined(_WIN32) && !defined(_XBOX) + PIP_ADAPTER_ADDRESSES adapter_addresses = NULL, aa = NULL; + PIP_ADAPTER_UNICAST_ADDRESS ua = NULL; +#ifdef _WIN32_WINNT_WINXP DWORD size; - PIP_ADAPTER_ADDRESSES adapter_addresses, aa; - PIP_ADAPTER_UNICAST_ADDRESS ua; - DWORD rv = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, NULL, &size); adapter_addresses = (PIP_ADAPTER_ADDRESSES)malloc(size); @@ -85,7 +85,7 @@ bool net_ifinfo_new(net_ifinfo_t *list) if (rv != ERROR_SUCCESS) goto error; - +#endif for (aa = adapter_addresses; aa != NULL; aa = aa->Next) { char name[PATH_MAX_LENGTH]; diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c index 1744705642..1043199135 100644 --- a/libretro-common/rthreads/rthreads.c +++ b/libretro-common/rthreads/rthreads.c @@ -37,6 +37,9 @@ #include #else #define WIN32_LEAN_AND_MEAN +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 /*_WIN32_WINNT_WIN2K */ +#endif #include #endif #elif defined(GEKKO) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index ad1aabcfff..faa82f3e0d 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -376,7 +376,7 @@ float gradient_dark[16] = { 0.0, 0.0, 0.0, 1.00, }; -const char *xmb_theme_ident(void) +const char* xmb_theme_ident(void) { settings_t *settings = config_get_ptr(); switch (settings->menu.xmb.theme) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 7514a0a5a5..8194e30433 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -224,6 +224,7 @@ static void shader_dlg_params_clear(void) void shader_dlg_params_reload(void) { +#ifdef HAVE_SHADERPIPELINE HFONT hFont; RECT parent_rect; int i, pos_x, pos_y; @@ -325,7 +326,7 @@ void shader_dlg_params_reload(void) (pos_x - SHADER_DLG_CTRL_X) + SHADER_DLG_WIDTH, (pos_x == SHADER_DLG_CTRL_X) ? pos_y + 30 : SHADER_DLG_MAX_HEIGHT, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); - +#endif } static void shader_dlg_update_on_top_state(void) From e0f71928cadf1410cba732a86794df4ed458fe5f Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 14 Jan 2017 04:09:06 -0500 Subject: [PATCH 078/427] add msvc2005 project files for Win2000 --- pkg/msvc/RetroArch-msvc2005.sln | 19 ++ pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 223 +++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 pkg/msvc/RetroArch-msvc2005.sln create mode 100644 pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj diff --git a/pkg/msvc/RetroArch-msvc2005.sln b/pkg/msvc/RetroArch-msvc2005.sln new file mode 100644 index 0000000000..8fd5a544c9 --- /dev/null +++ b/pkg/msvc/RetroArch-msvc2005.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RetroArch-msvc2005", "msvc-2005\RetroArch-msvc2005.vcproj", "{1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Debug|Win32.ActiveCfg = Debug|Win32 + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Debug|Win32.Build.0 = Debug|Win32 + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Release|Win32.ActiveCfg = Release|Win32 + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj new file mode 100644 index 0000000000..d4788aad7a --- /dev/null +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 240b43e0ba93dd13cf6e485f9878414e513e05d1 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 14 Jan 2017 04:10:34 -0500 Subject: [PATCH 079/427] windows buildfix --- gfx/common/win32_common.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 625b6d1a72..30672a2374 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -471,10 +471,8 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, return 0; } -#ifdef HAVE_D3D9 if (dinput && dinput_handle_message(dinput, message, wparam, lparam)) return 0; -#endif return DefWindowProc(hwnd, message, wparam, lparam); } #endif @@ -587,7 +585,6 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, #endif return DefWindowProc(hwnd, message, wparam, lparam); } -#endif bool win32_window_create(void *data, unsigned style, RECT *mon_rect, unsigned width, From 493b7372bd616b44e07e17ed98d6b1270137d29a Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 16:53:19 -0500 Subject: [PATCH 080/427] only disable glui/xmb/zarch if GL/ES/Vulkan AND libcaca is not enabled --- qb/config.libs.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qb/config.libs.sh b/qb/config.libs.sh index d20d7efe1b..f000fe40b4 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -459,10 +459,14 @@ if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH" HAVE_VULKAN=no echo "Notice: Hardware rendering context not available." else - HAVE_MATERIALUI=no - HAVE_XMB=no - HAVE_ZARCH=no - echo "Notice: Hardware rendering context not available, XMB, MaterialUI and ZARCH will also be disabled." + if [ "$HAVE_CACA" = 'yes' ]; then + echo "Notice: Hardware rendering context not available." + else + HAVE_MATERIALUI=no + HAVE_XMB=no + HAVE_ZARCH=no + echo "Notice: Hardware rendering context not available, XMB, MaterialUI and ZARCH will also be disabled." + fi fi fi fi From e4bdc5ce8b8a80e95647fee305410105013adec3 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 17:37:19 -0500 Subject: [PATCH 081/427] GDI: remove unused code and fix menu toggle in rgui and xmb --- gfx/drivers/gdi_gfx.c | 98 +++------------------------------ gfx/drivers_context/gdi_ctx.cpp | 15 ++--- 2 files changed, 16 insertions(+), 97 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 5681ffa212..087ad2ee7b 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -43,12 +43,6 @@ static void gdi_gfx_free(void *data); static void gdi_gfx_create() { - if(!gdi_video_width || !gdi_video_height) - { - printf("***** GDI: no width or height!\n"); - } - - //video_driver_set_size(&gdi_video_width, &gdi_video_height); } static void *gdi_gfx_init(const video_info_t *video, @@ -89,67 +83,6 @@ static void *gdi_gfx_init(const video_info_t *video, RARCH_LOG("Found GDI context: %s\n", ctx_driver->ident); -/*#ifdef HAVE_WINDOW - win32_window_init(&gdi->wndclass, true, NULL); -#endif - -#ifdef HAVE_MONITOR - bool windowed_full; - RECT mon_rect; - MONITORINFOEX current_mon; - HMONITOR hm_to_use; - - win32_monitor_info(¤t_mon, &hm_to_use, &d3d->cur_mon_id); - mon_rect = current_mon.rcMonitor; - g_resize_width = video->width; - g_resize_height = video->height; - - windowed_full = settings->video.windowed_fullscreen; - - full_x = (windowed_full || video->width == 0) ? - (mon_rect.right - mon_rect.left) : video->width; - full_y = (windowed_full || video->height == 0) ? - (mon_rect.bottom - mon_rect.top) : video->height; - RARCH_LOG("[GDI]: Monitor size: %dx%d.\n", - (int)(mon_rect.right - mon_rect.left), - (int)(mon_rect.bottom - mon_rect.top)); -#else - { - video_context_driver_get_video_size(&mode); - - full_x = mode.width; - full_y = mode.height; - } -#endif - { - unsigned new_width = video->fullscreen ? full_x : video->width; - unsigned new_height = video->fullscreen ? full_y : video->height; - mode.width = new_width; - mode.height = new_height; - mode.fullscreen = video->fullscreen; - - video_context_driver_set_video_mode(&mode); - video_driver_set_size(&new_width, &new_height); - } - -#ifdef HAVE_WINDOW - DWORD style; - unsigned win_width, win_height; - RECT rect = {0}; - - video_driver_get_size(&win_width, &win_height); - - win32_set_style(¤t_mon, &hm_to_use, &win_width, &win_height, - video->fullscreen, windowed_full, &rect, &mon_rect, &style); - - win32_window_create(gdi, style, &mon_rect, win_width, - win_height, video->fullscreen); - - win32_set_window(&win_width, &win_height, video->fullscreen, - windowed_full, &rect); -#endif -*/ - video_context_driver_get_video_size(&mode); full_x = mode.width; @@ -215,7 +148,7 @@ error: static bool gdi_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, - unsigned pitch, const char *msg) + unsigned pitch, const char *msg, video_frame_info_t video_info) { const void *frame_to_copy = frame; unsigned width = 0; @@ -241,12 +174,10 @@ static bool gdi_gfx_frame(void *data, const void *frame, gdi_video_width = frame_width; gdi_video_height = frame_height; gdi_video_pitch = pitch; - //gdi_gfx_free(NULL); - //gdi_gfx_create(); } } - if (gdi_menu_frame) + if (gdi_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { frame_to_copy = gdi_menu_frame; width = gdi_menu_width; @@ -262,13 +193,14 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) draw = false; + + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + draw = false; } GetClientRect(hwnd, &rect); video_context_driver_get_video_size(&mode); - //printf("left %d top %d right %d bottom %d mode %d x %d size %d x %d pitch %d bits %d\n", rect.left, rect.top, rect.right, rect.bottom, mode.width, mode.height, width, height, pitch, bits); - if (draw) { HDC winDC = GetDC(hwnd); @@ -276,17 +208,9 @@ static bool gdi_gfx_frame(void *data, const void *frame, HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); HBITMAP bmp_old; BITMAPINFO *info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); - //HBRUSH brush; - int ret = 0; bmp_old = (HBITMAP)SelectObject(memDC, bmp); - //brush = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); - - //FillRect(memDC, &rect, brush); - - //DeleteObject(brush); - info->bmiHeader.biBitCount = bits; info->bmiHeader.biWidth = pitch / 2; info->bmiHeader.biHeight = -height; @@ -308,18 +232,14 @@ static bool gdi_gfx_frame(void *data, const void *frame, else info->bmiHeader.biCompression = BI_RGB; - ret = StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, + StretchDIBits(memDC, 0, 0, width, height, 0, 0, width, height, frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); - //printf("StretchDIBits: %d\n", ret); - - ret = StretchBlt(winDC, + StretchBlt(winDC, 0, 0, mode.width, mode.height, memDC, 0, 0, width, height, SRCCOPY); - //printf("BitBlt: %d\n", ret); - SelectObject(memDC, bmp_old); DeleteObject(bmp); @@ -334,9 +254,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, InvalidateRect(hwnd, NULL, false); - video_context_driver_update_window_title(); - - //video_context_driver_swap_buffers(); + video_context_driver_update_window_title(video_info); return true; } diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index a2a8c12abb..7f35a5a993 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -87,19 +87,18 @@ static bool gfx_ctx_gdi_set_resize(void *data, return false; } -static void gfx_ctx_gdi_update_window_title(void *data) +static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t video_info) { char buf[128]; char buf_fps[128]; - settings_t *settings = config_get_ptr(); const ui_window_t *window = ui_companion_driver_get_window_ptr(); buf[0] = buf_fps[0] = '\0'; - if (window && video_monitor_get_fps(buf, sizeof(buf), + if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), buf_fps, sizeof(buf_fps))) window->set_title(&main_window, buf); - if (settings->fps_show) + if (video_info.fps_show) runloop_msg_queue_push(buf_fps, 1, 1, false); } @@ -128,7 +127,7 @@ static void gfx_ctx_gdi_get_video_size(void *data, } } -static void *gfx_ctx_gdi_init(void *video_driver) +static void *gfx_ctx_gdi_init(video_frame_info_t video_info, void *video_driver) { WNDCLASSEX wndclass = {0}; @@ -191,6 +190,7 @@ static void gfx_ctx_gdi_destroy(void *data) } static bool gfx_ctx_gdi_set_video_mode(void *data, + video_frame_info_t video_info, unsigned width, unsigned height, bool fullscreen) { @@ -216,11 +216,12 @@ error: static void gfx_ctx_gdi_input_driver(void *data, + const char *joypad_name, const input_driver_t **input, void **input_data) { (void)data; - dinput_gdi = input_dinput.init(); + dinput_gdi = input_dinput.init(joypad_name); *input = dinput_gdi ? &input_dinput : NULL; *input_data = dinput_gdi; @@ -286,7 +287,7 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) return flags; } -static void gfx_ctx_gdi_swap_buffers(void *data) +static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t video_info) { (void)data; From 5eaf00b39d56678fee20dbe31792a4d074ee73ee Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 19:53:46 -0500 Subject: [PATCH 082/427] GDI: fix rendering of 32-bit color cores --- gfx/drivers/gdi_gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 087ad2ee7b..5100759dee 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -212,7 +212,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, bmp_old = (HBITMAP)SelectObject(memDC, bmp); info->bmiHeader.biBitCount = bits; - info->bmiHeader.biWidth = pitch / 2; + info->bmiHeader.biWidth = pitch / (bits / 8); info->bmiHeader.biHeight = -height; info->bmiHeader.biPlanes = 1; info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER) + (3 * sizeof(RGBQUAD)); From afb94e2b96485f3276a686bb4331fe35a673ba0b Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 20:40:43 -0500 Subject: [PATCH 083/427] GDI: draw a gradient background for xmb --- Makefile.common | 2 ++ gfx/common/win32_common.cpp | 52 ++++++++++++++++++++++++++----------- gfx/drivers_font/gdi_font.c | 7 +++-- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/Makefile.common b/Makefile.common index e6b455f8a3..2bf94f9dba 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1169,6 +1169,8 @@ ifneq ($(findstring Win32,$(OS)),) gfx/drivers_context/gdi_ctx.o \ gfx/drivers_font/gdi_font.o \ menu/drivers_display/menu_display_gdi.o + + LIBS += -lmsimg32 endif ifeq ($(HAVE_AVFOUNDATION), 1) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 30672a2374..ef2827e4f3 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -128,10 +128,10 @@ static unsigned win32_monitor_count = 0; extern "C" { - bool doubleclick_on_titlebar_pressed(void) - { - return doubleclick_on_titlebar; - } + bool doubleclick_on_titlebar_pressed(void) + { + return doubleclick_on_titlebar; + } void unset_doubleclick_on_titlebar(void) { @@ -287,8 +287,8 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam) core_info_get_list(&core_info_list); - if (!core_info_list) - return 0; + if (!core_info_list) + return 0; core_info_list_get_supported_cores(core_info_list, (const char*)szFilename, &core_info, &list_size); @@ -417,7 +417,7 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message, } *quit = true; break; - case WM_COMMAND: + case WM_COMMAND: { settings_t *settings = config_get_ptr(); if (settings->ui.menubar_enable) @@ -542,13 +542,35 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, HDC hdc = BeginPaint(hwnd, &ps); #ifdef HAVE_MENU - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL))// || gdi_has_menu_frame()) - FillRect(hdc, &ps.rcPaint, (HBRUSH)(COLOR_WINDOW + 1)); + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + { + RECT rect; + GetClientRect(hwnd, &rect); + + TRIVERTEX vertex[2]; + vertex[0].x = rect.left; + vertex[0].y = rect.top; + vertex[0].Red = 1 << 8; + vertex[0].Green = 81 << 8; + vertex[0].Blue = 127 << 8; + vertex[0].Alpha = 0; + + vertex[1].x = rect.right; + vertex[1].y = rect.bottom; + vertex[1].Red = 0; + vertex[1].Green = 1 << 8; + vertex[1].Blue = 33 << 8; + vertex[1].Alpha = 0; + + GRADIENT_RECT gRect; + gRect.LowerRight = 0; + gRect.UpperLeft = 1; + + GradientFill(hdc, vertex, 2, &gRect, 1, GRADIENT_FILL_RECT_V); + } #endif EndPaint(hwnd, &ps); - //return DefWindowProc(hwnd, message, wparam, lparam); - //return 0; break; } case WM_DROPFILES: @@ -609,7 +631,7 @@ bool win32_window_create(void *data, unsigned style, #endif bool win32_get_metrics(void *data, - enum display_metric_types type, float *value) + enum display_metric_types type, float *value) { #ifdef _XBOX return false; @@ -765,8 +787,8 @@ bool win32_suppress_screensaver(void *data, bool enable) /* FIXME: It should not be necessary to add the W after MONITORINFOEX, but linking fails without it. */ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use, - unsigned *width, unsigned *height, bool fullscreen, bool windowed_full, - RECT *rect, RECT *mon_rect, DWORD *style) + unsigned *width, unsigned *height, bool fullscreen, bool windowed_full, + RECT *rect, RECT *mon_rect, DWORD *style) { #ifndef _XBOX settings_t *settings = config_get_ptr(); @@ -793,7 +815,7 @@ void win32_set_style(MONITORINFOEX *current_mon, HMONITOR *hm_to_use, if (!win32_monitor_set_fullscreen(*width, *height, refresh, current_mon->szDevice)) - {} + {} /* Display settings might have changed, get new coordinates. */ GetMonitorInfo(*hm_to_use, (MONITORINFOEX*)current_mon); diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index b1f2cab663..8b84baaad2 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -85,7 +85,7 @@ static void gdi_render_msg(void *data, const char *msg, gdi_raster_t *font = (gdi_raster_t*)data; float x, y; unsigned width = 0, height = 0; - unsigned newX, newY; + unsigned newX, newY, len; settings_t *settings = config_get_ptr(); const struct font_params *params = (const struct font_params*)userdata; HDC hdc; @@ -110,11 +110,14 @@ static void gdi_render_msg(void *data, const char *msg, if (!font->gdi) return; + len = utf8len(msg); newX = x * width; newY = height - (y * height); hdc = GetDC(hwnd); - TextOut(hdc, newX, newY, msg, utf8len(msg)); + SetBkMode(hdc, TRANSPARENT); + SetTextColor(hdc, RGB(255,255,255)); + TextOut(hdc, newX, newY, msg, len); ReleaseDC(hwnd, hdc); } From 7b057fd43f5fefad2b6b13a25b2748c8e1383a41 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 20:56:32 -0500 Subject: [PATCH 084/427] GDI: add msimg32 library to msvc2010 project --- pkg/msvc/RetroArch-msvc2010.sln | 14 +++++--------- pkg/msvc/msvc-2010/RetroArch-msvc2010.vcxproj | 18 +++++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/pkg/msvc/RetroArch-msvc2010.sln b/pkg/msvc/RetroArch-msvc2010.sln index f72b91f832..8e5df75e23 100644 --- a/pkg/msvc/RetroArch-msvc2010.sln +++ b/pkg/msvc/RetroArch-msvc2010.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +# Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RetroArch-msvc2010", "msvc-2010\RetroArch-msvc2010.vcxproj", "{27FF7CE1-4059-4AA1-8062-FD529560FA54}" EndProject Global @@ -17,20 +17,16 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug Cg|Win32.ActiveCfg = Debug Cg|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug Cg|Win32.Build.0 = Debug Cg|Win32 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug Cg|x64.ActiveCfg = Debug Cg|x64 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug Cg|x64.Build.0 = Debug Cg|x64 + {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug Cg|x64.ActiveCfg = Debug Cg|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug|Win32.ActiveCfg = Debug|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug|Win32.Build.0 = Debug|Win32 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug|x64.ActiveCfg = Debug|x64 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug|x64.Build.0 = Debug|x64 + {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Debug|x64.ActiveCfg = Debug|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release Cg|Win32.ActiveCfg = Release Cg|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release Cg|Win32.Build.0 = Release Cg|Win32 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release Cg|x64.ActiveCfg = Release Cg|x64 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release Cg|x64.Build.0 = Release Cg|x64 + {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release Cg|x64.ActiveCfg = Release Cg|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release|Win32.ActiveCfg = Release|Win32 {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release|Win32.Build.0 = Release|Win32 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release|x64.ActiveCfg = Release|x64 - {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release|x64.Build.0 = Release|x64 + {27FF7CE1-4059-4AA1-8062-FD529560FA54}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/pkg/msvc/msvc-2010/RetroArch-msvc2010.vcxproj b/pkg/msvc/msvc-2010/RetroArch-msvc2010.vcxproj index 77486ca2c9..9cf3332eed 100644 --- a/pkg/msvc/msvc-2010/RetroArch-msvc2010.vcxproj +++ b/pkg/msvc/msvc-2010/RetroArch-msvc2010.vcxproj @@ -1,4 +1,4 @@ - + @@ -192,7 +192,7 @@ Console true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) @@ -211,7 +211,7 @@ Console true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) $(CG_LIB_PATH) @@ -231,7 +231,7 @@ Console true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) @@ -250,7 +250,7 @@ Console true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) $(CG_LIB64_PATH) @@ -275,7 +275,7 @@ true true true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) @@ -299,7 +299,7 @@ true true true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) $(CG_LIB_PATH) @@ -324,7 +324,7 @@ true true true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) @@ -348,7 +348,7 @@ true true true - winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) + msimg32.lib;winmm.lib;Dinput8.lib;dxguid.lib;Iphlpapi.lib;%(AdditionalDependencies) $(CG_LIB64_PATH) From 7dc558344bcd8bc6522aafe60110ae99e8b9ae85 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 21:11:47 -0500 Subject: [PATCH 085/427] GDI: do not draw background with rgui --- gfx/common/win32_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index ef2827e4f3..beb959cc6f 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -542,7 +542,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, HDC hdc = BeginPaint(hwnd, &ps); #ifdef HAVE_MENU - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !gdi_has_menu_frame()) { RECT rect; GetClientRect(hwnd, &rect); From 76b7235dc5a436c72e86ee5f8efab602359ba6c0 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Mon, 16 Jan 2017 22:20:59 -0500 Subject: [PATCH 086/427] msvc2005 buildfix --- gfx/drivers_font/d3d_w32_font.cpp | 2 +- pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_font/d3d_w32_font.cpp b/gfx/drivers_font/d3d_w32_font.cpp index 88ad1b5912..593dee0bff 100644 --- a/gfx/drivers_font/d3d_w32_font.cpp +++ b/gfx/drivers_font/d3d_w32_font.cpp @@ -46,7 +46,7 @@ static void *d3dfonts_w32_init_font(void *video_data, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_PITCH, -#if defined(_MSC_VER) && _WIN32_WINNT > 0x0500 /* MSVC needs w_char* starting with XP */ +#if defined(_MSC_VER) /* MSVC needs w_char* */ L"Verdana" /* Hardcode FTL */ #else "Verdana" diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj index d4788aad7a..cd6fe31110 100644 --- a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(SolutionDir)\..\..\libretro-common\include";"$(SolutionDir)\..\..\libretro-common\include\compat\msvc";"$(SolutionDir)\..\..\gfx\include"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500;_WIN32;RARCH_INTERNAL;HAVE_THREADS;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;WANT_ZLIB;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_RTHREADS;HAVE_DYNAMIC;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;__STDC_CONSTANT_MACROS" + PreprocessorDefinitions="_WIN32_WINNT=0x0500;_WIN32;RARCH_INTERNAL;HAVE_THREADS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_SHADERPIPELINE;HAVE_OPENGL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;WANT_ZLIB;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_RTHREADS;HAVE_DYNAMIC;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;__STDC_CONSTANT_MACROS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -62,6 +62,7 @@ /> Date: Mon, 16 Jan 2017 22:24:35 -0500 Subject: [PATCH 087/427] Announce netplay games to lobby.libretro.com --- network/netplay/netplay_frontend.c | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 89c5ab5535..e460d50209 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -28,6 +28,11 @@ #include "../../input/input_driver.h" #include "../../runloop.h" +#include "tasks/tasks_internal.h" +#include +#include "file_path_special.h" +#include "paths.h" + /* Only used before init_netplay */ static bool netplay_enabled = false; static bool netplay_is_client = false; @@ -827,6 +832,14 @@ void deinit_netplay(void) core_unset_netplay_callbacks(); } + + +static void netplay_announce(void *task_data, void *user_data, const char *error) +{ + RARCH_LOG("Announcing netplay game... \n"); + return; +} + /** * init_netplay * @direct_host : Host to connect to directly, if applicable (client only) @@ -881,6 +894,22 @@ bool init_netplay(void *direct_host, const char *server, unsigned port) runloop_msg_queue_push( msg_hash_to_str(MSG_WAITING_FOR_CLIENT), 0, 180, false); + + rarch_system_info_t *system = NULL; + + runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); + char url [2048] = "http://lobby.libretro.com/?"; + char buf [2048]; + buf[0] = '\0'; + + snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s + &gamename=%s&gamecrc=%08x&port=%d", + url, settings->username, system->info.library_name, + system->info.library_version, + path_basename(path_get(RARCH_PATH_BASENAME)),0, + settings->netplay.port); + + task_push_http_transfer(buf, true, NULL, netplay_announce, NULL); } netplay_data = (netplay_t*)netplay_new( @@ -902,6 +931,8 @@ bool init_netplay(void *direct_host, const char *server, unsigned port) return false; } + + /** * netplay_driver_ctl * From 64dc9bedbf0bd70d8fb5ac0d29c081fa58ba2039 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 06:17:32 +0100 Subject: [PATCH 088/427] Translated browser-directory --- intl/msg_hash_de.c | 17 +++++++++++++---- intl/msg_hash_de.h | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index d2d091cafe..cd360ebfe6 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -123,11 +123,11 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "Suche nach Inhalt. \n" " \n" "Um Inhalte zu laden brauchst du\n" - "einen 'Core' und den Inhalt. \n" + "einen 'Core'. \n" " \n" - "Um einzustellen wo das Menü beginnt \n" + "Um einzustellen wo das Verzeichnis beginnt, \n" "setze das \n" - "'File Browser Directory'. \n" // @TODO: Where is this setting? + "'%s'. \n" "Falls diese nicht gesetzt ist, startet \n" "die Suche beim obersten Verzeichnis.\n" " \n" @@ -135,7 +135,8 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "Nur Inhalte mit der Dateiendung, welche \n" "mit den ausgewählten Core funktionieren \n" "werden angezeigt. \n" - "Dieser Core wird dann auch für den Inhalt verwendet." + "Dieser Core wird dann auch für den Inhalt verwendet.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY) ); break; case MENU_ENUM_LABEL_VIDEO_DRIVER: @@ -329,6 +330,14 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) "Die Zurückspulfunktion muss eingeschaltet \n" "sein."); break; + case MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY: + snprintf(s, len, + "%s. \n" + " \n" + "Setzt das Startverzeichnis des Dateibrowsers.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY) + ); + break; case MENU_ENUM_LABEL_EXIT_EMULATOR: snprintf(s, len, "Taste zum Beenden von RetroArch." diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 2eb6113d08..540bb23633 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -535,7 +535,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS, "Zurückspul-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, - "Browser-Directory") + "Dateibrowser-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "Konfigurations-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, From 0eef01205bceb70a099543e66f9d4ecb84e4c6db Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 06:27:38 +0100 Subject: [PATCH 089/427] Changed Content to Inhalt --- intl/msg_hash_de.c | 24 ++++++++++++++++++++++++ intl/msg_hash_de.h | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index cd360ebfe6..61b1e73ab0 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -431,6 +431,30 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) case MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE: snprintf(s, len, "Erfolgsliste (Hardcore)"); break; + case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: + snprintf(s, len, + "Um Inhalte zu suchen, gehe zu '%s' und\n" + "wähle entweder '%s' oder '%s'.\n" + " \n" + "Die Dateien werden mit Einträgen in der\n" + "Datenbank verglichen.\n" + "Wenn es einen Treffer gibt, wird der Inhalt\n" + "zur Sammlung hinzugefügt.\n" + " \n" + "Danach kannst du einfach den Inhalt unter\n" + "'%s' -> '%s' laden,\n" + "anstatt jedesmal die Datei neu zu suchen.\n" + " \n" + "WICHTIG: Inhalte für einige Cores sind zum\n" + "Teil noch nicht scannbar." + , + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST) + ); + break; case MENU_ENUM_LABEL_VALUE_MENU_ENUM_CONTROLS_PROLOG: snprintf(s, len, "Du kannst folgende Steuerelemente mit\n" diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 540bb23633..f68ee51d4c 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -297,9 +297,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_LINEAR, MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_ARCHIVE, "Archiv laden") MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY, - "Content laden (Verlauf)") /* FIXME/UPDATE */ + "Inhalt laden (Verlauf)") /* FIXME/UPDATE */ MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST, - "Content laden") + "Inhalt laden") MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_STATE, "Savestate laden") MSG_HASH(MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW, From fb3f5c8e60eb28ca5be661e531b08d8104deac86 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 07:58:38 +0100 Subject: [PATCH 090/427] Added message for virtual gamepad information --- intl/msg_hash_de.c | 50 ++++++++++++++++++++++++---------------------- intl/msg_hash_us.c | 16 +++++++-------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 61b1e73ab0..46ba01ceed 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -431,30 +431,32 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) case MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE: snprintf(s, len, "Erfolgsliste (Hardcore)"); break; - case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: - snprintf(s, len, - "Um Inhalte zu suchen, gehe zu '%s' und\n" - "wähle entweder '%s' oder '%s'.\n" - " \n" - "Die Dateien werden mit Einträgen in der\n" - "Datenbank verglichen.\n" - "Wenn es einen Treffer gibt, wird der Inhalt\n" - "zur Sammlung hinzugefügt.\n" - " \n" - "Danach kannst du einfach den Inhalt unter\n" - "'%s' -> '%s' laden,\n" - "anstatt jedesmal die Datei neu zu suchen.\n" - " \n" - "WICHTIG: Inhalte für einige Cores sind zum\n" - "Teil noch nicht scannbar." - , - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST) - ); - break; + case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: + + break; + case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: + snprintf(s, len, + "Um Inhalte zu suchen, gehe zu '%s' und\n" + "wähle entweder '%s' oder '%s'.\n" + " \n" + "Die Dateien werden mit Einträgen in der\n" + "Datenbank verglichen.\n" + "Wenn es einen Treffer gibt, wird der Inhalt\n" + "zur Sammlung hinzugefügt.\n" + " \n" + "Danach kannst du einfach den Inhalt unter\n" + "'%s' -> '%s' laden,\n" + "anstatt jedesmal die Datei neu zu suchen.\n" + " \n" + "WICHTIG: Inhalte für einige Cores sind zum\n" + "Teil noch nicht scannbar.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST) + ); + break; case MENU_ENUM_LABEL_VALUE_MENU_ENUM_CONTROLS_PROLOG: snprintf(s, len, "Du kannst folgende Steuerelemente mit\n" diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index e26c88cd67..e4b5b247ad 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -1913,16 +1913,16 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) break; case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: snprintf(s, len, - "You can change the virtual gamepad overlay\n" - "by going to '%s' -> '%s'." + "Du kannst das virtuelle Gamepad-Overlay\n" + "unter '%s' -> '%s' ändern." " \n" - "From there you can change the overlay,\n" - "change the size and opacity of the buttons, etc.\n" + "Darin kannst du die Grösse, die Transparenz\n" + "und vieles mehr anpassen.\n" " \n" - "NOTE: By default, virtual gamepad overlays are\n" - "hidden when in the menu.\n" - "If you'd like to change this behavior,\n" - "you can set '%s' to false.", + "WICHTIG: Standartmässig, ist das virtuelle\n" + "Gamepad-Overlay im Menü nicht ersichtlich.\n" + "Wenn du dies ändern möchtest,\n" + "kannst du '%s' auf Nein stellen.", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU) From f28be42b2d236bdbbba124eb2cf0f03899d297d8 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 08:23:24 +0100 Subject: [PATCH 091/427] Added help message for gamebad overlays --- intl/msg_hash_de.c | 17 ++++++++++++++++- intl/msg_hash_us.c | 16 ++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index 46ba01ceed..ca1600c819 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -432,7 +432,22 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) snprintf(s, len, "Erfolgsliste (Hardcore)"); break; case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: - + snprintf(s, len, + "Du kannst das virtuelle Gamepad-Overlay\n" + "unter '%s' -> '%s' ändern." + " \n" + "Darin kannst du die Grösse, die Transparenz\n" + "und vieles mehr anpassen.\n" + " \n" + "WICHTIG: Standartmässig, ist das virtuelle\n" + "Gamepad-Overlay im Menü nicht ersichtlich.\n" + "Wenn du dies ändern möchtest,\n" + "kannst du '%s' auf Nein stellen.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU) + ); + break; break; case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: snprintf(s, len, diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index e4b5b247ad..e26c88cd67 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -1913,16 +1913,16 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) break; case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: snprintf(s, len, - "Du kannst das virtuelle Gamepad-Overlay\n" - "unter '%s' -> '%s' ändern." + "You can change the virtual gamepad overlay\n" + "by going to '%s' -> '%s'." " \n" - "Darin kannst du die Grösse, die Transparenz\n" - "und vieles mehr anpassen.\n" + "From there you can change the overlay,\n" + "change the size and opacity of the buttons, etc.\n" " \n" - "WICHTIG: Standartmässig, ist das virtuelle\n" - "Gamepad-Overlay im Menü nicht ersichtlich.\n" - "Wenn du dies ändern möchtest,\n" - "kannst du '%s' auf Nein stellen.", + "NOTE: By default, virtual gamepad overlays are\n" + "hidden when in the menu.\n" + "If you'd like to change this behavior,\n" + "you can set '%s' to false.", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU) From 2ab25b9c734574a5dc44d33f9d6bc4a5060ee9dd Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 10:05:09 +0100 Subject: [PATCH 092/427] Added debuging information in german --- intl/msg_hash_de.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index ca1600c819..ef25be476c 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -431,6 +431,39 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) case MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE: snprintf(s, len, "Erfolgsliste (Hardcore)"); break; + case MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING_DESC: + { + /* Work around C89 limitations */ + char u[501]; + const char * t = + "RetroArch verwendet eine einzigartige\n" + "Art der Synchronisation von Audio/Video.\n" + "Diese wird durch die Bildwiederholrate\n" + "des Monitors kalibriert.\n" + "\n" + "Falls du irgenwelches Knistern oder Risse\n" + "feststellst, kannst du folgende Möglichkeiten:\n" + "\n"; + snprintf(u, sizeof(u), + "a) Gehe zu '%s' -> '%s' und aktiviere\n" + "'%s'. Die Bildwiederholungsrate spielt\n" + "in diesem Modus keine Rolle. \n" + "Die Bildwiederholungsrate wird höher sein,\n" + "allerdings läuft das Video weniger flüssig.\n" + "b) Gehe zu '%s' -> '%s' und beachte\n" + "'%s'. Lass es bis 2048 Frames laufen und\n" + "bestätige mit 'OK'.\n", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_THREADED), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO) + ); + strlcpy(s, t, len); + strlcat(s, u, len); + } + break; case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: snprintf(s, len, "Du kannst das virtuelle Gamepad-Overlay\n" From d71580b084909725c5d908d3bc2bf8914514590b Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 10:20:04 +0100 Subject: [PATCH 093/427] Formatted translation file properly --- intl/msg_hash_us.c | 3765 ++++++++++++++++++++++---------------------- 1 file changed, 1871 insertions(+), 1894 deletions(-) diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index e26c88cd67..bad38e3e5f 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -24,1917 +24,1896 @@ #include "../configuration.h" #include "../verbosity.h" -int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) -{ - uint32_t driver_hash = 0; - settings_t *settings = config_get_ptr(); +int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) { + uint32_t driver_hash = 0; + settings_t *settings = config_get_ptr(); - if (msg <= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_END && - msg >= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN) - { - unsigned idx = msg - MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN; + if (msg <= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_END && + msg >= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN) { + unsigned idx = msg - MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN; - switch (idx) - { - case RARCH_FAST_FORWARD_KEY: - snprintf(s, len, - "Toggles between fast-forwarding and \n" - "normal speed." - ); - break; - case RARCH_FAST_FORWARD_HOLD_KEY: - snprintf(s, len, - "Hold for fast-forward. \n" - " \n" - "Releasing button disables fast-forward." - ); - break; - case RARCH_PAUSE_TOGGLE: - snprintf(s, len, - "Toggle between paused and non-paused state."); - break; - case RARCH_FRAMEADVANCE: - snprintf(s, len, - "Frame advance when content is paused."); - break; - case RARCH_SHADER_NEXT: - snprintf(s, len, - "Applies next shader in directory."); - break; - case RARCH_SHADER_PREV: - snprintf(s, len, - "Applies previous shader in directory."); - break; - case RARCH_CHEAT_INDEX_PLUS: - case RARCH_CHEAT_INDEX_MINUS: - case RARCH_CHEAT_TOGGLE: - snprintf(s, len, - "Cheats."); - break; - case RARCH_RESET: - snprintf(s, len, - "Reset the content."); - break; - case RARCH_SCREENSHOT: - snprintf(s, len, - "Take screenshot."); - break; - case RARCH_MUTE: - snprintf(s, len, - "Mute/unmute audio."); - break; - case RARCH_OSK: - snprintf(s, len, - "Toggles onscreen keyboard."); - break; - case RARCH_NETPLAY_FLIP: - snprintf(s, len, - "Netplay flip users."); - break; - case RARCH_NETPLAY_GAME_WATCH: - snprintf(s, len, - "Netplay toggle play/spectate mode."); - break; - case RARCH_SLOWMOTION: - snprintf(s, len, - "Hold for slowmotion."); - break; - case RARCH_ENABLE_HOTKEY: - snprintf(s, len, - "Enable other hotkeys. \n" - " \n" - "If this hotkey is bound to either\n" - "a keyboard, joybutton or joyaxis, \n" - "all other hotkeys will be enabled only \n" - "if this one is held at the same time. \n" - " \n" - "This is useful for RETRO_KEYBOARD centric \n" - "implementations which query a large area of \n" - "the keyboard, where it is not desirable that \n" - "hotkeys get in the way. \n" - " \n" - "Alternatively, all hotkeys for keyboard \n" - "could be disabled by the user."); - break; - case RARCH_VOLUME_UP: - snprintf(s, len, - "Increases audio volume."); - break; - case RARCH_VOLUME_DOWN: - snprintf(s, len, - "Decreases audio volume."); - break; - case RARCH_OVERLAY_NEXT: - snprintf(s, len, - "Switches to next overlay. Wraps around."); - break; - case RARCH_DISK_EJECT_TOGGLE: - snprintf(s, len, - "Toggles eject for disks. \n" - " \n" - "Used for multiple-disk content. "); - break; - case RARCH_DISK_NEXT: - case RARCH_DISK_PREV: - snprintf(s, len, - "Cycles through disk images. Use after ejecting. \n" - " \n" - "Complete by toggling eject again."); - break; - case RARCH_GRAB_MOUSE_TOGGLE: - snprintf(s, len, - "Toggles mouse grab. \n" - " \n" - "When mouse is grabbed, RetroArch hides the \n" - "mouse, and keeps the mouse pointer inside \n" - "the window to allow relative mouse input to \n" - "work better."); - break; - case RARCH_GAME_FOCUS_TOGGLE: - snprintf(s, len, - "Toggles game focus.\n" - " \n" - "When a game has focus, RetroArch will both disable \n" - "hotkeys and keep/warp the mouse pointer inside the window."); - break; - case RARCH_MENU_TOGGLE: - snprintf(s, len, "Toggles menu."); - break; - case RARCH_LOAD_STATE_KEY: - snprintf(s, len, - "Loads state."); - break; - case RARCH_FULLSCREEN_TOGGLE_KEY: - snprintf(s, len, - "Toggles fullscreen."); - break; - case RARCH_QUIT_KEY: - snprintf(s, len, - "Key to exit RetroArch cleanly. \n" - " \n" - "Killing it in any hard way (SIGKILL, etc.) will \n" - "terminate RetroArch without saving RAM, etc." + switch (idx) { + case RARCH_FAST_FORWARD_KEY: + snprintf(s, len, + "Toggles between fast-forwarding and \n" + "normal speed." + ); + break; + case RARCH_FAST_FORWARD_HOLD_KEY: + snprintf(s, len, + "Hold for fast-forward. \n" + " \n" + "Releasing button disables fast-forward." + ); + break; + case RARCH_PAUSE_TOGGLE: + snprintf(s, len, + "Toggle between paused and non-paused state."); + break; + case RARCH_FRAMEADVANCE: + snprintf(s, len, + "Frame advance when content is paused."); + break; + case RARCH_SHADER_NEXT: + snprintf(s, len, + "Applies next shader in directory."); + break; + case RARCH_SHADER_PREV: + snprintf(s, len, + "Applies previous shader in directory."); + break; + case RARCH_CHEAT_INDEX_PLUS: + case RARCH_CHEAT_INDEX_MINUS: + case RARCH_CHEAT_TOGGLE: + snprintf(s, len, + "Cheats."); + break; + case RARCH_RESET: + snprintf(s, len, + "Reset the content."); + break; + case RARCH_SCREENSHOT: + snprintf(s, len, + "Take screenshot."); + break; + case RARCH_MUTE: + snprintf(s, len, + "Mute/unmute audio."); + break; + case RARCH_OSK: + snprintf(s, len, + "Toggles onscreen keyboard."); + break; + case RARCH_NETPLAY_FLIP: + snprintf(s, len, + "Netplay flip users."); + break; + case RARCH_NETPLAY_GAME_WATCH: + snprintf(s, len, + "Netplay toggle play/spectate mode."); + break; + case RARCH_SLOWMOTION: + snprintf(s, len, + "Hold for slowmotion."); + break; + case RARCH_ENABLE_HOTKEY: + snprintf(s, len, + "Enable other hotkeys. \n" + " \n" + "If this hotkey is bound to either\n" + "a keyboard, joybutton or joyaxis, \n" + "all other hotkeys will be enabled only \n" + "if this one is held at the same time. \n" + " \n" + "This is useful for RETRO_KEYBOARD centric \n" + "implementations which query a large area of \n" + "the keyboard, where it is not desirable that \n" + "hotkeys get in the way. \n" + " \n" + "Alternatively, all hotkeys for keyboard \n" + "could be disabled by the user."); + break; + case RARCH_VOLUME_UP: + snprintf(s, len, + "Increases audio volume."); + break; + case RARCH_VOLUME_DOWN: + snprintf(s, len, + "Decreases audio volume."); + break; + case RARCH_OVERLAY_NEXT: + snprintf(s, len, + "Switches to next overlay. Wraps around."); + break; + case RARCH_DISK_EJECT_TOGGLE: + snprintf(s, len, + "Toggles eject for disks. \n" + " \n" + "Used for multiple-disk content. "); + break; + case RARCH_DISK_NEXT: + case RARCH_DISK_PREV: + snprintf(s, len, + "Cycles through disk images. Use after ejecting. \n" + " \n" + "Complete by toggling eject again."); + break; + case RARCH_GRAB_MOUSE_TOGGLE: + snprintf(s, len, + "Toggles mouse grab. \n" + " \n" + "When mouse is grabbed, RetroArch hides the \n" + "mouse, and keeps the mouse pointer inside \n" + "the window to allow relative mouse input to \n" + "work better."); + break; + case RARCH_GAME_FOCUS_TOGGLE: + snprintf(s, len, + "Toggles game focus.\n" + " \n" + "When a game has focus, RetroArch will both disable \n" + "hotkeys and keep/warp the mouse pointer inside the window."); + break; + case RARCH_MENU_TOGGLE: + snprintf(s, len, "Toggles menu."); + break; + case RARCH_LOAD_STATE_KEY: + snprintf(s, len, + "Loads state."); + break; + case RARCH_FULLSCREEN_TOGGLE_KEY: + snprintf(s, len, + "Toggles fullscreen."); + break; + case RARCH_QUIT_KEY: + snprintf(s, len, + "Key to exit RetroArch cleanly. \n" + " \n" + "Killing it in any hard way (SIGKILL, etc.) will \n" + "terminate RetroArch without saving RAM, etc." #ifdef __unix__ - "\nOn Unix-likes, SIGINT/SIGTERM allows a clean \n" - "deinitialization." + "\nOn Unix-likes, SIGINT/SIGTERM allows a clean \n" + "deinitialization." #endif - ""); - break; - case RARCH_STATE_SLOT_PLUS: - case RARCH_STATE_SLOT_MINUS: - snprintf(s, len, - "State slots. \n" - " \n" - "With slot set to 0, save state name is \n" - "*.state (or whatever defined on commandline). \n" - " \n" - "When slot is not 0, path will be , \n" - "where is slot number."); - break; - case RARCH_SAVE_STATE_KEY: - snprintf(s, len, - "Saves state."); - break; - case RARCH_REWIND: - snprintf(s, len, - "Hold button down to rewind. \n" - " \n" - "Rewinding must be enabled."); - break; - case RARCH_MOVIE_RECORD_TOGGLE: - snprintf(s, len, - "Toggle between recording and not."); - break; - default: - if (string_is_empty(s)) - strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); - break; - } + ""); + break; + case RARCH_STATE_SLOT_PLUS: + case RARCH_STATE_SLOT_MINUS: + snprintf(s, len, + "State slots. \n" + " \n" + "With slot set to 0, save state name is \n" + "*.state (or whatever defined on commandline). \n" + " \n" + "When slot is not 0, path will be , \n" + "where is slot number."); + break; + case RARCH_SAVE_STATE_KEY: + snprintf(s, len, + "Saves state."); + break; + case RARCH_REWIND: + snprintf(s, len, + "Hold button down to rewind. \n" + " \n" + "Rewinding must be enabled."); + break; + case RARCH_MOVIE_RECORD_TOGGLE: + snprintf(s, len, + "Toggle between recording and not."); + break; + default: + if (string_is_empty(s)) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + break; + } - return 0; - } + return 0; + } - switch (msg) - { - case MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS: - snprintf(s, len, "Login details for your \n" - "Retro Achievements account. \n" - " \n" - "Visit retroachievements.org and sign up \n" - "for a free account. \n" - " \n" - "After you are done registering, you need \n" - "to input the username and password into \n" - "RetroArch."); - break; - case MENU_ENUM_LABEL_CHEEVOS_USERNAME: - snprintf(s, len, "Username for your Retro Achievements account."); - break; - case MENU_ENUM_LABEL_CHEEVOS_PASSWORD: - snprintf(s, len, "Password for your Retro Achievements account."); - break; - case MENU_ENUM_LABEL_USER_LANGUAGE: - snprintf(s, len, "Localizes the menu and all onscreen messages \n" - "according to the language you have selected \n" - "here. \n" - " \n" - "Requires a restart for the changes \n" - "to take effect. \n" - " \n" - "Note: not all languages might be currently \n" - "implemented. \n" - " \n" - "In case a language is not implemented, \n" - "we fallback to English."); - break; - case MENU_ENUM_LABEL_VIDEO_FONT_PATH: - snprintf(s, len, "Change the font that is used \n" - "for the Onscreen Display text."); - break; - case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS: - snprintf(s, len, "Automatically load content-specific core options."); - break; - case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE: - snprintf(s, len, "Automatically load override configurations."); - break; - case MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE: - snprintf(s, len, "Automatically load input remapping files."); - break; - case MENU_ENUM_LABEL_SORT_SAVESTATES_ENABLE: - snprintf(s, len, "Sort save states in folders \n" - "named after the libretro core used."); - break; - case MENU_ENUM_LABEL_SORT_SAVEFILES_ENABLE: - snprintf(s, len, "Sort save files in folders \n" - "named after the libretro core used."); - break; - case MENU_ENUM_LABEL_RESUME_CONTENT: - snprintf(s, len, "Exits from the menu and returns back \n" - "to the content."); - break; - case MENU_ENUM_LABEL_RESTART_CONTENT: - snprintf(s, len, "Restarts the content from the beginning."); - break; - case MENU_ENUM_LABEL_CLOSE_CONTENT: - snprintf(s, len, "Closes the content and unloads it from \n" - "memory."); - break; - case MENU_ENUM_LABEL_UNDO_LOAD_STATE: - snprintf(s, len, "If a state was loaded, content will \n" - "go back to the state prior to loading."); - break; - case MENU_ENUM_LABEL_UNDO_SAVE_STATE: - snprintf(s, len, "If a state was overwritten, it will \n" - "roll back to the previous save state."); - break; - case MENU_ENUM_LABEL_TAKE_SCREENSHOT: - snprintf(s, len, "Create a screenshot. \n" - " \n" - "The screenshot will be stored inside the \n" - "Screenshot Directory."); - break; - case MENU_ENUM_LABEL_RUN: - snprintf(s, len, "Start the content."); - break; - case MENU_ENUM_LABEL_INFORMATION: - snprintf(s, len, "Show additional metadata information \n" - "about the content."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_CONFIG: - snprintf(s, len, "Configuration file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_COMPRESSED_ARCHIVE: - snprintf(s, len, "Compressed archive file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_RECORD_CONFIG: - snprintf(s, len, "Recording configuration file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_CURSOR: - snprintf(s, len, "Database cursor file."); - break; - case MENU_ENUM_LABEL_FILE_CONFIG: - snprintf(s, len, "Configuration file."); - break; - case MENU_ENUM_LABEL_SCAN_THIS_DIRECTORY: - snprintf(s, len, - "Select this to scan the current directory \n" - "for content."); - break; - case MENU_ENUM_LABEL_USE_THIS_DIRECTORY: - snprintf(s, len, - "Select this to set this as the directory."); - break; - case MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY: - snprintf(s, len, - "Content Database Directory. \n" - " \n" - "Path to content database \n" - "directory."); - break; - case MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY: - snprintf(s, len, - "Thumbnails Directory. \n" - " \n" - "To store thumbnail files."); - break; - case MENU_ENUM_LABEL_LIBRETRO_INFO_PATH: - snprintf(s, len, - "Core Info Directory. \n" - " \n" - "A directory for where to search \n" - "for libretro core information."); - break; - case MENU_ENUM_LABEL_PLAYLIST_DIRECTORY: - snprintf(s, len, - "Playlist Directory. \n" - " \n" - "Save all playlist files to this \n" - "directory."); - break; - case MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN: - snprintf(s, len, - "Some cores might have \n" - "a shutdown feature. \n" - " \n" - "If this option is left disabled, \n" - "selecting the shutdown procedure \n" - "would trigger RetroArch being shut \n" - "down. \n" - " \n" - "Enabling this option will load a \n" - "dummy core instead so that we remain \n" - "inside the menu and RetroArch won't \n" - "shutdown."); - break; - case MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE: - snprintf(s, len, - "Some cores might need \n" - "firmware or bios files. \n" - " \n" - "If this option is disabled, \n" - "it will try to load even if such \n" - "firmware is missing. \n" - "down. \n"); - break; - case MENU_ENUM_LABEL_PARENT_DIRECTORY: - snprintf(s, len, - "Go back to the parent directory."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_SHADER_PRESET: - snprintf(s, len, - "Shader preset file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_SHADER: - snprintf(s, len, - "Shader file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_REMAP: - snprintf(s, len, - "Remap controls file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_CHEAT: - snprintf(s, len, - "Cheat file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_OVERLAY: - snprintf(s, len, - "Overlay file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_RDB: - snprintf(s, len, - "Database file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_FONT: - snprintf(s, len, - "TrueType font file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_PLAIN_FILE: - snprintf(s, len, - "Plain file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_MOVIE_OPEN: - snprintf(s, len, - "Video. \n" - " \n" - "Select it to open this file with the \n" - "video player."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_MUSIC_OPEN: - snprintf(s, len, - "Music. \n" - " \n" - "Select it to open this file with the \n" - "music player."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_IMAGE: - snprintf(s, len, - "Image file."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_IMAGE_OPEN_WITH_VIEWER: - snprintf(s, len, - "Image. \n" - " \n" - "Select it to open this file with the \n" - "image viewer."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION: - snprintf(s, len, - "Libretro core. \n" - " \n" - "Selecting this will associate this core \n" - "to the game."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_CORE: - snprintf(s, len, - "Libretro core. \n" - " \n" - "Select this file to have RetroArch load this core."); - break; - case MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY: - snprintf(s, len, - "Directory. \n" - " \n" - "Select it to open this directory."); - break; - case MENU_ENUM_LABEL_CACHE_DIRECTORY: - snprintf(s, len, - "Cache Directory. \n" - " \n" - "Content decompressed by RetroArch will be \n" - "temporarily extracted to this directory."); - break; - case MENU_ENUM_LABEL_HISTORY_LIST_ENABLE: - snprintf(s, len, - "If enabled, every content loaded \n" - "in RetroArch will be automatically \n" - "added to the recent history list."); - break; - case MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY: - snprintf(s, len, - "File Browser Directory. \n" - " \n" - "Sets start directory for menu file browser."); - break; - case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR: - snprintf(s, len, - "Influence how input polling is done inside \n" - "RetroArch. \n" - " \n" - "Early - Input polling is performed before \n" - "the frame is processed. \n" - "Normal - Input polling is performed when \n" - "polling is requested. \n" - "Late - Input polling is performed on \n" - "first input state request per frame.\n" - " \n" - "Setting it to 'Early' or 'Late' can result \n" - "in less latency, \n" - "depending on your configuration.\n\n" - "When netplay is enabled, the default polling \n" - "behavior (Normal) will be used, \n" - "regardless of the value set here." - ); - break; - case MENU_ENUM_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND: - snprintf(s, len, - "Hide input descriptors that were not set \n" - "by the core."); - break; - case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE: - snprintf(s, len, - "Video refresh rate of your monitor. \n" - "Used to calculate a suitable audio input rate."); - break; - case MENU_ENUM_LABEL_VIDEO_FORCE_SRGB_DISABLE: - snprintf(s, len, - "Forcibly disable sRGB FBO support. Some Intel \n" - "OpenGL drivers on Windows have video problems \n" - "with sRGB FBO support enabled."); - break; - case MENU_ENUM_LABEL_AUDIO_ENABLE: - snprintf(s, len, - "Enable audio output."); - break; - case MENU_ENUM_LABEL_AUDIO_SYNC: - snprintf(s, len, - "Synchronize audio (recommended)."); - break; - case MENU_ENUM_LABEL_AUDIO_LATENCY: - snprintf(s, len, - "Desired audio latency in milliseconds. \n" - "Might not be honored if the audio driver \n" - "can't provide given latency."); - break; - case MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE: - snprintf(s, len, - "Allow cores to set rotation. If false, \n" - "rotation requests are honored, but ignored.\n\n" - "Used for setups where one manually rotates \n" - "the monitor."); - break; - case MENU_ENUM_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW: - snprintf(s, len, - "Show the input descriptors set by the core \n" - "instead of the default ones."); - break; - case MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE: - snprintf(s, len, - "Number of entries that will be kept in \n" - "content history playlist."); - break; - case MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN: - snprintf(s, len, - "To use windowed mode or not when going \n" - "fullscreen."); - break; - case MENU_ENUM_LABEL_VIDEO_FONT_SIZE: - snprintf(s, len, - "Font size for on-screen messages."); - break; - case MENU_ENUM_LABEL_SAVESTATE_AUTO_INDEX: - snprintf(s, len, - "Automatically increment slot index on each save, \n" - "generating multiple savestate files. \n" - "When the content is loaded, state slot will be \n" - "set to the highest existing value (last savestate)."); - break; - case MENU_ENUM_LABEL_FPS_SHOW: - snprintf(s, len, - "Enables displaying the current frames \n" - "per second."); - break; - case MENU_ENUM_LABEL_VIDEO_FONT_ENABLE: - snprintf(s, len, - "Show and/or hide onscreen messages."); - break; - case MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X: - case MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y: - snprintf(s, len, - "Offset for where messages will be placed \n" - "onscreen. Values are in range [0.0, 1.0]."); - break; - case MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE: - snprintf(s, len, - "Enable or disable the current overlay."); - break; - case MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU: - snprintf(s, len, - "Hide the current overlay from appearing \n" - "inside the menu."); - break; - case MENU_ENUM_LABEL_OVERLAY_PRESET: - snprintf(s, len, - "Path to input overlay."); - break; - case MENU_ENUM_LABEL_OVERLAY_OPACITY: - snprintf(s, len, - "Overlay opacity."); - break; - case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT: - snprintf(s, len, - "Input bind timer timeout (in seconds). \n" - "Amount of seconds to wait until proceeding \n" - "to the next bind."); - break; - case MENU_ENUM_LABEL_OVERLAY_SCALE: - snprintf(s, len, - "Overlay scale."); - break; - case MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE: - snprintf(s, len, - "Audio output samplerate."); - break; - case MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT: - snprintf(s, len, - "Set to true if hardware-rendered cores \n" - "should get their private context. \n" - "Avoids having to assume hardware state changes \n" - "inbetween frames." - ); - break; - case MENU_ENUM_LABEL_CORE_LIST: - snprintf(s, len, - "Load Core. \n" - " \n" - "Browse for a libretro core \n" - "implementation. Where the browser \n" - "starts depends on your Core Directory \n" - "path. If blank, it will start in root. \n" - " \n" - "If Core Directory is a directory, the menu \n" - "will use that as top folder. If Core \n" - "Directory is a full path, it will start \n" - "in the folder where the file is."); - break; - case MENU_ENUM_LABEL_VALUE_MENU_ENUM_CONTROLS_PROLOG: - snprintf(s, len, - "You can use the following controls below \n" - "on either your gamepad or keyboard in order\n" - "to control the menu: \n" - " \n" - ); - break; - case MENU_ENUM_LABEL_WELCOME_TO_RETROARCH: - snprintf(s, len, - "Welcome to RetroArch\n" - ); - break; - case MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING_DESC: - { + switch (msg) { + case MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS: + snprintf(s, len, "Login details for your \n" + "Retro Achievements account. \n" + " \n" + "Visit retroachievements.org and sign up \n" + "for a free account. \n" + " \n" + "After you are done registering, you need \n" + "to input the username and password into \n" + "RetroArch."); + break; + case MENU_ENUM_LABEL_CHEEVOS_USERNAME: + snprintf(s, len, "Username for your Retro Achievements account."); + break; + case MENU_ENUM_LABEL_CHEEVOS_PASSWORD: + snprintf(s, len, "Password for your Retro Achievements account."); + break; + case MENU_ENUM_LABEL_USER_LANGUAGE: + snprintf(s, len, "Localizes the menu and all onscreen messages \n" + "according to the language you have selected \n" + "here. \n" + " \n" + "Requires a restart for the changes \n" + "to take effect. \n" + " \n" + "Note: not all languages might be currently \n" + "implemented. \n" + " \n" + "In case a language is not implemented, \n" + "we fallback to English."); + break; + case MENU_ENUM_LABEL_VIDEO_FONT_PATH: + snprintf(s, len, "Change the font that is used \n" + "for the Onscreen Display text."); + break; + case MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS: + snprintf(s, len, "Automatically load content-specific core options."); + break; + case MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE: + snprintf(s, len, "Automatically load override configurations."); + break; + case MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE: + snprintf(s, len, "Automatically load input remapping files."); + break; + case MENU_ENUM_LABEL_SORT_SAVESTATES_ENABLE: + snprintf(s, len, "Sort save states in folders \n" + "named after the libretro core used."); + break; + case MENU_ENUM_LABEL_SORT_SAVEFILES_ENABLE: + snprintf(s, len, "Sort save files in folders \n" + "named after the libretro core used."); + break; + case MENU_ENUM_LABEL_RESUME_CONTENT: + snprintf(s, len, "Exits from the menu and returns back \n" + "to the content."); + break; + case MENU_ENUM_LABEL_RESTART_CONTENT: + snprintf(s, len, "Restarts the content from the beginning."); + break; + case MENU_ENUM_LABEL_CLOSE_CONTENT: + snprintf(s, len, "Closes the content and unloads it from \n" + "memory."); + break; + case MENU_ENUM_LABEL_UNDO_LOAD_STATE: + snprintf(s, len, "If a state was loaded, content will \n" + "go back to the state prior to loading."); + break; + case MENU_ENUM_LABEL_UNDO_SAVE_STATE: + snprintf(s, len, "If a state was overwritten, it will \n" + "roll back to the previous save state."); + break; + case MENU_ENUM_LABEL_TAKE_SCREENSHOT: + snprintf(s, len, "Create a screenshot. \n" + " \n" + "The screenshot will be stored inside the \n" + "Screenshot Directory."); + break; + case MENU_ENUM_LABEL_RUN: + snprintf(s, len, "Start the content."); + break; + case MENU_ENUM_LABEL_INFORMATION: + snprintf(s, len, "Show additional metadata information \n" + "about the content."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_CONFIG: + snprintf(s, len, "Configuration file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_COMPRESSED_ARCHIVE: + snprintf(s, len, "Compressed archive file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_RECORD_CONFIG: + snprintf(s, len, "Recording configuration file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_CURSOR: + snprintf(s, len, "Database cursor file."); + break; + case MENU_ENUM_LABEL_FILE_CONFIG: + snprintf(s, len, "Configuration file."); + break; + case MENU_ENUM_LABEL_SCAN_THIS_DIRECTORY: + snprintf(s, len, + "Select this to scan the current directory \n" + "for content."); + break; + case MENU_ENUM_LABEL_USE_THIS_DIRECTORY: + snprintf(s, len, + "Select this to set this as the directory."); + break; + case MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY: + snprintf(s, len, + "Content Database Directory. \n" + " \n" + "Path to content database \n" + "directory."); + break; + case MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY: + snprintf(s, len, + "Thumbnails Directory. \n" + " \n" + "To store thumbnail files."); + break; + case MENU_ENUM_LABEL_LIBRETRO_INFO_PATH: + snprintf(s, len, + "Core Info Directory. \n" + " \n" + "A directory for where to search \n" + "for libretro core information."); + break; + case MENU_ENUM_LABEL_PLAYLIST_DIRECTORY: + snprintf(s, len, + "Playlist Directory. \n" + " \n" + "Save all playlist files to this \n" + "directory."); + break; + case MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN: + snprintf(s, len, + "Some cores might have \n" + "a shutdown feature. \n" + " \n" + "If this option is left disabled, \n" + "selecting the shutdown procedure \n" + "would trigger RetroArch being shut \n" + "down. \n" + " \n" + "Enabling this option will load a \n" + "dummy core instead so that we remain \n" + "inside the menu and RetroArch won't \n" + "shutdown."); + break; + case MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE: + snprintf(s, len, + "Some cores might need \n" + "firmware or bios files. \n" + " \n" + "If this option is disabled, \n" + "it will try to load even if such \n" + "firmware is missing. \n" + "down. \n"); + break; + case MENU_ENUM_LABEL_PARENT_DIRECTORY: + snprintf(s, len, + "Go back to the parent directory."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_SHADER_PRESET: + snprintf(s, len, + "Shader preset file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_SHADER: + snprintf(s, len, + "Shader file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_REMAP: + snprintf(s, len, + "Remap controls file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_CHEAT: + snprintf(s, len, + "Cheat file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_OVERLAY: + snprintf(s, len, + "Overlay file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_RDB: + snprintf(s, len, + "Database file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_FONT: + snprintf(s, len, + "TrueType font file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_PLAIN_FILE: + snprintf(s, len, + "Plain file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_MOVIE_OPEN: + snprintf(s, len, + "Video. \n" + " \n" + "Select it to open this file with the \n" + "video player."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_MUSIC_OPEN: + snprintf(s, len, + "Music. \n" + " \n" + "Select it to open this file with the \n" + "music player."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_IMAGE: + snprintf(s, len, + "Image file."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_IMAGE_OPEN_WITH_VIEWER: + snprintf(s, len, + "Image. \n" + " \n" + "Select it to open this file with the \n" + "image viewer."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION: + snprintf(s, len, + "Libretro core. \n" + " \n" + "Selecting this will associate this core \n" + "to the game."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_CORE: + snprintf(s, len, + "Libretro core. \n" + " \n" + "Select this file to have RetroArch load this core."); + break; + case MENU_ENUM_LABEL_FILE_BROWSER_DIRECTORY: + snprintf(s, len, + "Directory. \n" + " \n" + "Select it to open this directory."); + break; + case MENU_ENUM_LABEL_CACHE_DIRECTORY: + snprintf(s, len, + "Cache Directory. \n" + " \n" + "Content decompressed by RetroArch will be \n" + "temporarily extracted to this directory."); + break; + case MENU_ENUM_LABEL_HISTORY_LIST_ENABLE: + snprintf(s, len, + "If enabled, every content loaded \n" + "in RetroArch will be automatically \n" + "added to the recent history list."); + break; + case MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY: + snprintf(s, len, + "File Browser Directory. \n" + " \n" + "Sets start directory for menu file browser."); + break; + case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR: + snprintf(s, len, + "Influence how input polling is done inside \n" + "RetroArch. \n" + " \n" + "Early - Input polling is performed before \n" + "the frame is processed. \n" + "Normal - Input polling is performed when \n" + "polling is requested. \n" + "Late - Input polling is performed on \n" + "first input state request per frame.\n" + " \n" + "Setting it to 'Early' or 'Late' can result \n" + "in less latency, \n" + "depending on your configuration.\n\n" + "When netplay is enabled, the default polling \n" + "behavior (Normal) will be used, \n" + "regardless of the value set here." + ); + break; + case MENU_ENUM_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND: + snprintf(s, len, + "Hide input descriptors that were not set \n" + "by the core."); + break; + case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE: + snprintf(s, len, + "Video refresh rate of your monitor. \n" + "Used to calculate a suitable audio input rate."); + break; + case MENU_ENUM_LABEL_VIDEO_FORCE_SRGB_DISABLE: + snprintf(s, len, + "Forcibly disable sRGB FBO support. Some Intel \n" + "OpenGL drivers on Windows have video problems \n" + "with sRGB FBO support enabled."); + break; + case MENU_ENUM_LABEL_AUDIO_ENABLE: + snprintf(s, len, + "Enable audio output."); + break; + case MENU_ENUM_LABEL_AUDIO_SYNC: + snprintf(s, len, + "Synchronize audio (recommended)."); + break; + case MENU_ENUM_LABEL_AUDIO_LATENCY: + snprintf(s, len, + "Desired audio latency in milliseconds. \n" + "Might not be honored if the audio driver \n" + "can't provide given latency."); + break; + case MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE: + snprintf(s, len, + "Allow cores to set rotation. If false, \n" + "rotation requests are honored, but ignored.\n\n" + "Used for setups where one manually rotates \n" + "the monitor."); + break; + case MENU_ENUM_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW: + snprintf(s, len, + "Show the input descriptors set by the core \n" + "instead of the default ones."); + break; + case MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE: + snprintf(s, len, + "Number of entries that will be kept in \n" + "content history playlist."); + break; + case MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN: + snprintf(s, len, + "To use windowed mode or not when going \n" + "fullscreen."); + break; + case MENU_ENUM_LABEL_VIDEO_FONT_SIZE: + snprintf(s, len, + "Font size for on-screen messages."); + break; + case MENU_ENUM_LABEL_SAVESTATE_AUTO_INDEX: + snprintf(s, len, + "Automatically increment slot index on each save, \n" + "generating multiple savestate files. \n" + "When the content is loaded, state slot will be \n" + "set to the highest existing value (last savestate)."); + break; + case MENU_ENUM_LABEL_FPS_SHOW: + snprintf(s, len, + "Enables displaying the current frames \n" + "per second."); + break; + case MENU_ENUM_LABEL_VIDEO_FONT_ENABLE: + snprintf(s, len, + "Show and/or hide onscreen messages."); + break; + case MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X: + case MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y: + snprintf(s, len, + "Offset for where messages will be placed \n" + "onscreen. Values are in range [0.0, 1.0]."); + break; + case MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE: + snprintf(s, len, + "Enable or disable the current overlay."); + break; + case MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU: + snprintf(s, len, + "Hide the current overlay from appearing \n" + "inside the menu."); + break; + case MENU_ENUM_LABEL_OVERLAY_PRESET: + snprintf(s, len, + "Path to input overlay."); + break; + case MENU_ENUM_LABEL_OVERLAY_OPACITY: + snprintf(s, len, + "Overlay opacity."); + break; + case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT: + snprintf(s, len, + "Input bind timer timeout (in seconds). \n" + "Amount of seconds to wait until proceeding \n" + "to the next bind."); + break; + case MENU_ENUM_LABEL_OVERLAY_SCALE: + snprintf(s, len, + "Overlay scale."); + break; + case MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE: + snprintf(s, len, + "Audio output samplerate."); + break; + case MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT: + snprintf(s, len, + "Set to true if hardware-rendered cores \n" + "should get their private context. \n" + "Avoids having to assume hardware state changes \n" + "inbetween frames." + ); + break; + case MENU_ENUM_LABEL_CORE_LIST: + snprintf(s, len, + "Load Core. \n" + " \n" + "Browse for a libretro core \n" + "implementation. Where the browser \n" + "starts depends on your Core Directory \n" + "path. If blank, it will start in root. \n" + " \n" + "If Core Directory is a directory, the menu \n" + "will use that as top folder. If Core \n" + "Directory is a full path, it will start \n" + "in the folder where the file is."); + break; + case MENU_ENUM_LABEL_VALUE_MENU_ENUM_CONTROLS_PROLOG: + snprintf(s, len, + "You can use the following controls below \n" + "on either your gamepad or keyboard in order\n" + "to control the menu: \n" + " \n" + ); + break; + case MENU_ENUM_LABEL_WELCOME_TO_RETROARCH: + snprintf(s, len, + "Welcome to RetroArch\n" + ); + break; + case MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING_DESC: { /* Work around C89 limitations */ char u[501]; - const char * t = - "RetroArch relies on an unique form of\n" - "audio/video synchronization where it needs to be\n" - "calibrated against the refresh rate of your\n" - "display for best performance results.\n" - " \n" - "If you experience any audio crackling or video\n" - "tearing, usually it means that you need to\n" - "calibrate the settings. Some choices below:\n" - " \n"; + const char *t = + "RetroArch relies on an unique form of\n" + "audio/video synchronization where it needs to be\n" + "calibrated against the refresh rate of your\n" + "display for best performance results.\n" + " \n" + "If you experience any audio crackling or video\n" + "tearing, usually it means that you need to\n" + "calibrate the settings. Some choices below:\n" + " \n"; snprintf(u, sizeof(u), /* can't inline this due to the printf arguments */ - "a) Go to '%s' -> '%s', and enable\n" - "'Threaded Video'. Refresh rate will not matter\n" - "in this mode, framerate will be higher,\n" - "but video might be less smooth.\n" - "b) Go to '%s' -> '%s', and look at\n" - "'%s'. Let it run for\n" - "2048 frames, then press 'OK'.", - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO)); + "a) Go to '%s' -> '%s', and enable\n" + "'Threaded Video'. Refresh rate will not matter\n" + "in this mode, framerate will be higher,\n" + "but video might be less smooth.\n" + "b) Go to '%s' -> '%s', and look at\n" + "'%s'. Let it run for\n" + "2048 frames, then press 'OK'.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO)); strlcpy(s, t, len); strlcat(s, u, len); - } - break; - case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: - snprintf(s, len, - "To scan for content, go to '%s' and\n" - "select either '%s' or %s'.\n" - " \n" - "Files will be compared to database entries.\n" - "If there is a match, it will add an entry\n" - "to a collection.\n" - " \n" - "You can then easily access this content by\n" - "going to '%s' ->\n" - "'%s'\n" - "instead of having to go through the\n" - "filebrowser everytime.\n" - " \n" - "NOTE: Content for some cores might still not be\n" - "scannable." - , - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST) - ); - break; - case MENU_ENUM_LABEL_VALUE_EXTRACTING_PLEASE_WAIT: - snprintf(s, len, - "Welcome to RetroArch\n" - "\n" - "Extracting assets, please wait.\n" - "This might take a while...\n" - ); - break; - case MENU_ENUM_LABEL_INPUT_DRIVER: - if (settings) - driver_hash = msg_hash_calculate(settings->input.driver); + } + break; + case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: + snprintf(s, len, + "To scan for content, go to '%s' and\n" + "select either '%s' or %s'.\n" + " \n" + "Files will be compared to database entries.\n" + "If there is a match, it will add an entry\n" + "to a collection.\n" + " \n" + "You can then easily access this content by\n" + "going to '%s' ->\n" + "'%s'\n" + "instead of having to go through the\n" + "filebrowser everytime.\n" + " \n" + "NOTE: Content for some cores might still not be\n" + "scannable.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_FILE), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST) + ); + break; + case MENU_ENUM_LABEL_VALUE_EXTRACTING_PLEASE_WAIT: + snprintf(s, len, + "Welcome to RetroArch\n" + "\n" + "Extracting assets, please wait.\n" + "This might take a while...\n" + ); + break; + case MENU_ENUM_LABEL_INPUT_DRIVER: + if (settings) + driver_hash = msg_hash_calculate(settings->input.driver); - switch (driver_hash) - { - case MENU_LABEL_INPUT_DRIVER_UDEV: - snprintf(s, len, - "udev Input driver. \n" - " \n" - "This driver can run without X. \n" - " \n" - "It uses the recent evdev joypad API \n" - "for joystick support. It supports \n" - "hotplugging and force feedback (if \n" - "supported by device). \n" - " \n" - "The driver reads evdev events for keyboard \n" - "support. It also supports keyboard callback, \n" - "mice and touchpads. \n" - " \n" - "By default in most distros, /dev/input nodes \n" - "are root-only (mode 600). You can set up a udev \n" - "rule which makes these accessible to non-root." - ); - break; - case MENU_LABEL_INPUT_DRIVER_LINUXRAW: - snprintf(s, len, - "linuxraw Input driver. \n" - " \n" - "This driver requires an active TTY. Keyboard \n" - "events are read directly from the TTY which \n" - "makes it simpler, but not as flexible as udev. \n" "Mice, etc, are not supported at all. \n" - " \n" - "This driver uses the older joystick API \n" - "(/dev/input/js*)."); - break; - default: - snprintf(s, len, - "Input driver.\n" - " \n" - "Depending on video driver, it might \n" - "force a different input driver."); - break; - } - break; - case MENU_ENUM_LABEL_LOAD_CONTENT_LIST: - snprintf(s, len, - "Load Content. \n" - "Browse for content. \n" - " \n" - "To load content, you need a \n" - "'Core' to use, and a content file. \n" - " \n" - "To control where the menu starts \n" - "to browse for content, set \n" - "'File Browser Directory'. \n" - "If not set, it will start in root. \n" - " \n" - "The browser will filter out \n" - "extensions for the last core set \n" - "in 'Load Core', and use that core \n" - "when content is loaded." - ); - break; - case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY: - snprintf(s, len, - "Loading content from history. \n" - " \n" - "As content is loaded, content and libretro \n" - "core combinations are saved to history. \n" - " \n" - "The history is saved to a file in the same \n" - "directory as the RetroArch config file. If \n" - "no config file was loaded in startup, history \n" - "will not be saved or loaded, and will not exist \n" - "in the main menu." - ); - break; - case MENU_ENUM_LABEL_VIDEO_DRIVER: - snprintf(s, len, - "Current Video driver."); + switch (driver_hash) { + case MENU_LABEL_INPUT_DRIVER_UDEV: + snprintf(s, len, + "udev Input driver. \n" + " \n" + "This driver can run without X. \n" + " \n" + "It uses the recent evdev joypad API \n" + "for joystick support. It supports \n" + "hotplugging and force feedback (if \n" + "supported by device). \n" + " \n" + "The driver reads evdev events for keyboard \n" + "support. It also supports keyboard callback, \n" + "mice and touchpads. \n" + " \n" + "By default in most distros, /dev/input nodes \n" + "are root-only (mode 600). You can set up a udev \n" + "rule which makes these accessible to non-root." + ); + break; + case MENU_LABEL_INPUT_DRIVER_LINUXRAW: + snprintf(s, len, + "linuxraw Input driver. \n" + " \n" + "This driver requires an active TTY. Keyboard \n" + "events are read directly from the TTY which \n" + "makes it simpler, but not as flexible as udev. \n" "Mice, etc, are not supported at all. \n" + " \n" + "This driver uses the older joystick API \n" + "(/dev/input/js*)."); + break; + default: + snprintf(s, len, + "Input driver.\n" + " \n" + "Depending on video driver, it might \n" + "force a different input driver."); + break; + } + break; + case MENU_ENUM_LABEL_LOAD_CONTENT_LIST: + snprintf(s, len, + "Load Content. \n" + "Browse for content. \n" + " \n" + "To load content, you need a \n" + "'Core' to use, and a content file. \n" + " \n" + "To control where the menu starts \n" + "to browse for content, set \n" + "'File Browser Directory'. \n" + "If not set, it will start in root. \n" + " \n" + "The browser will filter out \n" + "extensions for the last core set \n" + "in 'Load Core', and use that core \n" + "when content is loaded." + ); + break; + case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY: + snprintf(s, len, + "Loading content from history. \n" + " \n" + "As content is loaded, content and libretro \n" + "core combinations are saved to history. \n" + " \n" + "The history is saved to a file in the same \n" + "directory as the RetroArch config file. If \n" + "no config file was loaded in startup, history \n" + "will not be saved or loaded, and will not exist \n" + "in the main menu." + ); + break; + case MENU_ENUM_LABEL_VIDEO_DRIVER: + snprintf(s, len, + "Current Video driver."); - if (string_is_equal(settings->video.driver, "gl")) - { + if (string_is_equal(settings->video.driver, "gl")) { + snprintf(s, len, + "OpenGL Video driver. \n" + " \n" + "This driver allows libretro GL cores to \n" + "be used in addition to software-rendered \n" + "core implementations.\n" + " \n" + "Performance for software-rendered and \n" + "libretro GL core implementations is \n" + "dependent on your graphics card's \n" + "underlying GL driver)."); + } else if (string_is_equal(settings->video.driver, "sdl2")) { + snprintf(s, len, + "SDL 2 Video driver.\n" + " \n" + "This is an SDL 2 software-rendered video \n" + "driver.\n" + " \n" + "Performance for software-rendered libretro \n" + "core implementations is dependent \n" + "on your platform SDL implementation."); + } else if (string_is_equal(settings->video.driver, "sdl1")) { + snprintf(s, len, + "SDL Video driver.\n" + " \n" + "This is an SDL 1.2 software-rendered video \n" + "driver.\n" + " \n" + "Performance is considered to be suboptimal. \n" + "Consider using it only as a last resort."); + } else if (string_is_equal(settings->video.driver, "d3d")) { + snprintf(s, len, + "Direct3D Video driver. \n" + " \n" + "Performance for software-rendered cores \n" + "is dependent on your graphic card's \n" + "underlying D3D driver)."); + } else if (string_is_equal(settings->video.driver, "exynos")) { + snprintf(s, len, + "Exynos-G2D Video Driver. \n" + " \n" + "This is a low-level Exynos video driver. \n" + "Uses the G2D block in Samsung Exynos SoC \n" + "for blit operations. \n" + " \n" + "Performance for software rendered cores \n" + "should be optimal."); + } else if (string_is_equal(settings->video.driver, "drm")) { + snprintf(s, len, + "Plain DRM Video Driver. \n" + " \n" + "This is a low-level video driver using. \n" + "libdrm for hardware scaling using \n" + "GPU overlays."); + } else if (string_is_equal(settings->video.driver, "sunxi")) { + snprintf(s, len, + "Sunxi-G2D Video Driver. \n" + " \n" + "This is a low-level Sunxi video driver. \n" + "Uses the G2D block in Allwinner SoCs."); + } + break; + case MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN: snprintf(s, len, - "OpenGL Video driver. \n" - " \n" - "This driver allows libretro GL cores to \n" - "be used in addition to software-rendered \n" - "core implementations.\n" - " \n" - "Performance for software-rendered and \n" - "libretro GL core implementations is \n" - "dependent on your graphics card's \n" - "underlying GL driver)."); - } - else if (string_is_equal(settings->video.driver, "sdl2")) - { - snprintf(s, len, - "SDL 2 Video driver.\n" - " \n" - "This is an SDL 2 software-rendered video \n" - "driver.\n" - " \n" - "Performance for software-rendered libretro \n" - "core implementations is dependent \n" - "on your platform SDL implementation."); - } - else if (string_is_equal(settings->video.driver, "sdl1")) - { - snprintf(s, len, - "SDL Video driver.\n" - " \n" - "This is an SDL 1.2 software-rendered video \n" - "driver.\n" - " \n" - "Performance is considered to be suboptimal. \n" - "Consider using it only as a last resort."); - } - else if (string_is_equal(settings->video.driver, "d3d")) - { - snprintf(s, len, - "Direct3D Video driver. \n" - " \n" - "Performance for software-rendered cores \n" - "is dependent on your graphic card's \n" - "underlying D3D driver)."); - } - else if (string_is_equal(settings->video.driver, "exynos")) - { - snprintf(s, len, - "Exynos-G2D Video Driver. \n" - " \n" - "This is a low-level Exynos video driver. \n" - "Uses the G2D block in Samsung Exynos SoC \n" - "for blit operations. \n" - " \n" - "Performance for software rendered cores \n" - "should be optimal."); - } - else if (string_is_equal(settings->video.driver, "drm")) - { - snprintf(s, len, - "Plain DRM Video Driver. \n" - " \n" - "This is a low-level video driver using. \n" - "libdrm for hardware scaling using \n" - "GPU overlays."); - } - else if (string_is_equal(settings->video.driver, "sunxi")) - { - snprintf(s, len, - "Sunxi-G2D Video Driver. \n" - " \n" - "This is a low-level Sunxi video driver. \n" - "Uses the G2D block in Allwinner SoCs."); - } - break; - case MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN: - snprintf(s, len, - "Audio DSP plugin.\n" - " Processes audio before it's sent to \n" - "the driver." - ); - break; - case MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER: - if (settings) - driver_hash = msg_hash_calculate(settings->audio.resampler); + "Audio DSP plugin.\n" + " Processes audio before it's sent to \n" + "the driver." + ); + break; + case MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER: + if (settings) + driver_hash = msg_hash_calculate(settings->audio.resampler); - switch (driver_hash) - { - case MENU_LABEL_AUDIO_RESAMPLER_DRIVER_SINC: - snprintf(s, len, - "Windowed SINC implementation."); - break; - case MENU_LABEL_AUDIO_RESAMPLER_DRIVER_CC: - snprintf(s, len, - "Convoluted Cosine implementation."); - break; - default: - if (string_is_empty(s)) - strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); - break; - } - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET: - snprintf(s, len, - "Load Shader Preset. \n" - " \n" - " Load a shader preset directly. \n" - "The menu shader menu is updated accordingly. \n" - " \n" - "If the CGP uses scaling methods which are not \n" - "simple, (i.e. source scaling, same scaling \n" - "factor for X/Y), the scaling factor displayed \n" - "in the menu might not be correct." - ); - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS: - snprintf(s, len, - "Scale for this pass. \n" - " \n" - "The scale factor accumulates, i.e. 2x \n" - "for first pass and 2x for second pass \n" - "will give you a 4x total scale. \n" - " \n" - "If there is a scale factor for last \n" - "pass, the result is stretched to \n" - "screen with the filter specified in \n" - "'Default Filter'. \n" - " \n" - "If 'Don't Care' is set, either 1x \n" - "scale or stretch to fullscreen will \n" - "be used depending if it's not the last \n" - "pass or not." - ); - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES: - snprintf(s, len, - "Shader Passes. \n" - " \n" - "RetroArch allows you to mix and match various \n" - "shaders with arbitrary shader passes, with \n" - "custom hardware filters and scale factors. \n" - " \n" - "This option specifies the number of shader \n" - "passes to use. If you set this to 0, and use \n" - "Apply Shader Changes, you use a 'blank' shader. \n" - " \n" - "The Default Filter option will affect the \n" - "stretching filter."); - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS: - snprintf(s, len, - "Shader Parameters. \n" - " \n" - "Modifies current shader directly. Will not be \n" - "saved to CGP/GLSLP preset file."); - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS: - snprintf(s, len, - "Shader Preset Parameters. \n" - " \n" - "Modifies shader preset currently in menu." - ); - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_PASS: - snprintf(s, len, - "Path to shader. \n" - " \n" - "All shaders must be of the same \n" - "type (i.e. CG, GLSL or HLSL). \n" - " \n" - "Set Shader Directory to set where \n" - "the browser starts to look for \n" - "shaders." - ); - break; - case MENU_ENUM_LABEL_CONFIGURATION_SETTINGS: - snprintf(s, len, - "Determines how configuration files \n" - "are loaded and prioritized."); - break; - case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT: - snprintf(s, len, - "Saves config to disk on exit.\n" - "Useful for menu as settings can be\n" - "modified. Overwrites the config.\n" - " \n" - "#include's and comments are not \n" - "preserved. \n" - " \n" - "By design, the config file is \n" - "considered immutable as it is \n" - "likely maintained by the user, \n" - "and should not be overwritten \n" - "behind the user's back." + switch (driver_hash) { + case MENU_LABEL_AUDIO_RESAMPLER_DRIVER_SINC: + snprintf(s, len, + "Windowed SINC implementation."); + break; + case MENU_LABEL_AUDIO_RESAMPLER_DRIVER_CC: + snprintf(s, len, + "Convoluted Cosine implementation."); + break; + default: + if (string_is_empty(s)) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + break; + } + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET: + snprintf(s, len, + "Load Shader Preset. \n" + " \n" + " Load a shader preset directly. \n" + "The menu shader menu is updated accordingly. \n" + " \n" + "If the CGP uses scaling methods which are not \n" + "simple, (i.e. source scaling, same scaling \n" + "factor for X/Y), the scaling factor displayed \n" + "in the menu might not be correct." + ); + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS: + snprintf(s, len, + "Scale for this pass. \n" + " \n" + "The scale factor accumulates, i.e. 2x \n" + "for first pass and 2x for second pass \n" + "will give you a 4x total scale. \n" + " \n" + "If there is a scale factor for last \n" + "pass, the result is stretched to \n" + "screen with the filter specified in \n" + "'Default Filter'. \n" + " \n" + "If 'Don't Care' is set, either 1x \n" + "scale or stretch to fullscreen will \n" + "be used depending if it's not the last \n" + "pass or not." + ); + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES: + snprintf(s, len, + "Shader Passes. \n" + " \n" + "RetroArch allows you to mix and match various \n" + "shaders with arbitrary shader passes, with \n" + "custom hardware filters and scale factors. \n" + " \n" + "This option specifies the number of shader \n" + "passes to use. If you set this to 0, and use \n" + "Apply Shader Changes, you use a 'blank' shader. \n" + " \n" + "The Default Filter option will affect the \n" + "stretching filter."); + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS: + snprintf(s, len, + "Shader Parameters. \n" + " \n" + "Modifies current shader directly. Will not be \n" + "saved to CGP/GLSLP preset file."); + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS: + snprintf(s, len, + "Shader Preset Parameters. \n" + " \n" + "Modifies shader preset currently in menu." + ); + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_PASS: + snprintf(s, len, + "Path to shader. \n" + " \n" + "All shaders must be of the same \n" + "type (i.e. CG, GLSL or HLSL). \n" + " \n" + "Set Shader Directory to set where \n" + "the browser starts to look for \n" + "shaders." + ); + break; + case MENU_ENUM_LABEL_CONFIGURATION_SETTINGS: + snprintf(s, len, + "Determines how configuration files \n" + "are loaded and prioritized."); + break; + case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT: + snprintf(s, len, + "Saves config to disk on exit.\n" + "Useful for menu as settings can be\n" + "modified. Overwrites the config.\n" + " \n" + "#include's and comments are not \n" + "preserved. \n" + " \n" + "By design, the config file is \n" + "considered immutable as it is \n" + "likely maintained by the user, \n" + "and should not be overwritten \n" + "behind the user's back." #if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE) - "\nThis is not not the case on \n" - "consoles however, where \n" - "looking at the config file \n" - "manually isn't really an option." + "\nThis is not not the case on \n" + "consoles however, where \n" + "looking at the config file \n" + "manually isn't really an option." #endif - ); - break; - case MENU_ENUM_LABEL_CONFIRM_ON_EXIT: - snprintf(s, len, "Are you sure you want to quit?"); - break; - case MENU_ENUM_LABEL_SHOW_HIDDEN_FILES: - snprintf(s, len, "Show hidden files\n" - "and folders."); - break; - case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS: - snprintf(s, len, - "Hardware filter for this pass. \n" - " \n" - "If 'Don't Care' is set, 'Default \n" - "Filter' will be used." - ); - break; - case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL: - snprintf(s, len, - "Autosaves the non-volatile SRAM \n" - "at a regular interval.\n" - " \n" - "This is disabled by default unless set \n" - "otherwise. The interval is measured in \n" - "seconds. \n" - " \n" - "A value of 0 disables autosave."); - break; - case MENU_ENUM_LABEL_INPUT_BIND_DEVICE_TYPE: - snprintf(s, len, - "Input Device Type. \n" - " \n" - "Picks which device type to use. This is \n" - "relevant for the libretro core itself." - ); - break; - case MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL: - snprintf(s, len, - "Sets log level for libretro cores \n" - "(GET_LOG_INTERFACE). \n" - " \n" - " If a log level issued by a libretro \n" - " core is below libretro_log level, it \n" - " is ignored.\n" - " \n" - " DEBUG logs are always ignored unless \n" - " verbose mode is activated (--verbose).\n" - " \n" - " DEBUG = 0\n" - " INFO = 1\n" - " WARN = 2\n" - " ERROR = 3" - ); - break; - case MENU_ENUM_LABEL_STATE_SLOT_INCREASE: - case MENU_ENUM_LABEL_STATE_SLOT_DECREASE: - snprintf(s, len, - "State slots.\n" - " \n" - " With slot set to 0, save state name is *.state \n" - " (or whatever defined on commandline).\n" - "When slot is != 0, path will be (path)(d), \n" - "where (d) is slot number."); - break; - case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES: - snprintf(s, len, - "Apply Shader Changes. \n" - " \n" - "After changing shader settings, use this to \n" - "apply changes. \n" - " \n" - "Changing shader settings is a somewhat \n" - "expensive operation so it has to be \n" - "done explicitly. \n" - " \n" - "When you apply shaders, the menu shader \n" - "settings are saved to a temporary file (either \n" - "menu.cgp or menu.glslp) and loaded. The file \n" - "persists after RetroArch exits. The file is \n" - "saved to Shader Directory." - ); - break; - case MENU_ENUM_LABEL_MENU_TOGGLE: - snprintf(s, len, - "Toggles menu."); - break; - case MENU_ENUM_LABEL_GRAB_MOUSE_TOGGLE: - snprintf(s, len, - "Toggles mouse grab.\n" - " \n" - "When mouse is grabbed, RetroArch hides the \n" - "mouse, and keeps the mouse pointer inside \n" - "the window to allow relative mouse input to \n" - "work better."); - break; - case MENU_ENUM_LABEL_GAME_FOCUS_TOGGLE: - snprintf(s, len, - "Toggles game focus.\n" - " \n" - "When a game has focus, RetroArch will both disable \n" - "hotkeys and keep/warp the mouse pointer inside the window."); - break; - case MENU_ENUM_LABEL_DISK_NEXT: - snprintf(s, len, - "Cycles through disk images. Use after \n" - "ejecting. \n" - " \n" - " Complete by toggling eject again."); - break; - case MENU_ENUM_LABEL_VIDEO_FILTER: + ); + break; + case MENU_ENUM_LABEL_CONFIRM_ON_EXIT: + snprintf(s, len, "Are you sure you want to quit?"); + break; + case MENU_ENUM_LABEL_SHOW_HIDDEN_FILES: + snprintf(s, len, "Show hidden files\n" + "and folders."); + break; + case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS: + snprintf(s, len, + "Hardware filter for this pass. \n" + " \n" + "If 'Don't Care' is set, 'Default \n" + "Filter' will be used." + ); + break; + case MENU_ENUM_LABEL_AUTOSAVE_INTERVAL: + snprintf(s, len, + "Autosaves the non-volatile SRAM \n" + "at a regular interval.\n" + " \n" + "This is disabled by default unless set \n" + "otherwise. The interval is measured in \n" + "seconds. \n" + " \n" + "A value of 0 disables autosave."); + break; + case MENU_ENUM_LABEL_INPUT_BIND_DEVICE_TYPE: + snprintf(s, len, + "Input Device Type. \n" + " \n" + "Picks which device type to use. This is \n" + "relevant for the libretro core itself." + ); + break; + case MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL: + snprintf(s, len, + "Sets log level for libretro cores \n" + "(GET_LOG_INTERFACE). \n" + " \n" + " If a log level issued by a libretro \n" + " core is below libretro_log level, it \n" + " is ignored.\n" + " \n" + " DEBUG logs are always ignored unless \n" + " verbose mode is activated (--verbose).\n" + " \n" + " DEBUG = 0\n" + " INFO = 1\n" + " WARN = 2\n" + " ERROR = 3" + ); + break; + case MENU_ENUM_LABEL_STATE_SLOT_INCREASE: + case MENU_ENUM_LABEL_STATE_SLOT_DECREASE: + snprintf(s, len, + "State slots.\n" + " \n" + " With slot set to 0, save state name is *.state \n" + " (or whatever defined on commandline).\n" + "When slot is != 0, path will be (path)(d), \n" + "where (d) is slot number."); + break; + case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES: + snprintf(s, len, + "Apply Shader Changes. \n" + " \n" + "After changing shader settings, use this to \n" + "apply changes. \n" + " \n" + "Changing shader settings is a somewhat \n" + "expensive operation so it has to be \n" + "done explicitly. \n" + " \n" + "When you apply shaders, the menu shader \n" + "settings are saved to a temporary file (either \n" + "menu.cgp or menu.glslp) and loaded. The file \n" + "persists after RetroArch exits. The file is \n" + "saved to Shader Directory." + ); + break; + case MENU_ENUM_LABEL_MENU_TOGGLE: + snprintf(s, len, + "Toggles menu."); + break; + case MENU_ENUM_LABEL_GRAB_MOUSE_TOGGLE: + snprintf(s, len, + "Toggles mouse grab.\n" + " \n" + "When mouse is grabbed, RetroArch hides the \n" + "mouse, and keeps the mouse pointer inside \n" + "the window to allow relative mouse input to \n" + "work better."); + break; + case MENU_ENUM_LABEL_GAME_FOCUS_TOGGLE: + snprintf(s, len, + "Toggles game focus.\n" + " \n" + "When a game has focus, RetroArch will both disable \n" + "hotkeys and keep/warp the mouse pointer inside the window."); + break; + case MENU_ENUM_LABEL_DISK_NEXT: + snprintf(s, len, + "Cycles through disk images. Use after \n" + "ejecting. \n" + " \n" + " Complete by toggling eject again."); + break; + case MENU_ENUM_LABEL_VIDEO_FILTER: #ifdef HAVE_FILTERS_BUILTIN - snprintf(s, len, - "CPU-based video filter."); + snprintf(s, len, + "CPU-based video filter."); #else - snprintf(s, len, - "CPU-based video filter.\n" - " \n" - "Path to a dynamic library."); + snprintf(s, len, + "CPU-based video filter.\n" + " \n" + "Path to a dynamic library."); #endif - break; - case MENU_ENUM_LABEL_AUDIO_DEVICE: - snprintf(s, len, - "Override the default audio device \n" - "the audio driver uses.\n" - "This is driver dependent. E.g.\n" + break; + case MENU_ENUM_LABEL_AUDIO_DEVICE: + snprintf(s, len, + "Override the default audio device \n" + "the audio driver uses.\n" + "This is driver dependent. E.g.\n" #ifdef HAVE_ALSA - " \n" - "ALSA wants a PCM device." + " \n" + "ALSA wants a PCM device." #endif #ifdef HAVE_OSS - " \n" - "OSS wants a path (e.g. /dev/dsp)." + " \n" + "OSS wants a path (e.g. /dev/dsp)." #endif #ifdef HAVE_JACK - " \n" - "JACK wants portnames (e.g. system:playback1\n" - ",system:playback_2)." + " \n" + "JACK wants portnames (e.g. system:playback1\n" + ",system:playback_2)." #endif #ifdef HAVE_RSOUND - " \n" - "RSound wants an IP address to an RSound \n" - "server." + " \n" + "RSound wants an IP address to an RSound \n" + "server." #endif - ); - break; - case MENU_ENUM_LABEL_DISK_EJECT_TOGGLE: - snprintf(s, len, - "Toggles eject for disks.\n" - " \n" - "Used for multiple-disk content."); - break; - case MENU_ENUM_LABEL_ENABLE_HOTKEY: - snprintf(s, len, - "Enable other hotkeys.\n" - " \n" - " If this hotkey is bound to either keyboard, \n" - "joybutton or joyaxis, all other hotkeys will \n" - "be disabled unless this hotkey is also held \n" - "at the same time. \n" - " \n" - "This is useful for RETRO_KEYBOARD centric \n" - "implementations which query a large area of \n" - "the keyboard, where it is not desirable that \n" - "hotkeys get in the way."); - break; - case MENU_ENUM_LABEL_REWIND_ENABLE: - snprintf(s, len, - "Enable rewinding.\n" - " \n" - "This will take a performance hit, \n" - "so it is disabled by default."); - break; - case MENU_ENUM_LABEL_LIBRETRO_DIR_PATH: - snprintf(s, len, - "Core Directory. \n" - " \n" - "A directory for where to search for \n" - "libretro core implementations."); - break; - case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO: - snprintf(s, len, - "Refresh Rate Auto.\n" - " \n" - "The accurate refresh rate of our monitor (Hz).\n" - "This is used to calculate audio input rate with \n" - "the formula: \n" - " \n" - "audio_input_rate = game input rate * display \n" - "refresh rate / game refresh rate\n" - " \n" - "If the implementation does not report any \n" - "values, NTSC defaults will be assumed for \n" - "compatibility.\n" - " \n" - "This value should stay close to 60Hz to avoid \n" - "large pitch changes. If your monitor does \n" - "not run at 60Hz, or something close to it, \n" - "disable VSync, and leave this at its default."); - break; - case MENU_ENUM_LABEL_VIDEO_ROTATION: - snprintf(s, len, - "Forces a certain rotation \n" - "of the screen.\n" - " \n" - "The rotation is added to rotations which\n" - "the libretro core sets (see Video Allow\n" - "Rotate)."); - break; - case MENU_ENUM_LABEL_VIDEO_SCALE: - snprintf(s, len, - "Fullscreen resolution.\n" - " \n" - "Resolution of 0 uses the \n" - "resolution of the environment.\n"); - break; - case MENU_ENUM_LABEL_FASTFORWARD_RATIO: - snprintf(s, len, - "Fastforward ratio." - " \n" - "The maximum rate at which content will\n" - "be run when using fast forward.\n" - " \n" - " (E.g. 5.0 for 60 fps content => 300 fps \n" - "cap).\n" - " \n" - "RetroArch will go to sleep to ensure that \n" - "the maximum rate will not be exceeded.\n" - "Do not rely on this cap to be perfectly \n" - "accurate."); - break; - case MENU_ENUM_LABEL_VIDEO_MONITOR_INDEX: - snprintf(s, len, - "Which monitor to prefer.\n" - " \n" - "0 (default) means no particular monitor \n" - "is preferred, 1 and up (1 being first \n" - "monitor), suggests RetroArch to use that \n" - "particular monitor."); - break; - case MENU_ENUM_LABEL_VIDEO_CROP_OVERSCAN: - snprintf(s, len, - "Forces cropping of overscanned \n" - "frames.\n" - " \n" - "Exact behavior of this option is \n" - "core-implementation specific."); - break; - case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER: - snprintf(s, len, - "Only scales video in integer \n" - "steps.\n" - " \n" - "The base size depends on system-reported \n" - "geometry and aspect ratio.\n" - " \n" - "If Force Aspect is not set, X/Y will be \n" - "integer scaled independently."); - break; - case MENU_ENUM_LABEL_AUDIO_VOLUME: - snprintf(s, len, - "Audio volume, expressed in dB.\n" - " \n" - " 0 dB is normal volume. No gain will be applied.\n" - "Gain can be controlled in runtime with Input\n" - "Volume Up / Input Volume Down."); - break; - case MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA: - snprintf(s, len, - "Audio rate control.\n" - " \n" - "Setting this to 0 disables rate control.\n" - "Any other value controls audio rate control \n" - "delta.\n" - " \n" - "Defines how much input rate can be adjusted \n" - "dynamically.\n" - " \n" - " Input rate is defined as: \n" - " input rate * (1.0 +/- (rate control delta))"); - break; - case MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW: - snprintf(s, len, - "Maximum audio timing skew.\n" - " \n" - "Defines the maximum change in input rate.\n" - "You may want to increase this to enable\n" - "very large changes in timing, for example\n" - "running PAL cores on NTSC displays, at the\n" - "cost of inaccurate audio pitch.\n" - " \n" - " Input rate is defined as: \n" - " input rate * (1.0 +/- (max timing skew))"); - break; - case MENU_ENUM_LABEL_OVERLAY_NEXT: - snprintf(s, len, - "Toggles to next overlay.\n" - " \n" - "Wraps around."); - break; - case MENU_ENUM_LABEL_LOG_VERBOSITY: - snprintf(s, len, - "Enable or disable verbosity level \n" - "of frontend."); - break; - case MENU_ENUM_LABEL_VOLUME_UP: - snprintf(s, len, - "Increases audio volume."); - break; - case MENU_ENUM_LABEL_VOLUME_DOWN: - snprintf(s, len, - "Decreases audio volume."); - break; - case MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION: - snprintf(s, len, - "Forcibly disable composition.\n" - "Only valid on Windows Vista/7 for now."); - break; - case MENU_ENUM_LABEL_PERFCNT_ENABLE: - snprintf(s, len, - "Enable or disable frontend \n" - "performance counters."); - break; - case MENU_ENUM_LABEL_SYSTEM_DIRECTORY: - snprintf(s, len, - "System Directory. \n" - " \n" - "Sets the 'system' directory.\n" - "Cores can query for this\n" - "directory to load BIOSes, \n" - "system-specific configs, etc."); - break; - case MENU_ENUM_LABEL_SAVESTATE_AUTO_SAVE: - case MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD: - snprintf(s, len, - "Automatically saves a savestate at the \n" - "end of RetroArch's lifetime.\n" - " \n" - "RetroArch will automatically load any savestate\n" - "with this path on startup if 'Auto Load State\n" - "is enabled."); - break; - case MENU_ENUM_LABEL_VIDEO_THREADED: - snprintf(s, len, - "Use threaded video driver.\n" - " \n" - "Using this might improve performance at the \n" - "possible cost of latency and more video \n" - "stuttering."); - break; - case MENU_ENUM_LABEL_VIDEO_VSYNC: - snprintf(s, len, - "Video V-Sync.\n"); - break; - case MENU_ENUM_LABEL_VIDEO_HARD_SYNC: - snprintf(s, len, - "Attempts to hard-synchronize \n" - "CPU and GPU.\n" - " \n" - "Can reduce latency at the cost of \n" - "performance."); - break; - case MENU_ENUM_LABEL_REWIND_GRANULARITY: - snprintf(s, len, - "Rewind granularity.\n" - " \n" - " When rewinding defined number of \n" - "frames, you can rewind several frames \n" - "at a time, increasing the rewinding \n" - "speed."); - break; - case MENU_ENUM_LABEL_SCREENSHOT: - snprintf(s, len, - "Take screenshot."); - break; - case MENU_ENUM_LABEL_VIDEO_FRAME_DELAY: - snprintf(s, len, - "Sets how many milliseconds to delay\n" - "after VSync before running the core.\n" - "\n" - "Can reduce latency at the cost of\n" - "higher risk of stuttering.\n" - " \n" - "Maximum is 15."); - break; - case MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES: - snprintf(s, len, - "Sets how many frames CPU can \n" - "run ahead of GPU when using 'GPU \n" - "Hard Sync'.\n" - " \n" - "Maximum is 3.\n" - " \n" - " 0: Syncs to GPU immediately.\n" - " 1: Syncs to previous frame.\n" - " 2: Etc ..."); - break; - case MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION: - snprintf(s, len, - "Inserts a black frame inbetween \n" - "frames.\n" - " \n" - "Useful for 120 Hz monitors who want to \n" - "play 60 Hz material with eliminated \n" - "ghosting.\n" - " \n" - "Video refresh rate should still be \n" - "configured as if it is a 60 Hz monitor \n" - "(divide refresh rate by 2)."); - break; - case MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN: - snprintf(s, len, - "Show startup screen in menu.\n" - "Is automatically set to false when seen\n" - "for the first time.\n" - " \n" - "This is only updated in config if\n" - "'Save Configuration on Exit' is enabled.\n"); - break; - case MENU_ENUM_LABEL_CORE_SPECIFIC_CONFIG: - snprintf(s, len, - "Load up a specific config file \n" - "based on the core being used.\n"); - break; - case MENU_ENUM_LABEL_VIDEO_FULLSCREEN: - snprintf(s, len, "Toggles fullscreen."); - break; - case MENU_ENUM_LABEL_BLOCK_SRAM_OVERWRITE: - snprintf(s, len, - "Block SRAM from being overwritten \n" - "when loading save states.\n" - " \n" - "Might potentially lead to buggy games."); - break; - case MENU_ENUM_LABEL_PAUSE_NONACTIVE: - snprintf(s, len, - "Pause gameplay when window focus \n" - "is lost."); - break; - case MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT: - snprintf(s, len, - "Screenshots output of GPU shaded \n" - "material if available."); - break; - case MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY: - snprintf(s, len, - "Screenshot Directory. \n" - " \n" - "Directory to dump screenshots to." - ); - break; - case MENU_ENUM_LABEL_VIDEO_SWAP_INTERVAL: - snprintf(s, len, - "VSync Swap Interval.\n" - " \n" - "Uses a custom swap interval for VSync. Set this \n" - "to effectively halve monitor refresh rate."); - break; - case MENU_ENUM_LABEL_SAVEFILE_DIRECTORY: - snprintf(s, len, - "Savefile Directory. \n" - " \n" - "Save all save files (*.srm) to this \n" - "directory. This includes related files like \n" - ".bsv, .rt, .psrm, etc...\n" - " \n" - "This will be overridden by explicit command line\n" - "options."); - break; - case MENU_ENUM_LABEL_SAVESTATE_DIRECTORY: - snprintf(s, len, - "Savestate Directory. \n" - " \n" - "Save all save states (*.state) to this \n" - "directory.\n" - " \n" - "This will be overridden by explicit command line\n" - "options."); - break; - case MENU_ENUM_LABEL_ASSETS_DIRECTORY: - snprintf(s, len, - "Assets Directory. \n" - " \n" - " This location is queried by default when \n" - "menu interfaces try to look for loadable \n" - "assets, etc."); - break; - case MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY: - snprintf(s, len, - "Dynamic Wallpapers Directory. \n" - " \n" - " The place to store backgrounds that will \n" - "be loaded dynamically by the menu depending \n" - "on context."); - break; - case MENU_ENUM_LABEL_SLOWMOTION_RATIO: - snprintf(s, len, - "Slowmotion ratio." - " \n" - "When slowmotion, content will slow\n" - "down by factor."); - break; - case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: - snprintf(s, len, - "Defines axis threshold.\n" - " \n" - "How far an axis must be tilted to result\n" - "in a button press.\n" - " Possible values are [0.0, 1.0]."); - break; - case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: - snprintf(s, len, - "Turbo period.\n" - " \n" - "Describes the period of which turbo-enabled\n" - "buttons toggle.\n" - " \n" - "Numbers are described in frames." - ); - break; - case MENU_ENUM_LABEL_INPUT_DUTY_CYCLE: - snprintf(s, len, - "Duty cycle.\n" - " \n" - "Describes how long the period of a turbo-enabled\n" - "should be.\n" - " \n" - "Numbers are described in frames." - ); - break; - case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE: - snprintf(s, len, "Enable touch support."); - break; - case MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH: - snprintf(s, len, "Use front instead of back touch."); - break; - case MENU_ENUM_LABEL_MOUSE_ENABLE: - snprintf(s, len, "Enable mouse input inside the menu."); - break; - case MENU_ENUM_LABEL_POINTER_ENABLE: - snprintf(s, len, "Enable touch input inside the menu."); - break; - case MENU_ENUM_LABEL_MENU_WALLPAPER: - snprintf(s, len, "Path to an image to set as the background."); - break; - case MENU_ENUM_LABEL_NAVIGATION_WRAPAROUND: - snprintf(s, len, - "Wrap-around to beginning and/or end \n" - "if boundary of list is reached \n" - "horizontally and/or vertically."); - break; - case MENU_ENUM_LABEL_PAUSE_LIBRETRO: - snprintf(s, len, - "If disabled, the game will keep \n" - "running in the background when we are in the \n" - "menu."); - break; - case MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE: - snprintf(s, len, - "Suspends the screensaver. Is a hint that \n" - "does not necessarily have to be \n" - "honored by the video driver."); - break; - case MENU_ENUM_LABEL_NETPLAY_MODE: - snprintf(s, len, - "Netplay client mode for the current user. \n" - "Will be 'Server' mode if disabled."); - break; - case MENU_ENUM_LABEL_NETPLAY_DELAY_FRAMES: - snprintf(s, len, - "The amount of delay frames to use for netplay. \n" - " \n" - "Increasing this value will increase \n" - "performance, but introduce more latency."); - break; - case MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE: - snprintf(s, len, - "Whether to run netplay in a mode not requiring\n" - "save states. \n" - " \n" - "If set to true, a very fast network is required,\n" - "but no rewinding is performed, so there will be\n" - "no netplay jitter.\n"); - break; - case MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES: - snprintf(s, len, - "The frequency in frames with which netplay \n" - "will verify that the host and client are in \n" - "sync. \n" - " \n" - "With most cores, this value will have no \n" - "visible effect and can be ignored. With \n" - "nondeterminstic cores, this value determines \n" - "how often the netplay peers will be brought \n" - "into sync. With buggy cores, setting this \n" - "to any non-zero value will cause severe \n" - "performance issues. Set to zero to perform \n" - "no checks. This value is only used on the \n" - "netplay host. \n"); - break; - case MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL: - snprintf(s, len, - "When hosting, attempt to listen for\n" - "connections from the public internet, using\n" - "UPnP or similar technologies to escape LANs. \n"); - break; - case MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES: - snprintf(s, len, - "Maximum amount of swapchain images. This \n" - "can tell the video driver to use a specific \n" - "video buffering mode. \n" - " \n" - "Single buffering - 1\n" - "Double buffering - 2\n" - "Triple buffering - 3\n" - " \n" - "Setting the right buffering mode can have \n" - "a big impact on latency."); - break; - case MENU_ENUM_LABEL_VIDEO_SMOOTH: - snprintf(s, len, - "Smoothens picture with bilinear filtering. \n" - "Should be disabled if using shaders."); - break; - case MENU_ENUM_LABEL_TIMEDATE_ENABLE: - snprintf(s, len, - "Shows current date and/or time inside menu."); - break; - case MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE: - snprintf(s, len, - "Shows current battery level inside menu."); - break; - case MENU_ENUM_LABEL_CORE_ENABLE: - snprintf(s, len, - "Shows current core inside menu."); - break; - case MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST: - snprintf(s, len, - "Enables Netplay in host (server) mode."); - break; - case MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT: - snprintf(s, len, - "Enables Netplay in client mode."); - break; - case MENU_ENUM_LABEL_NETPLAY_DISCONNECT: - snprintf(s, len, - "Disconnects an active Netplay connection."); - break; - case MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS: - snprintf(s, len, - "Search for and connect to netplay hosts on the local network."); - break; - case MENU_ENUM_LABEL_NETPLAY_SETTINGS: - snprintf(s, len, - "Setting related to Netplay."); - break; - case MENU_ENUM_LABEL_DYNAMIC_WALLPAPER: - snprintf(s, len, - "Dynamically load a new background \n" - "depending on context."); - break; - case MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL: - snprintf(s, len, - "URL to core updater directory on the \n" - "Libretro buildbot."); - break; - case MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL: - snprintf(s, len, - "URL to assets updater directory on the \n" - "Libretro buildbot."); - break; - case MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE: - snprintf(s, len, - "if enabled, overrides the input binds \n" - "with the remapped binds set for the \n" - "current core."); - break; - case MENU_ENUM_LABEL_OVERLAY_DIRECTORY: - snprintf(s, len, - "Overlay Directory. \n" - " \n" - "Defines a directory where overlays are \n" - "kept for easy access."); - break; - case MENU_ENUM_LABEL_INPUT_MAX_USERS: - snprintf(s, len, - "Maximum amount of users supported by \n" - "RetroArch."); - break; - case MENU_ENUM_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE: - snprintf(s, len, - "After downloading, automatically extract \n" - "archives that the downloads are contained \n" - "inside."); - break; - case MENU_ENUM_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE: - snprintf(s, len, - "Filter files being shown by \n" - "supported extensions."); - break; - case MENU_ENUM_LABEL_NETPLAY_NICKNAME: - snprintf(s, len, - "The username of the person running RetroArch. \n" - "This will be used for playing online games."); - break; - case MENU_ENUM_LABEL_NETPLAY_CLIENT_SWAP_INPUT: - snprintf(s, len, - "When being client over netplay, use \n" - "keybinds for player 1."); - break; - case MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT: - snprintf(s, len, - "The port of the host IP address. \n" - "Can be either a TCP or UDP port."); - break; - case MENU_ENUM_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE: - snprintf(s, len, - "Enable or disable spectator mode for \n" - "the user during netplay."); - break; - case MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS: - snprintf(s, len, - "The address of the host to connect to."); - break; - case MENU_ENUM_LABEL_NETPLAY_PASSWORD: - snprintf(s, len, - "The password for connecting to the netplay \n" - "host. Used only in host mode."); - break; - case MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD: - snprintf(s, len, - "The password for connecting to the netplay \n" - "host with only spectator privileges. Used \n" - "only in host mode."); - break; - case MENU_ENUM_LABEL_STDIN_CMD_ENABLE: - snprintf(s, len, - "Enable stdin command interface."); - break; - case MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT: - snprintf(s, len, - "Start User Interface companion driver \n" - "on boot (if available)."); - break; - case MENU_ENUM_LABEL_MENU_DRIVER: - snprintf(s, len, "Menu driver to use."); - break; - case MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO: - snprintf(s, len, - "Gamepad button combination to toggle menu. \n" - " \n" - "0 - None \n" - "1 - Press L + R + Y + D-Pad Down \n" - "simultaneously. \n" - "2 - Press L3 + R3 simultaneously. \n" - "3 - Press Start + Select simultaneously."); - break; - case MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU: - snprintf(s, len, "Allows any user to control the menu. \n" - " \n" - "When disabled, only user 1 can control the menu."); - break; - case MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE: - snprintf(s, len, - "Enable input auto-detection.\n" - " \n" - "Will attempt to auto-configure \n" - "joypads, Plug-and-Play style."); - break; - case MENU_ENUM_LABEL_CAMERA_ALLOW: - snprintf(s, len, - "Allow or disallow camera access by \n" - "cores."); - break; - case MENU_ENUM_LABEL_LOCATION_ALLOW: - snprintf(s, len, - "Allow or disallow location services \n" - "access by cores."); - break; - case MENU_ENUM_LABEL_TURBO: - snprintf(s, len, - "Turbo enable.\n" - " \n" - "Holding the turbo while pressing another \n" - "button will let the button enter a turbo \n" - "mode where the button state is modulated \n" - "with a periodic signal. \n" - " \n" - "The modulation stops when the button \n" - "itself (not turbo button) is released."); - break; - case MENU_ENUM_LABEL_OSK_ENABLE: - snprintf(s, len, - "Enable/disable on-screen keyboard."); - break; - case MENU_ENUM_LABEL_AUDIO_MUTE: - snprintf(s, len, - "Mute/unmute audio."); - break; - case MENU_ENUM_LABEL_REWIND: - snprintf(s, len, - "Hold button down to rewind.\n" - " \n" - "Rewind must be enabled."); - break; - case MENU_ENUM_LABEL_EXIT_EMULATOR: - snprintf(s, len, - "Key to exit RetroArch cleanly." + ); + break; + case MENU_ENUM_LABEL_DISK_EJECT_TOGGLE: + snprintf(s, len, + "Toggles eject for disks.\n" + " \n" + "Used for multiple-disk content."); + break; + case MENU_ENUM_LABEL_ENABLE_HOTKEY: + snprintf(s, len, + "Enable other hotkeys.\n" + " \n" + " If this hotkey is bound to either keyboard, \n" + "joybutton or joyaxis, all other hotkeys will \n" + "be disabled unless this hotkey is also held \n" + "at the same time. \n" + " \n" + "This is useful for RETRO_KEYBOARD centric \n" + "implementations which query a large area of \n" + "the keyboard, where it is not desirable that \n" + "hotkeys get in the way."); + break; + case MENU_ENUM_LABEL_REWIND_ENABLE: + snprintf(s, len, + "Enable rewinding.\n" + " \n" + "This will take a performance hit, \n" + "so it is disabled by default."); + break; + case MENU_ENUM_LABEL_LIBRETRO_DIR_PATH: + snprintf(s, len, + "Core Directory. \n" + " \n" + "A directory for where to search for \n" + "libretro core implementations."); + break; + case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO: + snprintf(s, len, + "Refresh Rate Auto.\n" + " \n" + "The accurate refresh rate of our monitor (Hz).\n" + "This is used to calculate audio input rate with \n" + "the formula: \n" + " \n" + "audio_input_rate = game input rate * display \n" + "refresh rate / game refresh rate\n" + " \n" + "If the implementation does not report any \n" + "values, NTSC defaults will be assumed for \n" + "compatibility.\n" + " \n" + "This value should stay close to 60Hz to avoid \n" + "large pitch changes. If your monitor does \n" + "not run at 60Hz, or something close to it, \n" + "disable VSync, and leave this at its default."); + break; + case MENU_ENUM_LABEL_VIDEO_ROTATION: + snprintf(s, len, + "Forces a certain rotation \n" + "of the screen.\n" + " \n" + "The rotation is added to rotations which\n" + "the libretro core sets (see Video Allow\n" + "Rotate)."); + break; + case MENU_ENUM_LABEL_VIDEO_SCALE: + snprintf(s, len, + "Fullscreen resolution.\n" + " \n" + "Resolution of 0 uses the \n" + "resolution of the environment.\n"); + break; + case MENU_ENUM_LABEL_FASTFORWARD_RATIO: + snprintf(s, len, + "Fastforward ratio." + " \n" + "The maximum rate at which content will\n" + "be run when using fast forward.\n" + " \n" + " (E.g. 5.0 for 60 fps content => 300 fps \n" + "cap).\n" + " \n" + "RetroArch will go to sleep to ensure that \n" + "the maximum rate will not be exceeded.\n" + "Do not rely on this cap to be perfectly \n" + "accurate."); + break; + case MENU_ENUM_LABEL_VIDEO_MONITOR_INDEX: + snprintf(s, len, + "Which monitor to prefer.\n" + " \n" + "0 (default) means no particular monitor \n" + "is preferred, 1 and up (1 being first \n" + "monitor), suggests RetroArch to use that \n" + "particular monitor."); + break; + case MENU_ENUM_LABEL_VIDEO_CROP_OVERSCAN: + snprintf(s, len, + "Forces cropping of overscanned \n" + "frames.\n" + " \n" + "Exact behavior of this option is \n" + "core-implementation specific."); + break; + case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER: + snprintf(s, len, + "Only scales video in integer \n" + "steps.\n" + " \n" + "The base size depends on system-reported \n" + "geometry and aspect ratio.\n" + " \n" + "If Force Aspect is not set, X/Y will be \n" + "integer scaled independently."); + break; + case MENU_ENUM_LABEL_AUDIO_VOLUME: + snprintf(s, len, + "Audio volume, expressed in dB.\n" + " \n" + " 0 dB is normal volume. No gain will be applied.\n" + "Gain can be controlled in runtime with Input\n" + "Volume Up / Input Volume Down."); + break; + case MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA: + snprintf(s, len, + "Audio rate control.\n" + " \n" + "Setting this to 0 disables rate control.\n" + "Any other value controls audio rate control \n" + "delta.\n" + " \n" + "Defines how much input rate can be adjusted \n" + "dynamically.\n" + " \n" + " Input rate is defined as: \n" + " input rate * (1.0 +/- (rate control delta))"); + break; + case MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW: + snprintf(s, len, + "Maximum audio timing skew.\n" + " \n" + "Defines the maximum change in input rate.\n" + "You may want to increase this to enable\n" + "very large changes in timing, for example\n" + "running PAL cores on NTSC displays, at the\n" + "cost of inaccurate audio pitch.\n" + " \n" + " Input rate is defined as: \n" + " input rate * (1.0 +/- (max timing skew))"); + break; + case MENU_ENUM_LABEL_OVERLAY_NEXT: + snprintf(s, len, + "Toggles to next overlay.\n" + " \n" + "Wraps around."); + break; + case MENU_ENUM_LABEL_LOG_VERBOSITY: + snprintf(s, len, + "Enable or disable verbosity level \n" + "of frontend."); + break; + case MENU_ENUM_LABEL_VOLUME_UP: + snprintf(s, len, + "Increases audio volume."); + break; + case MENU_ENUM_LABEL_VOLUME_DOWN: + snprintf(s, len, + "Decreases audio volume."); + break; + case MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION: + snprintf(s, len, + "Forcibly disable composition.\n" + "Only valid on Windows Vista/7 for now."); + break; + case MENU_ENUM_LABEL_PERFCNT_ENABLE: + snprintf(s, len, + "Enable or disable frontend \n" + "performance counters."); + break; + case MENU_ENUM_LABEL_SYSTEM_DIRECTORY: + snprintf(s, len, + "System Directory. \n" + " \n" + "Sets the 'system' directory.\n" + "Cores can query for this\n" + "directory to load BIOSes, \n" + "system-specific configs, etc."); + break; + case MENU_ENUM_LABEL_SAVESTATE_AUTO_SAVE: + case MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD: + snprintf(s, len, + "Automatically saves a savestate at the \n" + "end of RetroArch's lifetime.\n" + " \n" + "RetroArch will automatically load any savestate\n" + "with this path on startup if 'Auto Load State\n" + "is enabled."); + break; + case MENU_ENUM_LABEL_VIDEO_THREADED: + snprintf(s, len, + "Use threaded video driver.\n" + " \n" + "Using this might improve performance at the \n" + "possible cost of latency and more video \n" + "stuttering."); + break; + case MENU_ENUM_LABEL_VIDEO_VSYNC: + snprintf(s, len, + "Video V-Sync.\n"); + break; + case MENU_ENUM_LABEL_VIDEO_HARD_SYNC: + snprintf(s, len, + "Attempts to hard-synchronize \n" + "CPU and GPU.\n" + " \n" + "Can reduce latency at the cost of \n" + "performance."); + break; + case MENU_ENUM_LABEL_REWIND_GRANULARITY: + snprintf(s, len, + "Rewind granularity.\n" + " \n" + " When rewinding defined number of \n" + "frames, you can rewind several frames \n" + "at a time, increasing the rewinding \n" + "speed."); + break; + case MENU_ENUM_LABEL_SCREENSHOT: + snprintf(s, len, + "Take screenshot."); + break; + case MENU_ENUM_LABEL_VIDEO_FRAME_DELAY: + snprintf(s, len, + "Sets how many milliseconds to delay\n" + "after VSync before running the core.\n" + "\n" + "Can reduce latency at the cost of\n" + "higher risk of stuttering.\n" + " \n" + "Maximum is 15."); + break; + case MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES: + snprintf(s, len, + "Sets how many frames CPU can \n" + "run ahead of GPU when using 'GPU \n" + "Hard Sync'.\n" + " \n" + "Maximum is 3.\n" + " \n" + " 0: Syncs to GPU immediately.\n" + " 1: Syncs to previous frame.\n" + " 2: Etc ..."); + break; + case MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION: + snprintf(s, len, + "Inserts a black frame inbetween \n" + "frames.\n" + " \n" + "Useful for 120 Hz monitors who want to \n" + "play 60 Hz material with eliminated \n" + "ghosting.\n" + " \n" + "Video refresh rate should still be \n" + "configured as if it is a 60 Hz monitor \n" + "(divide refresh rate by 2)."); + break; + case MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN: + snprintf(s, len, + "Show startup screen in menu.\n" + "Is automatically set to false when seen\n" + "for the first time.\n" + " \n" + "This is only updated in config if\n" + "'Save Configuration on Exit' is enabled.\n"); + break; + case MENU_ENUM_LABEL_CORE_SPECIFIC_CONFIG: + snprintf(s, len, + "Load up a specific config file \n" + "based on the core being used.\n"); + break; + case MENU_ENUM_LABEL_VIDEO_FULLSCREEN: + snprintf(s, len, "Toggles fullscreen."); + break; + case MENU_ENUM_LABEL_BLOCK_SRAM_OVERWRITE: + snprintf(s, len, + "Block SRAM from being overwritten \n" + "when loading save states.\n" + " \n" + "Might potentially lead to buggy games."); + break; + case MENU_ENUM_LABEL_PAUSE_NONACTIVE: + snprintf(s, len, + "Pause gameplay when window focus \n" + "is lost."); + break; + case MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT: + snprintf(s, len, + "Screenshots output of GPU shaded \n" + "material if available."); + break; + case MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY: + snprintf(s, len, + "Screenshot Directory. \n" + " \n" + "Directory to dump screenshots to." + ); + break; + case MENU_ENUM_LABEL_VIDEO_SWAP_INTERVAL: + snprintf(s, len, + "VSync Swap Interval.\n" + " \n" + "Uses a custom swap interval for VSync. Set this \n" + "to effectively halve monitor refresh rate."); + break; + case MENU_ENUM_LABEL_SAVEFILE_DIRECTORY: + snprintf(s, len, + "Savefile Directory. \n" + " \n" + "Save all save files (*.srm) to this \n" + "directory. This includes related files like \n" + ".bsv, .rt, .psrm, etc...\n" + " \n" + "This will be overridden by explicit command line\n" + "options."); + break; + case MENU_ENUM_LABEL_SAVESTATE_DIRECTORY: + snprintf(s, len, + "Savestate Directory. \n" + " \n" + "Save all save states (*.state) to this \n" + "directory.\n" + " \n" + "This will be overridden by explicit command line\n" + "options."); + break; + case MENU_ENUM_LABEL_ASSETS_DIRECTORY: + snprintf(s, len, + "Assets Directory. \n" + " \n" + " This location is queried by default when \n" + "menu interfaces try to look for loadable \n" + "assets, etc."); + break; + case MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY: + snprintf(s, len, + "Dynamic Wallpapers Directory. \n" + " \n" + " The place to store backgrounds that will \n" + "be loaded dynamically by the menu depending \n" + "on context."); + break; + case MENU_ENUM_LABEL_SLOWMOTION_RATIO: + snprintf(s, len, + "Slowmotion ratio." + " \n" + "When slowmotion, content will slow\n" + "down by factor."); + break; + case MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD: + snprintf(s, len, + "Defines axis threshold.\n" + " \n" + "How far an axis must be tilted to result\n" + "in a button press.\n" + " Possible values are [0.0, 1.0]."); + break; + case MENU_ENUM_LABEL_INPUT_TURBO_PERIOD: + snprintf(s, len, + "Turbo period.\n" + " \n" + "Describes the period of which turbo-enabled\n" + "buttons toggle.\n" + " \n" + "Numbers are described in frames." + ); + break; + case MENU_ENUM_LABEL_INPUT_DUTY_CYCLE: + snprintf(s, len, + "Duty cycle.\n" + " \n" + "Describes how long the period of a turbo-enabled\n" + "should be.\n" + " \n" + "Numbers are described in frames." + ); + break; + case MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE: + snprintf(s, len, "Enable touch support."); + break; + case MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH: + snprintf(s, len, "Use front instead of back touch."); + break; + case MENU_ENUM_LABEL_MOUSE_ENABLE: + snprintf(s, len, "Enable mouse input inside the menu."); + break; + case MENU_ENUM_LABEL_POINTER_ENABLE: + snprintf(s, len, "Enable touch input inside the menu."); + break; + case MENU_ENUM_LABEL_MENU_WALLPAPER: + snprintf(s, len, "Path to an image to set as the background."); + break; + case MENU_ENUM_LABEL_NAVIGATION_WRAPAROUND: + snprintf(s, len, + "Wrap-around to beginning and/or end \n" + "if boundary of list is reached \n" + "horizontally and/or vertically."); + break; + case MENU_ENUM_LABEL_PAUSE_LIBRETRO: + snprintf(s, len, + "If disabled, the game will keep \n" + "running in the background when we are in the \n" + "menu."); + break; + case MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE: + snprintf(s, len, + "Suspends the screensaver. Is a hint that \n" + "does not necessarily have to be \n" + "honored by the video driver."); + break; + case MENU_ENUM_LABEL_NETPLAY_MODE: + snprintf(s, len, + "Netplay client mode for the current user. \n" + "Will be 'Server' mode if disabled."); + break; + case MENU_ENUM_LABEL_NETPLAY_DELAY_FRAMES: + snprintf(s, len, + "The amount of delay frames to use for netplay. \n" + " \n" + "Increasing this value will increase \n" + "performance, but introduce more latency."); + break; + case MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE: + snprintf(s, len, + "Whether to run netplay in a mode not requiring\n" + "save states. \n" + " \n" + "If set to true, a very fast network is required,\n" + "but no rewinding is performed, so there will be\n" + "no netplay jitter.\n"); + break; + case MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES: + snprintf(s, len, + "The frequency in frames with which netplay \n" + "will verify that the host and client are in \n" + "sync. \n" + " \n" + "With most cores, this value will have no \n" + "visible effect and can be ignored. With \n" + "nondeterminstic cores, this value determines \n" + "how often the netplay peers will be brought \n" + "into sync. With buggy cores, setting this \n" + "to any non-zero value will cause severe \n" + "performance issues. Set to zero to perform \n" + "no checks. This value is only used on the \n" + "netplay host. \n"); + break; + case MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL: + snprintf(s, len, + "When hosting, attempt to listen for\n" + "connections from the public internet, using\n" + "UPnP or similar technologies to escape LANs. \n"); + break; + case MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES: + snprintf(s, len, + "Maximum amount of swapchain images. This \n" + "can tell the video driver to use a specific \n" + "video buffering mode. \n" + " \n" + "Single buffering - 1\n" + "Double buffering - 2\n" + "Triple buffering - 3\n" + " \n" + "Setting the right buffering mode can have \n" + "a big impact on latency."); + break; + case MENU_ENUM_LABEL_VIDEO_SMOOTH: + snprintf(s, len, + "Smoothens picture with bilinear filtering. \n" + "Should be disabled if using shaders."); + break; + case MENU_ENUM_LABEL_TIMEDATE_ENABLE: + snprintf(s, len, + "Shows current date and/or time inside menu."); + break; + case MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE: + snprintf(s, len, + "Shows current battery level inside menu."); + break; + case MENU_ENUM_LABEL_CORE_ENABLE: + snprintf(s, len, + "Shows current core inside menu."); + break; + case MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST: + snprintf(s, len, + "Enables Netplay in host (server) mode."); + break; + case MENU_ENUM_LABEL_NETPLAY_ENABLE_CLIENT: + snprintf(s, len, + "Enables Netplay in client mode."); + break; + case MENU_ENUM_LABEL_NETPLAY_DISCONNECT: + snprintf(s, len, + "Disconnects an active Netplay connection."); + break; + case MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS: + snprintf(s, len, + "Search for and connect to netplay hosts on the local network."); + break; + case MENU_ENUM_LABEL_NETPLAY_SETTINGS: + snprintf(s, len, + "Setting related to Netplay."); + break; + case MENU_ENUM_LABEL_DYNAMIC_WALLPAPER: + snprintf(s, len, + "Dynamically load a new background \n" + "depending on context."); + break; + case MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL: + snprintf(s, len, + "URL to core updater directory on the \n" + "Libretro buildbot."); + break; + case MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL: + snprintf(s, len, + "URL to assets updater directory on the \n" + "Libretro buildbot."); + break; + case MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE: + snprintf(s, len, + "if enabled, overrides the input binds \n" + "with the remapped binds set for the \n" + "current core."); + break; + case MENU_ENUM_LABEL_OVERLAY_DIRECTORY: + snprintf(s, len, + "Overlay Directory. \n" + " \n" + "Defines a directory where overlays are \n" + "kept for easy access."); + break; + case MENU_ENUM_LABEL_INPUT_MAX_USERS: + snprintf(s, len, + "Maximum amount of users supported by \n" + "RetroArch."); + break; + case MENU_ENUM_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE: + snprintf(s, len, + "After downloading, automatically extract \n" + "archives that the downloads are contained \n" + "inside."); + break; + case MENU_ENUM_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE: + snprintf(s, len, + "Filter files being shown by \n" + "supported extensions."); + break; + case MENU_ENUM_LABEL_NETPLAY_NICKNAME: + snprintf(s, len, + "The username of the person running RetroArch. \n" + "This will be used for playing online games."); + break; + case MENU_ENUM_LABEL_NETPLAY_CLIENT_SWAP_INPUT: + snprintf(s, len, + "When being client over netplay, use \n" + "keybinds for player 1."); + break; + case MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT: + snprintf(s, len, + "The port of the host IP address. \n" + "Can be either a TCP or UDP port."); + break; + case MENU_ENUM_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE: + snprintf(s, len, + "Enable or disable spectator mode for \n" + "the user during netplay."); + break; + case MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS: + snprintf(s, len, + "The address of the host to connect to."); + break; + case MENU_ENUM_LABEL_NETPLAY_PASSWORD: + snprintf(s, len, + "The password for connecting to the netplay \n" + "host. Used only in host mode."); + break; + case MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD: + snprintf(s, len, + "The password for connecting to the netplay \n" + "host with only spectator privileges. Used \n" + "only in host mode."); + break; + case MENU_ENUM_LABEL_STDIN_CMD_ENABLE: + snprintf(s, len, + "Enable stdin command interface."); + break; + case MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT: + snprintf(s, len, + "Start User Interface companion driver \n" + "on boot (if available)."); + break; + case MENU_ENUM_LABEL_MENU_DRIVER: + snprintf(s, len, "Menu driver to use."); + break; + case MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO: + snprintf(s, len, + "Gamepad button combination to toggle menu. \n" + " \n" + "0 - None \n" + "1 - Press L + R + Y + D-Pad Down \n" + "simultaneously. \n" + "2 - Press L3 + R3 simultaneously. \n" + "3 - Press Start + Select simultaneously."); + break; + case MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU: + snprintf(s, len, "Allows any user to control the menu. \n" + " \n" + "When disabled, only user 1 can control the menu."); + break; + case MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE: + snprintf(s, len, + "Enable input auto-detection.\n" + " \n" + "Will attempt to auto-configure \n" + "joypads, Plug-and-Play style."); + break; + case MENU_ENUM_LABEL_CAMERA_ALLOW: + snprintf(s, len, + "Allow or disallow camera access by \n" + "cores."); + break; + case MENU_ENUM_LABEL_LOCATION_ALLOW: + snprintf(s, len, + "Allow or disallow location services \n" + "access by cores."); + break; + case MENU_ENUM_LABEL_TURBO: + snprintf(s, len, + "Turbo enable.\n" + " \n" + "Holding the turbo while pressing another \n" + "button will let the button enter a turbo \n" + "mode where the button state is modulated \n" + "with a periodic signal. \n" + " \n" + "The modulation stops when the button \n" + "itself (not turbo button) is released."); + break; + case MENU_ENUM_LABEL_OSK_ENABLE: + snprintf(s, len, + "Enable/disable on-screen keyboard."); + break; + case MENU_ENUM_LABEL_AUDIO_MUTE: + snprintf(s, len, + "Mute/unmute audio."); + break; + case MENU_ENUM_LABEL_REWIND: + snprintf(s, len, + "Hold button down to rewind.\n" + " \n" + "Rewind must be enabled."); + break; + case MENU_ENUM_LABEL_EXIT_EMULATOR: + snprintf(s, len, + "Key to exit RetroArch cleanly." #if !defined(RARCH_MOBILE) && !defined(RARCH_CONSOLE) - "\nKilling it in any hard way (SIGKILL, \n" - "etc) will terminate without saving\n" - "RAM, etc. On Unix-likes,\n" - "SIGINT/SIGTERM allows\n" - "a clean deinitialization." + "\nKilling it in any hard way (SIGKILL, \n" + "etc) will terminate without saving\n" + "RAM, etc. On Unix-likes,\n" + "SIGINT/SIGTERM allows\n" + "a clean deinitialization." #endif - ); - break; - case MENU_ENUM_LABEL_LOAD_STATE: - snprintf(s, len, - "Loads state."); - break; - case MENU_ENUM_LABEL_SAVE_STATE: - snprintf(s, len, - "Saves state."); - break; - case MENU_ENUM_LABEL_NETPLAY_FLIP_PLAYERS: - snprintf(s, len, - "Netplay flip users."); - break; - case MENU_ENUM_LABEL_NETPLAY_GAME_WATCH: - snprintf(s, len, - "Netplay toggle play/spectate mode."); - break; - case MENU_ENUM_LABEL_CHEAT_INDEX_PLUS: - snprintf(s, len, - "Increment cheat index.\n"); - break; - case MENU_ENUM_LABEL_CHEAT_INDEX_MINUS: - snprintf(s, len, - "Decrement cheat index.\n"); - break; - case MENU_ENUM_LABEL_SHADER_PREV: - snprintf(s, len, - "Applies previous shader in directory."); - break; - case MENU_ENUM_LABEL_SHADER_NEXT: - snprintf(s, len, - "Applies next shader in directory."); - break; - case MENU_ENUM_LABEL_RESET: - snprintf(s, len, - "Reset the content.\n"); - break; - case MENU_ENUM_LABEL_PAUSE_TOGGLE: - snprintf(s, len, - "Toggle between paused and non-paused state."); - break; - case MENU_ENUM_LABEL_CHEAT_TOGGLE: - snprintf(s, len, - "Toggle cheat index.\n"); - break; - case MENU_ENUM_LABEL_HOLD_FAST_FORWARD: - snprintf(s, len, - "Hold for fast-forward. Releasing button \n" - "disables fast-forward."); - break; - case MENU_ENUM_LABEL_SLOWMOTION: - snprintf(s, len, - "Hold for slowmotion."); - break; - case MENU_ENUM_LABEL_FRAME_ADVANCE: - snprintf(s, len, - "Frame advance when content is paused."); - break; - case MENU_ENUM_LABEL_MOVIE_RECORD_TOGGLE: - snprintf(s, len, - "Toggle between recording and not."); - break; - case MENU_ENUM_LABEL_L_X_PLUS: - case MENU_ENUM_LABEL_L_X_MINUS: - case MENU_ENUM_LABEL_L_Y_PLUS: - case MENU_ENUM_LABEL_L_Y_MINUS: - case MENU_ENUM_LABEL_R_X_PLUS: - case MENU_ENUM_LABEL_R_X_MINUS: - case MENU_ENUM_LABEL_R_Y_PLUS: - case MENU_ENUM_LABEL_R_Y_MINUS: - snprintf(s, len, - "Axis for analog stick (DualShock-esque).\n" - " \n" - "Bound as usual, however, if a real analog \n" - "axis is bound, it can be read as a true analog.\n" - " \n" - "Positive X axis is right. \n" - "Positive Y axis is down."); - break; - case MENU_ENUM_LABEL_VALUE_WHAT_IS_A_CORE_DESC: - snprintf(s, len, - "RetroArch by itself does nothing. \n" - " \n" - "To make it do things, you need to \n" - "load a program into it. \n" - "\n" - "We call such a program 'Libretro core', \n" - "or 'core' in short. \n" - " \n" - "To load a core, select one from\n" - "'Load Core'.\n" - " \n" + ); + break; + case MENU_ENUM_LABEL_LOAD_STATE: + snprintf(s, len, + "Loads state."); + break; + case MENU_ENUM_LABEL_SAVE_STATE: + snprintf(s, len, + "Saves state."); + break; + case MENU_ENUM_LABEL_NETPLAY_FLIP_PLAYERS: + snprintf(s, len, + "Netplay flip users."); + break; + case MENU_ENUM_LABEL_NETPLAY_GAME_WATCH: + snprintf(s, len, + "Netplay toggle play/spectate mode."); + break; + case MENU_ENUM_LABEL_CHEAT_INDEX_PLUS: + snprintf(s, len, + "Increment cheat index.\n"); + break; + case MENU_ENUM_LABEL_CHEAT_INDEX_MINUS: + snprintf(s, len, + "Decrement cheat index.\n"); + break; + case MENU_ENUM_LABEL_SHADER_PREV: + snprintf(s, len, + "Applies previous shader in directory."); + break; + case MENU_ENUM_LABEL_SHADER_NEXT: + snprintf(s, len, + "Applies next shader in directory."); + break; + case MENU_ENUM_LABEL_RESET: + snprintf(s, len, + "Reset the content.\n"); + break; + case MENU_ENUM_LABEL_PAUSE_TOGGLE: + snprintf(s, len, + "Toggle between paused and non-paused state."); + break; + case MENU_ENUM_LABEL_CHEAT_TOGGLE: + snprintf(s, len, + "Toggle cheat index.\n"); + break; + case MENU_ENUM_LABEL_HOLD_FAST_FORWARD: + snprintf(s, len, + "Hold for fast-forward. Releasing button \n" + "disables fast-forward."); + break; + case MENU_ENUM_LABEL_SLOWMOTION: + snprintf(s, len, + "Hold for slowmotion."); + break; + case MENU_ENUM_LABEL_FRAME_ADVANCE: + snprintf(s, len, + "Frame advance when content is paused."); + break; + case MENU_ENUM_LABEL_MOVIE_RECORD_TOGGLE: + snprintf(s, len, + "Toggle between recording and not."); + break; + case MENU_ENUM_LABEL_L_X_PLUS: + case MENU_ENUM_LABEL_L_X_MINUS: + case MENU_ENUM_LABEL_L_Y_PLUS: + case MENU_ENUM_LABEL_L_Y_MINUS: + case MENU_ENUM_LABEL_R_X_PLUS: + case MENU_ENUM_LABEL_R_X_MINUS: + case MENU_ENUM_LABEL_R_Y_PLUS: + case MENU_ENUM_LABEL_R_Y_MINUS: + snprintf(s, len, + "Axis for analog stick (DualShock-esque).\n" + " \n" + "Bound as usual, however, if a real analog \n" + "axis is bound, it can be read as a true analog.\n" + " \n" + "Positive X axis is right. \n" + "Positive Y axis is down."); + break; + case MENU_ENUM_LABEL_VALUE_WHAT_IS_A_CORE_DESC: + snprintf(s, len, + "RetroArch by itself does nothing. \n" + " \n" + "To make it do things, you need to \n" + "load a program into it. \n" + "\n" + "We call such a program 'Libretro core', \n" + "or 'core' in short. \n" + " \n" + "To load a core, select one from\n" + "'Load Core'.\n" + " \n" #ifdef HAVE_NETWORKING - "You can obtain cores in several ways: \n" - "* Download them by going to\n" - "'%s' -> '%s'.\n" - "* Manually move them over to\n" - "'%s'.", - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) + "You can obtain cores in several ways: \n" + "* Download them by going to\n" + "'%s' -> '%s'.\n" + "* Manually move them over to\n" + "'%s'.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) #else - "You can obtain cores by\n" - "manually moving them over to\n" - "'%s'.", - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) + "You can obtain cores by\n" + "manually moving them over to\n" + "'%s'.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH) #endif - ); - break; - case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: - snprintf(s, len, - "You can change the virtual gamepad overlay\n" - "by going to '%s' -> '%s'." - " \n" - "From there you can change the overlay,\n" - "change the size and opacity of the buttons, etc.\n" - " \n" - "NOTE: By default, virtual gamepad overlays are\n" - "hidden when in the menu.\n" - "If you'd like to change this behavior,\n" - "you can set '%s' to false.", - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU) - ); - break; - default: - if (string_is_empty(s)) - strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); - return -1; - } + ); + break; + case MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD_DESC: + snprintf(s, len, + "You can change the virtual gamepad overlay\n" + "by going to '%s' -> '%s'." + " \n" + "From there you can change the overlay,\n" + "change the size and opacity of the buttons, etc.\n" + " \n" + "NOTE: By default, virtual gamepad overlays are\n" + "hidden when in the menu.\n" + "If you'd like to change this behavior,\n" + "you can set '%s' to false.", + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU) + ); + break; + default: + if (string_is_empty(s)) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + return -1; + } - return 0; + return 0; } #ifdef HAVE_MENU @@ -1951,7 +1930,7 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg) switch (msg) { - #include "msg_hash_lbl.h" +#include "msg_hash_lbl.h" default: #if 0 RARCH_LOG("Unimplemented: [%d]\n", msg); @@ -1963,27 +1942,25 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg) } #endif -const char *msg_hash_to_str_us(enum msg_hash_enums msg) -{ +const char *msg_hash_to_str_us(enum msg_hash_enums msg) { #ifdef HAVE_MENU - const char *ret = menu_hash_to_str_us_label_enum(msg); + const char *ret = menu_hash_to_str_us_label_enum(msg); - if (ret && !string_is_equal(ret, "null")) - return ret; + if (ret && !string_is_equal(ret, "null")) + return ret; #endif - switch (msg) - { - #include "msg_hash_us.h" - default: + switch (msg) { +#include "msg_hash_us.h" + default: #if 0 - RARCH_LOG("Unimplemented: [%d]\n", msg); - { - RARCH_LOG("[%d] : %s\n", msg - 1, msg_hash_to_str(((enum msg_hash_enums)(msg - 1)))); - } + RARCH_LOG("Unimplemented: [%d]\n", msg); + { + RARCH_LOG("[%d] : %s\n", msg - 1, msg_hash_to_str(((enum msg_hash_enums)(msg - 1)))); + } #endif - break; - } + break; + } - return "null"; + return "null"; } From d79fe15e9a475db02884ec9458700b9dceae9f97 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 10:49:33 +0100 Subject: [PATCH 094/427] Use wcstombs by default instead of relying on preprocessor detection of Windows version --- ui/drivers/ui_win32.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 8194e30433..e8a4652386 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -614,12 +614,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam) * This is needed for proper multi-byte string display until Unicode is fully supported. */ MultiByteToWideChar(CP_UTF8, 0, title, -1, title_wide, sizeof(title_wide) / sizeof(title_wide[0])); -#if !defined(_MSC_VER) && (_WIN32_WINNT > _WIN32_WINNT_WINXP) - /* MinGW does not define wcstombs_s for XP, but MSVC does */ - wcstombs_s(&converted, title_cp, sizeof(title_cp), title_wide, sizeof(title_cp) - 1); -#else wcstombs(title_cp, title_wide, sizeof(title_cp) - 1); -#endif if (!win32_browser(owner, win32_file, extensions, title_cp, initial_dir)) From 724b68d5cbb9b6aaf27c294353c096f96b800a77 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 10:54:48 +0100 Subject: [PATCH 095/427] (gdi_gfx.c) Style nits --- gfx/drivers/gdi_gfx.c | 112 ++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 58 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 5100759dee..05f9e00509 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -28,20 +28,18 @@ #endif static unsigned char *gdi_menu_frame = NULL; -static unsigned gdi_menu_width = 0; -static unsigned gdi_menu_height = 0; -static unsigned gdi_menu_pitch = 0; -static unsigned gdi_video_width = 0; -static unsigned gdi_video_height = 0; -static unsigned gdi_video_pitch = 0; -static unsigned gdi_video_bits = 0; -static unsigned gdi_menu_bits = 0; -static bool gdi_rgb32 = false; -static bool gdi_menu_rgb32 = false; +static unsigned gdi_menu_width = 0; +static unsigned gdi_menu_height = 0; +static unsigned gdi_menu_pitch = 0; +static unsigned gdi_video_width = 0; +static unsigned gdi_video_height = 0; +static unsigned gdi_video_pitch = 0; +static unsigned gdi_video_bits = 0; +static unsigned gdi_menu_bits = 0; +static bool gdi_rgb32 = false; +static bool gdi_menu_rgb32 = false; -static void gdi_gfx_free(void *data); - -static void gdi_gfx_create() +static void gdi_gfx_create(void) { } @@ -49,22 +47,22 @@ static void *gdi_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { unsigned full_x, full_y; - settings_t *settings = config_get_ptr(); - gdi_t *gdi = (gdi_t*)calloc(1, sizeof(*gdi)); - const gfx_ctx_driver_t *ctx_driver = NULL; gfx_ctx_input_t inp; gfx_ctx_mode_t mode; - unsigned win_width = 0, win_height = 0; + const gfx_ctx_driver_t *ctx_driver = NULL; + unsigned win_width = 0, win_height = 0; unsigned temp_width = 0, temp_height = 0; + settings_t *settings = config_get_ptr(); + gdi_t *gdi = (gdi_t*)calloc(1, sizeof(*gdi)); - *input = NULL; - *input_data = NULL; + *input = NULL; + *input_data = NULL; - gdi_video_width = video->width; - gdi_video_height = video->height; - gdi_rgb32 = video->rgb32; + gdi_video_width = video->width; + gdi_video_height = video->height; + gdi_rgb32 = video->rgb32; - gdi_video_bits = video->rgb32 ? 32 : 16; + gdi_video_bits = video->rgb32 ? 32 : 16; if (video->rgb32) gdi_video_pitch = video->width * 4; @@ -85,15 +83,15 @@ static void *gdi_gfx_init(const video_info_t *video, video_context_driver_get_video_size(&mode); - full_x = mode.width; - full_y = mode.height; + full_x = mode.width; + full_y = mode.height; mode.width = 0; mode.height = 0; RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); - win_width = video->width; - win_height = video->height; + win_width = video->width; + win_height = video->height; if (video->fullscreen && (win_width == 0) && (win_height == 0)) { @@ -150,15 +148,15 @@ static bool gdi_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t video_info) { - const void *frame_to_copy = frame; - unsigned width = 0; - unsigned height = 0; - unsigned bits = gdi_video_bits; - bool draw = true; - gdi_t *gdi = (gdi_t*)data; gfx_ctx_mode_t mode; - HWND hwnd = win32_get_window(); RECT rect; + const void *frame_to_copy = frame; + unsigned width = 0; + unsigned height = 0; + unsigned bits = gdi_video_bits; + bool draw = true; + gdi_t *gdi = (gdi_t*)data; + HWND hwnd = win32_get_window(); if (!frame || !frame_width || !frame_height) return true; @@ -180,16 +178,16 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (gdi_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { frame_to_copy = gdi_menu_frame; - width = gdi_menu_width; - height = gdi_menu_height; - pitch = gdi_menu_pitch; - bits = gdi_menu_bits; + width = gdi_menu_width; + height = gdi_menu_height; + pitch = gdi_menu_pitch; + bits = gdi_menu_bits; } else { - width = gdi_video_width; - height = gdi_video_height; - pitch = gdi_video_pitch; + width = gdi_video_width; + height = gdi_video_height; + pitch = gdi_video_pitch; if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) draw = false; @@ -203,19 +201,17 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (draw) { - HDC winDC = GetDC(hwnd); - HDC memDC = CreateCompatibleDC(winDC); - HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); - HBITMAP bmp_old; + HDC winDC = GetDC(hwnd); + HDC memDC = CreateCompatibleDC(winDC); + HBITMAP bmp = CreateCompatibleBitmap(winDC, width, height); BITMAPINFO *info = (BITMAPINFO*)calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); + HBITMAP bmp_old = (HBITMAP)SelectObject(memDC, bmp); - bmp_old = (HBITMAP)SelectObject(memDC, bmp); - - info->bmiHeader.biBitCount = bits; - info->bmiHeader.biWidth = pitch / (bits / 8); - info->bmiHeader.biHeight = -height; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER) + (3 * sizeof(RGBQUAD)); + info->bmiHeader.biBitCount = bits; + info->bmiHeader.biWidth = pitch / (bits / 8); + info->bmiHeader.biHeight = -height; + info->bmiHeader.biPlanes = 1; + info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER) + (3 * sizeof(RGBQUAD)); info->bmiHeader.biSizeImage = 0; if (bits == 16) @@ -270,8 +266,8 @@ static bool gdi_gfx_alive(void *data) gfx_ctx_size_t size_data; unsigned temp_width = 0; unsigned temp_height = 0; - bool quit = false; - bool resize = false; + bool quit = false; + bool resize = false; /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); @@ -380,10 +376,10 @@ static void gdi_set_texture_frame(void *data, if (gdi_menu_frame && frame && pitch && height) { memcpy(gdi_menu_frame, frame, pitch * height); - gdi_menu_width = width; + gdi_menu_width = width; gdi_menu_height = height; - gdi_menu_pitch = pitch; - gdi_menu_bits = rgb32 ? 32 : 16; + gdi_menu_pitch = pitch; + gdi_menu_bits = rgb32 ? 32 : 16; } } @@ -470,7 +466,7 @@ static void gdi_gfx_set_viewport(void *data, unsigned viewport_width, { } -bool gdi_has_menu_frame() +bool gdi_has_menu_frame(void) { return (gdi_menu_frame != NULL); } From e9cff022fc46f08f0d3b2729fe98114b3aad6f80 Mon Sep 17 00:00:00 2001 From: ggf906 Date: Tue, 17 Jan 2017 11:43:12 +0100 Subject: [PATCH 096/427] (VITA) Update to latest vitasdk --- frontend/drivers/platform_psp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 9321651336..27979d3e06 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -23,7 +23,6 @@ #endif #ifdef VITA -#include #include #include #include @@ -57,9 +56,7 @@ #endif #endif -#ifdef VITA -PSP2_MODULE_INFO(0, 0, "RetroArch"); -#else +#ifndef VITA PSP_MODULE_INFO("RetroArch", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER|THREAD_ATTR_VFPU); #ifdef BIG_STACK From 14660a8c1295aeb8d9feb0e8d2854312879c6332 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Tue, 17 Jan 2017 12:41:55 +0100 Subject: [PATCH 097/427] (WiiU) simplify input code, add button labels for autoconfigs. --- input/drivers_joypad/wiiu_joypad.c | 122 ++++------------ input/input_autodetect_builtin.c | 216 ++++++++++++++--------------- 2 files changed, 136 insertions(+), 202 deletions(-) diff --git a/input/drivers_joypad/wiiu_joypad.c b/input/drivers_joypad/wiiu_joypad.c index f941254fab..8610f64108 100644 --- a/input/drivers_joypad/wiiu_joypad.c +++ b/input/drivers_joypad/wiiu_joypad.c @@ -163,51 +163,28 @@ static void wiiu_joypad_poll(void) if (!vpadError) { - pad_state[0] = 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_X) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_Y) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_ZR) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_ZL) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_STICK_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; - pad_state[0] |= (vpad.hold & VPAD_BUTTON_STICK_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; - - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.leftStick.x * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -vpad.leftStick.y * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.rightStick.x * 0x7FF0; - analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = -vpad.rightStick.y * 0x7FF0; + pad_state[0] = vpad.hold & ~0x7F800000; /* clear out emulated analog sticks */ + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.leftStick.x * 0x7FF0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = vpad.leftStick.y * 0x7FF0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = vpad.rightStick.x * 0x7FF0; + analog_state[0][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = vpad.rightStick.y * 0x7FF0; BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE); - if (((vpad.tpNormal.touched) && (vpad.tpNormal.x > 200) && (vpad.tpNormal.validity) == 0) || - (vpad.trigger & VPAD_BUTTON_HOME)) + if ((vpad.tpNormal.touched) && (vpad.tpNormal.x > 200) && (vpad.tpNormal.validity) == 0) BIT64_SET(lifecycle_state, RARCH_MENU_TOGGLE); /* panic button */ - if ((vpad.hold & VPAD_BUTTON_R) && - (vpad.hold & VPAD_BUTTON_L) && - (vpad.hold & VPAD_BUTTON_STICK_R) && - (vpad.hold & VPAD_BUTTON_STICK_L)) + if ((vpad.hold & (VPAD_BUTTON_R | VPAD_BUTTON_L | VPAD_BUTTON_STICK_R | VPAD_BUTTON_STICK_L)) + == (VPAD_BUTTON_R | VPAD_BUTTON_L | VPAD_BUTTON_STICK_R | VPAD_BUTTON_STICK_L)) command_event(CMD_EVENT_QUIT, NULL); } for (c = 0; c < 4; c++) { KPADData kpad; - u32 result; - result = KPADRead(c, &kpad, 1); - - if (!result) + if (!KPADRead(c, &kpad, 1)) continue; if (pad_type[c] != kpad.device_type) @@ -216,77 +193,38 @@ static void wiiu_joypad_poll(void) wiiu_joypad_autodetect_add(c + 1); } - pad_state[c + 1] = 0; - switch (kpad.device_type) { case WIIUINPUT_TYPE_WIIMOTE: - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; - - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = 0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = 0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; + pad_state[c + 1] = kpad.btns_h; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; break; case WIIUINPUT_TYPE_NUNCHUK: - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_1) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_2) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_Z) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; - pad_state[c + 1] |= (kpad.btns_h & WPAD_BUTTON_C) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; - - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.nunchuck.stick_x * 0x7FF0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -kpad.nunchuck.stick_y * 0x7FF0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = 0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; + pad_state[c + 1] = kpad.btns_h; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.nunchuck.stick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = kpad.nunchuck.stick_y * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = 0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = 0; break; case WIIUINPUT_TYPE_PRO_CONTROLLER: + pad_state[c + 1] = kpad.classic.btns_h & ~0x3FC0000; /* clear out emulated analog sticks */ + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.lstick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = kpad.classic.lstick_y * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.rstick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = kpad.classic.rstick_y * 0x7FF0; + break; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_PRO_BUTTON_STICK_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R3) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_PRO_BUTTON_STICK_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L3) : 0; - - /* fallthrough */ case WIIUINPUT_TYPE_CLASSIC_CONTROLLER: - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_LEFT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_DOWN) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_RIGHT) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT) : - 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_UP) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_PLUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START) : - 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_MINUS) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT) : - 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_X) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_Y) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_B) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_B) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_A) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_A) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_R) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_L) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_ZR) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R2) : 0; - pad_state[c + 1] |= (kpad.classic.btns_h & WPAD_CLASSIC_BUTTON_ZL) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L2) : 0; - - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.lstick_x * 0x7FF0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = -kpad.classic.lstick_y * 0x7FF0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.rstick_x * 0x7FF0; - analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = -kpad.classic.rstick_y * 0x7FF0; + pad_state[c + 1] = kpad.classic.btns_h & ~0xFF0000; /* clear out emulated analog sticks */ + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.lstick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_LEFT] [RETRO_DEVICE_ID_ANALOG_Y] = kpad.classic.lstick_y * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_X] = kpad.classic.rstick_x * 0x7FF0; + analog_state[c + 1][RETRO_DEVICE_INDEX_ANALOG_RIGHT] [RETRO_DEVICE_ID_ANALOG_Y] = kpad.classic.rstick_y * 0x7FF0; break; } } diff --git a/input/input_autodetect_builtin.c b/input/input_autodetect_builtin.c index 3061277223..8c6c7f3a17 100644 --- a/input/input_autodetect_builtin.c +++ b/input/input_autodetect_builtin.c @@ -27,7 +27,9 @@ #endif #define DECL_BTN(btn, bind) "input_" #btn "_btn = " #bind "\n" +#define DECL_BTN_EX(btn, bind, name) "input_" #btn "_btn = " #bind "\ninput_" #btn "_btn_label = \"" name "\"\n" #define DECL_AXIS(axis, bind) "input_" #axis "_axis = " #bind "\n" +#define DECL_AXIS_EX(axis, bind, name) "input_" #axis "_axis = " #bind "\ninput_" #axis "_axis_label = \"" name "\"\n" #define DECL_MENU(btn) "input_menu_toggle_btn = " #btn "\n" #define DECL_AUTOCONF_DEVICE(device, driver, binds) "input_device = \"" #device "\" \ninput_driver = \"" #driver "\" \n" binds @@ -196,124 +198,118 @@ DECL_AXIS(r_y_minus, +3) #ifdef WIIU #define WIIUINPUT_GAMEPAD_DEFAULT_BINDS \ -DECL_BTN(a, 8) \ -DECL_BTN(b, 0) \ -DECL_BTN(x, 9) \ -DECL_BTN(y, 1) \ -DECL_BTN(start, 3) \ -DECL_BTN(select, 2) \ -DECL_BTN(up, 4) \ -DECL_BTN(down, 5) \ -DECL_BTN(left, 6) \ -DECL_BTN(right, 7) \ -DECL_BTN(l, 10) \ -DECL_BTN(r, 11) \ -DECL_BTN(l2, 12) \ -DECL_BTN(r2, 13) \ -DECL_AXIS(l_x_plus, +0) \ -DECL_AXIS(l_x_minus, -0) \ -DECL_AXIS(l_y_plus, +1) \ -DECL_AXIS(l_y_minus, -1) \ -DECL_AXIS(r_x_plus, +2) \ -DECL_AXIS(r_x_minus, -2) \ -DECL_AXIS(r_y_plus, -3) \ -DECL_AXIS(r_y_minus, +3) +DECL_BTN_EX(menu_toggle, 1, "Home") \ +DECL_BTN_EX(select, 2, "-") \ +DECL_BTN_EX(start, 3, "+") \ +DECL_BTN_EX(r, 4, "R") \ +DECL_BTN_EX(l, 5, "L") \ +DECL_BTN_EX(r2, 6, "ZR") \ +DECL_BTN_EX(l2, 7, "ZL") \ +DECL_BTN_EX(down, 8, "D-Pad Down") \ +DECL_BTN_EX(up, 9, "D-Pad Up") \ +DECL_BTN_EX(right, 10, "D-Pad Right") \ +DECL_BTN_EX(left, 11, "D-Pad Left") \ +DECL_BTN_EX(y, 12, "Y") \ +DECL_BTN_EX(x, 13, "X") \ +DECL_BTN_EX(b, 14, "B") \ +DECL_BTN_EX(a, 15, "A") \ +DECL_BTN_EX(r3, 17, "Right Thumb") \ +DECL_BTN_EX(l3, 18, "Left Thumb") \ +DECL_AXIS_EX(l_x_plus, +0, "L-Stick right") \ +DECL_AXIS_EX(l_x_minus, -0, "L-Stick left") \ +DECL_AXIS_EX(l_y_minus, +1, "L-Stick up") \ +DECL_AXIS_EX(l_y_plus, -1, "L-Stick down") \ +DECL_AXIS_EX(r_x_plus, +2, "R-Stick right") \ +DECL_AXIS_EX(r_x_minus, -2, "R-Stick left") \ +DECL_AXIS_EX(r_y_minus, +3, "R-Stick up") \ +DECL_AXIS_EX(r_y_plus, -3, "R-Stick down") #define WIIUINPUT_PRO_CONTROLLER_DEFAULT_BINDS \ -DECL_BTN(a, 8) \ -DECL_BTN(b, 0) \ -DECL_BTN(x, 9) \ -DECL_BTN(y, 1) \ -DECL_BTN(start, 3) \ -DECL_BTN(select, 2) \ -DECL_BTN(up, 4) \ -DECL_BTN(down, 5) \ -DECL_BTN(left, 6) \ -DECL_BTN(right, 7) \ -DECL_BTN(l, 10) \ -DECL_BTN(r, 11) \ -DECL_BTN(l2, 12) \ -DECL_BTN(r2, 13) \ -DECL_AXIS(l_x_plus, +0) \ -DECL_AXIS(l_x_minus, -0) \ -DECL_AXIS(l_y_plus, +1) \ -DECL_AXIS(l_y_minus, -1) \ -DECL_AXIS(r_x_plus, +2) \ -DECL_AXIS(r_x_minus, -2) \ -DECL_AXIS(r_y_plus, -3) \ -DECL_AXIS(r_y_minus, +3) +DECL_BTN_EX(up, 0, "D-Pad Up") \ +DECL_BTN_EX(left, 1, "D-Pad Left") \ +DECL_BTN_EX(r2, 2, "ZR") \ +DECL_BTN_EX(x, 3, "X") \ +DECL_BTN_EX(a, 4, "A") \ +DECL_BTN_EX(y, 5, "Y") \ +DECL_BTN_EX(b, 6, "B") \ +DECL_BTN_EX(l2, 7, "ZL") \ +DECL_BTN_EX(r, 9, "R") \ +DECL_BTN_EX(start, 10, "+") \ +DECL_BTN_EX(menu_toggle, 11, "Home") \ +DECL_BTN_EX(select, 12, "-") \ +DECL_BTN_EX(l, 13, "L") \ +DECL_BTN_EX(down, 14, "D-Pad Down") \ +DECL_BTN_EX(right, 15, "D-Pad Right") \ +DECL_BTN_EX(r3, 16, "Right Thumb") \ +DECL_BTN_EX(l3, 17, "Left Thumb") \ +DECL_AXIS_EX(l_x_plus, +0, "L-Stick right") \ +DECL_AXIS_EX(l_x_minus, -0, "L-Stick left") \ +DECL_AXIS_EX(l_y_minus, +1, "L-Stick up") \ +DECL_AXIS_EX(l_y_plus, -1, "L-Stick down") \ +DECL_AXIS_EX(r_x_plus, +2, "R-Stick right") \ +DECL_AXIS_EX(r_x_minus, -2, "R-Stick left") \ +DECL_AXIS_EX(r_y_minus, +3, "R-Stick up") \ +DECL_AXIS_EX(r_y_plus, -3, "R-Stick down") #define WIIUINPUT_CLASSIC_CONTROLLER_DEFAULT_BINDS \ -DECL_BTN(a, 8) \ -DECL_BTN(b, 0) \ -DECL_BTN(x, 9) \ -DECL_BTN(y, 1) \ -DECL_BTN(start, 3) \ -DECL_BTN(select, 2) \ -DECL_BTN(up, 4) \ -DECL_BTN(down, 5) \ -DECL_BTN(left, 6) \ -DECL_BTN(right, 7) \ -DECL_BTN(l, 10) \ -DECL_BTN(r, 11) \ -DECL_BTN(l2, 12) \ -DECL_BTN(r2, 13) \ -DECL_AXIS(l_x_plus, +0) \ -DECL_AXIS(l_x_minus, -0) \ -DECL_AXIS(l_y_plus, +1) \ -DECL_AXIS(l_y_minus, -1) \ -DECL_AXIS(r_x_plus, +2) \ -DECL_AXIS(r_x_minus, -2) \ -DECL_AXIS(r_y_plus, -3) \ -DECL_AXIS(r_y_minus, +3) +DECL_BTN_EX(up, 0, "D-Pad Up") \ +DECL_BTN_EX(left, 1, "D-Pad Left") \ +DECL_BTN_EX(r2, 2, "ZR") \ +DECL_BTN_EX(x, 3, "X") \ +DECL_BTN_EX(a, 4, "A") \ +DECL_BTN_EX(y, 5, "Y") \ +DECL_BTN_EX(b, 6, "B") \ +DECL_BTN_EX(l2, 7, "ZL") \ +DECL_BTN_EX(r, 9, "R") \ +DECL_BTN_EX(start, 10, "+") \ +DECL_BTN_EX(menu_toggle, 11, "Home") \ +DECL_BTN_EX(select, 12, "-") \ +DECL_BTN_EX(l, 13, "L") \ +DECL_BTN_EX(down, 14, "D-Pad Down") \ +DECL_BTN_EX(right, 15, "D-Pad Right") \ +DECL_AXIS_EX(l_x_plus, +0, "L-Stick right") \ +DECL_AXIS_EX(l_x_minus, -0, "L-Stick left") \ +DECL_AXIS_EX(l_y_minus, +1, "L-Stick up") \ +DECL_AXIS_EX(l_y_plus, -1, "L-Stick down") \ +DECL_AXIS_EX(r_x_plus, +2, "R-Stick right") \ +DECL_AXIS_EX(r_x_minus, -2, "R-Stick left") \ +DECL_AXIS_EX(r_y_minus, +3, "R-Stick up") \ +DECL_AXIS_EX(r_y_plus, -3, "R-Stick down") #define WIIUINPUT_WIIMOTE_DEFAULT_BINDS \ -DECL_BTN(a, 8) \ -DECL_BTN(b, 0) \ -DECL_BTN(x, 9) \ -DECL_BTN(y, 1) \ -DECL_BTN(start, 3) \ -DECL_BTN(select, 2) \ -DECL_BTN(up, 4) \ -DECL_BTN(down, 5) \ -DECL_BTN(left, 6) \ -DECL_BTN(right, 7) \ -DECL_BTN(l, 10) \ -DECL_BTN(r, 11) \ -DECL_BTN(l2, 12) \ -DECL_BTN(r2, 13) \ -DECL_AXIS(l_x_plus, +0) \ -DECL_AXIS(l_x_minus, -0) \ -DECL_AXIS(l_y_plus, +1) \ -DECL_AXIS(l_y_minus, -1) \ -DECL_AXIS(r_x_plus, +2) \ -DECL_AXIS(r_x_minus, -2) \ -DECL_AXIS(r_y_plus, -3) \ -DECL_AXIS(r_y_minus, +3) +DECL_BTN_EX(down, 0, "D-Pad Left") \ +DECL_BTN_EX(up, 1, "D-Pad Right") \ +DECL_BTN_EX(right, 2, "D-Pad Down") \ +DECL_BTN_EX(left, 3, "D-Pad Up") \ +DECL_BTN_EX(start, 4, "+") \ +DECL_BTN_EX(a, 8, "2") \ +DECL_BTN_EX(b, 9, "1") \ +DECL_BTN_EX(x, 10, "B") \ +DECL_BTN_EX(y, 11, "A") \ +DECL_BTN_EX(select, 12, "-") \ +DECL_BTN_EX(l, 13, "Z") \ +DECL_BTN_EX(r, 14, "C") \ +DECL_BTN_EX(menu_toggle, 15, "Home") #define WIIUINPUT_NUNCHUK_DEFAULT_BINDS \ -DECL_BTN(a, 8) \ -DECL_BTN(b, 0) \ -DECL_BTN(x, 9) \ -DECL_BTN(y, 1) \ -DECL_BTN(start, 3) \ -DECL_BTN(select, 2) \ -DECL_BTN(up, 4) \ -DECL_BTN(down, 5) \ -DECL_BTN(left, 6) \ -DECL_BTN(right, 7) \ -DECL_BTN(l, 10) \ -DECL_BTN(r, 11) \ -DECL_BTN(l2, 12) \ -DECL_BTN(r2, 13) \ -DECL_AXIS(l_x_plus, +0) \ -DECL_AXIS(l_x_minus, -0) \ -DECL_AXIS(l_y_plus, +1) \ -DECL_AXIS(l_y_minus, -1) \ -DECL_AXIS(r_x_plus, +2) \ -DECL_AXIS(r_x_minus, -2) \ -DECL_AXIS(r_y_plus, -3) \ -DECL_AXIS(r_y_minus, +3) +DECL_BTN_EX(left, 0, "D-Pad Left") \ +DECL_BTN_EX(right, 1, "D-Pad Right") \ +DECL_BTN_EX(down, 2, "D-Pad Down") \ +DECL_BTN_EX(up, 3, "D-Pad Up") \ +DECL_BTN_EX(start, 4, "+") \ +DECL_BTN_EX(y, 8, "2") \ +DECL_BTN_EX(x, 9, "1") \ +DECL_BTN_EX(b, 10, "B") \ +DECL_BTN_EX(a, 11, "A") \ +DECL_BTN_EX(select, 12, "-") \ +DECL_BTN_EX(l, 13, "Z") \ +DECL_BTN_EX(r, 14, "C") \ +DECL_BTN_EX(menu_toggle, 15, "Home") \ +DECL_AXIS_EX(l_x_plus, +0, "Stick Right") \ +DECL_AXIS_EX(l_x_minus, -0, "Stick Left") \ +DECL_AXIS_EX(l_y_minus, +1, "Stick Up") \ +DECL_AXIS_EX(l_y_plus, -1, "Stick Down") \ + #endif #define GXINPUT_GAMECUBE_DEFAULT_BINDS \ From ee7fd79fb2ca45378d1d5bef5e6b44cb554e31a9 Mon Sep 17 00:00:00 2001 From: aliaspider Date: Tue, 17 Jan 2017 13:03:39 +0100 Subject: [PATCH 098/427] cores_names_size was used in a conditional branch without being initialized, fixes a crash on content reload. --- menu/menu_displaylist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 84f802422e..8095cbe088 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5745,7 +5745,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) { unsigned cores_names_len; - size_t cores_names_size; + size_t cores_names_size = 0; unsigned cores_paths_len; size_t cores_paths_size; struct string_list *cores_names = From 814fb5960883c672e30f620005dabf058d5c94a5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 13:44:23 +0100 Subject: [PATCH 099/427] Try to prevent more uninitialized variables --- menu/menu_displaylist.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index fa267f46fd..6a33b61a55 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -5743,10 +5743,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) info->need_push = true; { - unsigned cores_names_len; - size_t cores_names_size = 0; - unsigned cores_paths_len; - size_t cores_paths_size; + unsigned cores_names_len = 0; + unsigned cores_paths_len = 0; + size_t cores_paths_size = 0; + size_t cores_names_size = 0; struct string_list *cores_names = string_list_new_special(STRING_LIST_SUPPORTED_CORES_NAMES, (void*)menu->deferred_path, @@ -5878,10 +5878,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) info->need_push = true; { - unsigned cores_names_len; - size_t cores_names_size; - unsigned cores_paths_len; - size_t cores_paths_size; + unsigned cores_names_len = 0; + unsigned cores_paths_len = 0; + size_t cores_paths_size = 0; + size_t cores_names_size = 0; struct string_list *cores_names = string_list_new_special(STRING_LIST_SUPPORTED_CORES_NAMES, (void*)menu->deferred_path, From 702622380c28dc41ba3d73cbde42922ccefdd14d Mon Sep 17 00:00:00 2001 From: ggf906 Date: Tue, 17 Jan 2017 13:52:29 +0100 Subject: [PATCH 100/427] (VITA) Fix salamander --- Makefile.vita.salamander | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.vita.salamander b/Makefile.vita.salamander index 2ff3976a32..8e86cdb0a1 100644 --- a/Makefile.vita.salamander +++ b/Makefile.vita.salamander @@ -21,7 +21,7 @@ RARCH_DEFINES = -DVITA -DIS_SALAMANDER -DRARCH_CONSOLE LIBDIR = LDFLAGS = -LIBS = -lSceKernel_stub -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\ +LIBS = -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\ -lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub -lSceFiber_stub\ -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \ -lSceMotion_stub -lSceAppMgr_stub -lfreetype -lpng -lm -lc @@ -48,7 +48,7 @@ OBJS = frontend/frontend_salamander.o \ libretro-common/file/retro_stat.o \ libretro-common/hash/rhash.o \ file_path_str.o \ - verbosity.o + verbosity.o all: $(TARGET).vpk @@ -67,7 +67,7 @@ $(TARGET).elf: $(OBJS) %.o: %.png $(PREFIX)-ld -r -b binary -o $@ $^ - + clean: @rm -rf $(TARGET).vpk $(TARGET).velf $(TARGET).elf $(OBJS) \ eboot.bin param.sfo From f074c3fa7eb91ca4f30f05b95c35236e9c7766f3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:02:50 +0100 Subject: [PATCH 101/427] Add this --- Makefile.common | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.common b/Makefile.common index 2bf94f9dba..7b2d4e938f 100644 --- a/Makefile.common +++ b/Makefile.common @@ -26,6 +26,10 @@ ifeq ($(HAVE_VIDEO_PROCESSOR), 1) DEFINES += -DHAVE_VIDEO_PROCESSOR endif +ifeq ($(HAVE_SOCKET_LEGACY), 1) + DEFINES += -DHAVE_SOCKET_LEGACY +endif + ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_HID endif From 08a09f135a334209baa94b14a1973492726bb803 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:06:54 +0100 Subject: [PATCH 102/427] (menu_displaylist.c) Cleanup --- menu/menu_displaylist.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6a33b61a55..8d625e52f7 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1715,13 +1715,10 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) char tmp[PATH_MAX_LENGTH]; char crc_str[20]; database_info_t *db_info_entry = &db_info->list[i]; - bool show_advanced_settings = false; + bool show_advanced_settings = settings->menu.show_advanced_settings; crc_str[0] = tmp[0] = '\0'; - if (settings) - show_advanced_settings = settings->menu.show_advanced_settings; - snprintf(crc_str, sizeof(crc_str), "%08X", db_info_entry->crc32); if (playlist) From 3c0538a1eedd5e1ce2e0d81045558b8738d6a0d7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:15:43 +0100 Subject: [PATCH 103/427] (menu_animation.c) Cleanups --- menu/menu_animation.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 70636f12d2..8636be7add 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -289,24 +289,15 @@ static float easing_out_in_bounce(float t, float b, float c, float d) static void menu_animation_ticker_generic(uint64_t idx, size_t max_width, size_t *offset, size_t *width) { - int ticker_period, phase, phase_left_stop; - int phase_left_moving, phase_right_stop; - int left_offset, right_offset; + int ticker_period = 2 * (*width - max_width) + 4; + int phase = idx % ticker_period; - *offset = 0; + int phase_left_stop = 2; + int phase_left_moving = phase_left_stop + (*width - max_width); + int phase_right_stop = phase_left_moving + 2; - if (*width <= max_width) - return; - - ticker_period = 2 * (*width - max_width) + 4; - phase = idx % ticker_period; - - phase_left_stop = 2; - phase_left_moving = phase_left_stop + (*width - max_width); - phase_right_stop = phase_left_moving + 2; - - left_offset = phase - phase_left_stop; - right_offset = (*width - max_width) - (phase - phase_right_stop); + int left_offset = phase - phase_left_stop; + int right_offset = (*width - max_width) - (phase - phase_right_stop); if (phase < phase_left_stop) *offset = 0; @@ -661,11 +652,12 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) return true; } - menu_animation_ticker_generic( - ticker->idx, - ticker->len, - &offset, - &str_len); + if (str_len > ticker->len) + menu_animation_ticker_generic( + ticker->idx, + ticker->len, + &offset, + &str_len); utf8cpy( ticker->s, From f82e51e5e82bb4c7b68a4ef49c1f8a9f03dc9561 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:16:49 +0100 Subject: [PATCH 104/427] (menu_animation.c) Cleanup --- menu/menu_animation.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 8636be7add..385aa98d47 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -631,9 +631,9 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) break; case MENU_ANIMATION_CTL_TICKER: { - menu_animation_ctx_ticker_t *ticker = (menu_animation_ctx_ticker_t*) - data; - size_t str_len = utf8len(ticker->str); + menu_animation_ctx_ticker_t + *ticker = (menu_animation_ctx_ticker_t*)data; + size_t str_len = ticker ? utf8len(ticker->str) : 0; size_t offset = 0; if ((size_t)str_len <= ticker->len) From 68bb87f392c75450701824b563ca908b2c65cfa7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:21:41 +0100 Subject: [PATCH 105/427] Try to fix Coverity warning 'uninitialized scalar variable' --- libretro-db/libretrodb.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/libretro-db/libretrodb.c b/libretro-db/libretrodb.c index 8db5917d13..76ec2facef 100644 --- a/libretro-db/libretrodb.c +++ b/libretro-db/libretrodb.c @@ -464,8 +464,8 @@ int libretrodb_create_index(libretrodb_t *db, struct node_iter_ctx nictx; struct rmsgpack_dom_value key; libretrodb_index_t idx; - uint64_t idx_header_offset; struct rmsgpack_dom_value item; + uint64_t idx_header_offset = 0; libretrodb_cursor_t cur = {0}; struct rmsgpack_dom_value *field = NULL; void *buff = NULL; @@ -474,15 +474,14 @@ int libretrodb_create_index(libretrodb_t *db, uint64_t item_loc = libretrodb_tell(db); bintree_t *tree = bintree_new(node_compare, &field_size); + item.type = RDT_NULL; + if (!tree || (libretrodb_cursor_open(db, &cur, NULL) != 0)) goto clean; - key.type = RDT_STRING; - key.val.string.len = strlen(field_name); - - /* We know we aren't going to change it */ - key.val.string.buff = (char *) field_name; - item.type = RDT_NULL; + key.type = RDT_STRING; + key.val.string.len = strlen(field_name); + key.val.string.buff = (char *) field_name; /* We know we aren't going to change it */ while (libretrodb_cursor_read_item(&cur, &item) == 0) { @@ -522,9 +521,7 @@ int libretrodb_create_index(libretrodb_t *db, buff = malloc(field_size + sizeof(uint64_t)); if (!buff) - { goto clean; - } memcpy(buff, field->val.binary.buff, field_size); @@ -539,7 +536,7 @@ int libretrodb_create_index(libretrodb_t *db, printf("\n"); goto clean; } - buff = NULL; + buff = NULL; rmsgpack_dom_value_free(&item); item_loc = libretrodb_tell(db); } @@ -552,10 +549,10 @@ int libretrodb_create_index(libretrodb_t *db, idx.name[49] = '\0'; idx.key_size = field_size; - idx.next = db->count * (field_size + sizeof(uint64_t)); + idx.next = db->count * (field_size + sizeof(uint64_t)); libretrodb_write_index_header(db->fd, &idx); - nictx.db = db; + nictx.db = db; nictx.idx = &idx; bintree_iterate(tree, node_iter, &nictx); From 4b8c22e311caa2238e8641d4675d39ab38268479 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:40:59 +0100 Subject: [PATCH 106/427] Add HAVE_MENU ifdef --- Makefile.common | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.common b/Makefile.common index 7b2d4e938f..b992d8222b 100644 --- a/Makefile.common +++ b/Makefile.common @@ -26,6 +26,10 @@ ifeq ($(HAVE_VIDEO_PROCESSOR), 1) DEFINES += -DHAVE_VIDEO_PROCESSOR endif +ifeq ($(HAVE_MENU), 1) + DEFINES += -DHAVE_MENU +endif + ifeq ($(HAVE_SOCKET_LEGACY), 1) DEFINES += -DHAVE_SOCKET_LEGACY endif From 4bae3032dd3f254c07e08fb8b101d67e677a7011 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:51:24 +0100 Subject: [PATCH 107/427] (X context) Fix CXX_BUILD and C89_BUILD --- gfx/drivers_context/x_ctx.c | 59 +++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 897f40b163..50a504abc2 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -45,21 +45,28 @@ #endif #ifdef HAVE_OPENGL -static int (*g_pglSwapInterval)(int); -static int (*g_pglSwapIntervalSGI)(int); -static void (*g_pglSwapIntervalEXT)(Display*, GLXDrawable, int); -static Bool (*glXGetSyncValuesOML)(Display *dpy, GLXDrawable drawable, - int64_t *ust, int64_t *msc, int64_t *sbc); -static Bool (*glXGetMscRateOML)(Display *dpy, GLXDrawable drawable, int32_t *numerator, - int32_t *denominator); -static int64_t (*glXSwapBuffersMscOML)(Display *dpy, GLXDrawable drawable, - int64_t target_msc, int64_t divisor, - int64_t remainder); -static Bool (*glXWaitForMscOML)(Display *dpy, GLXDrawable drawable, int64_t target_msc, - int64_t divisor, int64_t remainder, int64_t *ust, - int64_t *msc, int64_t *sbc); -static Bool (*glXWaitForSbcOML)(Display *dpy, GLXDrawable drawable, int64_t target_sbc, - int64_t *ust, int64_t *msc, int64_t *sbc); +static int (*g_pglSwapInterval)(int); +static int (*g_pglSwapIntervalSGI)(int); +static void (*g_pglSwapIntervalEXT)(Display*, GLXDrawable, int); +typedef Bool (*GLXGETSYNCVALUESOMLPROC)(Display *dpy, GLXDrawable drawable, + int64_t *ust, int64_t *msc, int64_t *sbc); +typedef Bool (*GLXGETMSCRATEOMLPROC)(Display *dpy, GLXDrawable drawable, int32_t *numerator, + int32_t *denominator); +typedef int64_t (*GLXSWAPBUFFERSMSCOMLPROC)(Display *dpy, GLXDrawable drawable, + int64_t target_msc, int64_t divisor, + int64_t remainder); +typedef Bool (*GLXWAITFORMSCOMLPROC)(Display *dpy, GLXDrawable drawable, int64_t target_msc, + int64_t divisor, int64_t remainder, int64_t *ust, + int64_t *msc, int64_t *sbc); +typedef Bool (*GLXWAITFORSBCOMLPROC)(Display *dpy, GLXDrawable drawable, int64_t target_sbc, + int64_t *ust, int64_t *msc, int64_t *sbc); + +static GLXGETSYNCVALUESOMLPROC glXGetSyncValuesOML; +static GLXGETMSCRATEOMLPROC glXGetMscRateOML; +static GLXSWAPBUFFERSMSCOMLPROC glXSwapBuffersMscOML; +static GLXWAITFORMSCOMLPROC glXWaitForMscOML; +static GLXWAITFORSBCOMLPROC glXWaitForSbcOML; + #endif typedef struct gfx_ctx_x_data @@ -93,17 +100,17 @@ typedef struct gfx_ctx_x_data #endif } gfx_ctx_x_data_t; -static bool x_enable_msaa = false; -static unsigned g_major = 0; -static unsigned g_minor = 0; -static enum gfx_ctx_api x_api = GFX_CTX_NONE; +static bool x_enable_msaa = false; +static unsigned g_major = 0; +static unsigned g_minor = 0; +static enum gfx_ctx_api x_api = GFX_CTX_NONE; + +static gfx_ctx_x_data_t *current_context_data = NULL; #ifdef HAVE_OPENGL static PFNGLXCREATECONTEXTATTRIBSARBPROC glx_create_context_attribs; #endif -static gfx_ctx_x_data_t *current_context_data = NULL; - static int GLXExtensionSupported(Display *dpy, const char *extension) { const char *extensionsString = glXQueryExtensionsString(dpy, DefaultScreen(dpy)); @@ -508,11 +515,11 @@ static void *gfx_ctx_x_init(video_frame_info_t video_info, void *data) x->swap_mode = 1; - glXGetSyncValuesOML = (void *)glXGetProcAddress((unsigned char *)"glXGetSyncValuesOML"); - glXGetMscRateOML = (void *)glXGetProcAddress((unsigned char *)"glXGetMscRateOML"); - glXSwapBuffersMscOML = (void *)glXGetProcAddress((unsigned char *)"glXSwapBuffersMscOML"); - glXWaitForMscOML = (void *)glXGetProcAddress((unsigned char *)"glXWaitForMscOML"); - glXWaitForSbcOML = (void *)glXGetProcAddress((unsigned char *)"glXWaitForSbcOML"); + glXGetSyncValuesOML = (GLXGETSYNCVALUESOMLPROC)glXGetProcAddress((unsigned char *)"glXGetSyncValuesOML"); + glXGetMscRateOML = (GLXGETMSCRATEOMLPROC)glXGetProcAddress((unsigned char *)"glXGetMscRateOML"); + glXSwapBuffersMscOML = (GLXSWAPBUFFERSMSCOMLPROC)glXGetProcAddress((unsigned char *)"glXSwapBuffersMscOML"); + glXWaitForMscOML = (GLXWAITFORMSCOMLPROC)glXGetProcAddress((unsigned char *)"glXWaitForMscOML"); + glXWaitForSbcOML = (GLXWAITFORSBCOMLPROC)glXGetProcAddress((unsigned char *)"glXWaitForSbcOML"); glXGetSyncValuesOML(g_x11_dpy, g_x11_win, &x->ust, &x->msc, &x->sbc); From fae7be1cecffbc13973f5bb04a8ee93f936665b9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 14:53:29 +0100 Subject: [PATCH 108/427] Make sure HAVE_MENU_COMMON is defined for XMB and MaterialUI --- Makefile.common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.common b/Makefile.common index b992d8222b..0b8123bbf8 100644 --- a/Makefile.common +++ b/Makefile.common @@ -28,6 +28,7 @@ endif ifeq ($(HAVE_MENU), 1) DEFINES += -DHAVE_MENU + HAVE_MENU_COMMON = 1 endif ifeq ($(HAVE_SOCKET_LEGACY), 1) @@ -498,6 +499,7 @@ ifeq ($(HAVE_RGUI), 1) ifeq ($(HAVE_MATERIALUI), 1) OBJ += menu/drivers/materialui.o DEFINES += -DHAVE_MATERIALUI + HAVE_MENU_COMMON = 1 endif ifeq ($(HAVE_NUKLEAR), 1) OBJ += menu/drivers/nuklear/nk_common.o @@ -516,6 +518,7 @@ endif ifeq ($(HAVE_XMB), 1) OBJ += menu/drivers/xmb.o DEFINES += -DHAVE_XMB + HAVE_MENU_COMMON = 1 endif endif From 3d4c6d836fac7f05f614e1cabaeaa32a14c9daf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 17 Jan 2017 01:29:58 +0100 Subject: [PATCH 109/427] Fix GLUI ON/OFF switch y position --- menu/drivers/materialui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 87d7b63f37..47f2373ca6 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -716,7 +716,7 @@ static void mui_render_label_value(mui_handle_t *mui, mui->icon_size, texture_switch, width - mui->margin - mui->icon_size, - y, + y - mui->icon_size/2.0 + mui->line_height/2.0, width, height, 0, From 08366d318e91281f9441bc2636fd771d395a4049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 17 Jan 2017 01:48:45 +0100 Subject: [PATCH 110/427] (MUI) Add mui_node_t to store the height of menu entries --- menu/drivers/materialui.c | 84 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 47f2373ca6..3f8554b919 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -60,6 +60,11 @@ #include "../../file_path_special.h" +typedef struct +{ + float height; +} mui_node_t; + enum { MUI_TEXTURE_POINTER = 0, @@ -131,6 +136,21 @@ typedef struct mui_handle float scroll_y; } mui_handle_t; +static mui_node_t *mui_node_allocate_userdata(mui_handle_t *mui, unsigned i) +{ + mui_node_t *node = (mui_node_t*)calloc(1, sizeof(mui_node_t)); + + if (!node) + { + RARCH_ERR("GLUI node could not be allocated.\n"); + return NULL; + } + + node->height = 32; + + return node; +} + static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha) { rgba[0] = rgba[4] = rgba[8] = rgba[12] = ((hex >> 16) & 0xFF) * (1.0f / 255.0f); /* r */ @@ -1862,6 +1882,66 @@ static int mui_pointer_tap(void *userdata, return 0; } +static void mui_list_insert(void *userdata, + file_list_t *list, + const char *path, + const char *fullpath, + const char *unused, + size_t list_size) +{ + size_t selection; + int current = 0; + int i = list_size; + mui_node_t *node = NULL; + mui_handle_t *mui = (mui_handle_t*)userdata; + + if (!mui || !list) + return; + if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection)) + return; + + node = (mui_node_t*)menu_entries_get_userdata_at_offset(list, i); + + if (!node) + node = (mui_node_t*)calloc(1, sizeof(mui_node_t)); + + if (!node) + { + RARCH_ERR("GLUI node could not be allocated.\n"); + return; + } + + node->height = 32; + + file_list_set_userdata(list, i, node); +} + +static void mui_list_clear(file_list_t *list) +{ + size_t i; + size_t size = list->size; + + for (i = 0; i < size; ++i) + { + menu_animation_ctx_subject_t subject; + float *subjects[1]; + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, i); + + if (!node) + continue; + + subjects[0] = &node->height; + + subject.count = 1; + subject.data = subjects; + + menu_animation_ctl(MENU_ANIMATION_CTL_KILL_BY_SUBJECT, &subject); + + file_list_free_userdata(list, i); + } +} + menu_ctx_driver_t menu_ctx_mui = { NULL, mui_get_message, @@ -1882,10 +1962,10 @@ menu_ctx_driver_t menu_ctx_mui = { mui_navigation_alphabet, mui_navigation_alphabet, generic_menu_init_list, + mui_list_insert, NULL, NULL, - NULL, - NULL, + mui_list_clear, mui_list_cache, mui_list_push, mui_list_get_selection, From dc4140a00bff07e3b714538ceb43dbdd37c30879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 17 Jan 2017 14:05:05 +0100 Subject: [PATCH 111/427] (GLUI) Word wrapping for sublabels --- libretro-common/include/string/stdstring.h | 2 + libretro-common/string/stdstring.c | 51 ++++++++ menu/drivers/materialui.c | 143 ++++++++++++++------- menu/drivers/xmb.c | 51 -------- 4 files changed, 152 insertions(+), 95 deletions(-) diff --git a/libretro-common/include/string/stdstring.h b/libretro-common/include/string/stdstring.h index 8faf2ba25c..78e860bd72 100644 --- a/libretro-common/include/string/stdstring.h +++ b/libretro-common/include/string/stdstring.h @@ -56,6 +56,8 @@ char *string_trim_whitespace_right(char *const s); /* Remove leading and trailing whitespaces */ char *string_trim_whitespace(char *const s); +char* word_wrap(char* buffer, char* string, int line_width); + RETRO_END_DECLS #endif diff --git a/libretro-common/string/stdstring.c b/libretro-common/string/stdstring.c index e0c630afdd..663bb35c1a 100644 --- a/libretro-common/string/stdstring.c +++ b/libretro-common/string/stdstring.c @@ -164,3 +164,54 @@ char *string_trim_whitespace(char *const s) return s; } + +char* word_wrap(char* buffer, char* string, int line_width) { + unsigned i = 0; + int k, counter; + + while(i < strlen(string)) + { + /* copy string until the end of the line is reached */ + for (counter = 1; counter <= line_width; counter++) + { + /* check if end of string reached */ + if (i == strlen(string)) + { + buffer[i] = 0; + return buffer; + } + + buffer[i] = string[i]; + + /* check for newlines embedded in the original input + * and reset the index */ + if (buffer[i] == '\n') + counter = 1; + i++; + } + /* check for whitespace */ + if (string[i] == ' ') + { + buffer[i] = '\n'; + i++; + } + else + { + /* check for nearest whitespace back in string */ + for (k = i; k > 0; k--) + { + if (string[k] == ' ') + { + buffer[k] = '\n'; + /* set string index back to character after this one */ + i = k + 1; + break; + } + } + } + } + + buffer[i] = 0; + + return buffer; +} \ No newline at end of file diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 3f8554b919..81d58fcd54 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -62,7 +62,8 @@ typedef struct { - float height; + float line_height; + float y; } mui_node_t; enum @@ -136,21 +137,6 @@ typedef struct mui_handle float scroll_y; } mui_handle_t; -static mui_node_t *mui_node_allocate_userdata(mui_handle_t *mui, unsigned i) -{ - mui_node_t *node = (mui_node_t*)calloc(1, sizeof(mui_node_t)); - - if (!node) - { - RARCH_ERR("GLUI node could not be allocated.\n"); - return NULL; - } - - node->height = 32; - - return node; -} - static void hex32_to_rgba_normalized(uint32_t hex, float* rgba, float alpha) { rgba[0] = rgba[4] = rgba[8] = rgba[12] = ((hex >> 16) & 0xFF) * (1.0f / 255.0f); /* r */ @@ -408,6 +394,20 @@ static void mui_draw_tab_end(mui_handle_t *mui, &active_tab_marker_color[0]); } +static float mui_content_height() +{ + file_list_t *list = menu_entries_get_selection_buf_ptr(0); + float sum = 0; + unsigned i = 0; + for (; i < menu_entries_get_end(); i++) + { + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, i); + sum += node->line_height; + } + return sum; +} + static void mui_draw_scrollbar(mui_handle_t *mui, unsigned width, unsigned height, float *coord_color) { @@ -420,7 +420,7 @@ static void mui_draw_scrollbar(mui_handle_t *mui, header_height = menu_display_get_header_height(); - content_height = menu_entries_get_end() * mui->line_height; + content_height = mui_content_height(); total_height = height - header_height - mui->tabs_height; scrollbar_margin = mui->scrollbar_width; scrollbar_height = total_height / (content_height / total_height); @@ -520,6 +520,43 @@ end: string_list_free(list); } +static unsigned count_lines(const char *str) +{ + unsigned c = 0; + unsigned lines = 1; + for (c = 0; str[c]; c++) + lines += (str[c] == '\n'); + return lines; +} + +static void compute_entries_box(mui_handle_t* mui, int width) +{ + size_t usable_width = width - (mui->margin * 2); + file_list_t *list = menu_entries_get_selection_buf_ptr(0); + float sum = 0; + unsigned i = 0; + + for (; i < menu_entries_get_end(); i++) + { + unsigned lines = 0; + char sublabel_str[255]; + sublabel_str[0] = '\0'; + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, i); + + if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) + { + word_wrap(sublabel_str, sublabel_str, (int)((usable_width/0.75) / mui->glyph_width)); + lines = count_lines(sublabel_str); + } + + float scale_factor = menu_display_get_dpi(); + node->line_height = (scale_factor / 3) + (lines * mui->font->size); + node->y = sum; + sum += node->line_height; + } +} + static void mui_render(void *data) { size_t i = 0; @@ -534,6 +571,8 @@ static void mui_render(void *data) video_driver_get_size(&width, &height); + compute_entries_box(mui, width); + menu_animation_ctl(MENU_ANIMATION_CTL_DELTA_TIME, &delta_time); delta.current = delta_time; @@ -578,23 +617,22 @@ static void mui_render(void *data) if (mui->scroll_y < 0) mui->scroll_y = 0; - bottom = menu_entries_get_end() * mui->line_height - - height + header_height + mui->tabs_height; + bottom = mui_content_height() - height + header_height + mui->tabs_height; if (mui->scroll_y > bottom) mui->scroll_y = bottom; - if (menu_entries_get_end() * mui->line_height + if (mui_content_height() < height - header_height - mui->tabs_height) mui->scroll_y = 0; - if (menu_entries_get_end() < height / mui->line_height) { } + /*if (menu_entries_get_end() < height / mui->line_height) { } else - i = mui->scroll_y / mui->line_height; + i = mui->scroll_y / mui->line_height;*/ menu_entries_ctl(MENU_ENTRIES_CTL_SET_START, &i); } -static void mui_render_label_value(mui_handle_t *mui, +static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, int i, int y, unsigned width, unsigned height, uint64_t index, uint32_t color, bool selected, const char *label, const char *value, float *label_color) @@ -646,19 +684,19 @@ static void mui_render_label_value(mui_handle_t *mui, menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); - label_offset = mui->font->size / 3; if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) { - label_offset = -mui->font->size / 3; + word_wrap(sublabel_str, sublabel_str, (int)((usable_width/0.75) / mui->glyph_width)); + menu_display_draw_text(mui->font2, sublabel_str, mui->margin, - y + mui->line_height / 2 + mui->font->size / 1, + y + (menu_display_get_dpi() / 4) + mui->font->size, width, height, sublabel_color, TEXT_ALIGN_LEFT, 1.0f, false, 0); } menu_display_draw_text(mui->font, label_str, mui->margin, - y + mui->line_height / 2 + label_offset, + y + (menu_display_get_dpi() / 5), width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0); if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_DISABLED)) || @@ -728,7 +766,7 @@ static void mui_render_label_value(mui_handle_t *mui, if (do_draw_text) menu_display_draw_text(mui->font, value_str, width - mui->margin, - y + mui->line_height / 2 + mui->font->size / 3, + y + node->line_height / 2 + mui->font->size / 3, width, height, color, TEXT_ALIGN_RIGHT, 1.0f, false, 0); if (texture_switch) @@ -736,7 +774,7 @@ static void mui_render_label_value(mui_handle_t *mui, mui->icon_size, texture_switch, width - mui->margin - mui->icon_size, - y - mui->icon_size/2.0 + mui->line_height/2.0, + y + node->line_height/2 - mui->icon_size/2, width, height, 0, @@ -754,7 +792,6 @@ static void mui_render_menu_list(mui_handle_t *mui, unsigned header_height; uint64_t *frame_count; size_t i = 0; - size_t end = menu_entries_get_end(); frame_count = video_driver_get_frame_count_ptr(); if (!menu_display_get_update_pending()) @@ -766,25 +803,31 @@ static void mui_render_menu_list(mui_handle_t *mui, mui->raster_block2.carr.coords.vertices = 0; menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i); + file_list_t *list = menu_entries_get_selection_buf_ptr(0); - for (; i < end; i++) + float sum = 0; + for (; i < menu_entries_get_end(); i++) { int y; size_t selection; char rich_label[255]; char entry_value[255]; bool entry_selected = false; + char sublabel_str[255]; + float scale_factor; + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, i); - rich_label[0] = entry_value[0] = '\0'; + rich_label[0] = entry_value[0] = sublabel_str[0] = '\0'; if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection)) continue; - y = header_height - mui->scroll_y + (mui->line_height * i); + y = header_height - mui->scroll_y + sum; - if ((y - (int)mui->line_height) > (int)height - || ((y + (int)mui->line_height) < 0)) - continue; + /*if ((y - (int)node->line_height) > (int)height + || ((y + (int)node->line_height) < 0)) + continue;*/ menu_entry_get_value(i, NULL, entry_value, sizeof(entry_value)); menu_entry_get_rich_label(i, rich_label, sizeof(rich_label)); @@ -793,6 +836,7 @@ static void mui_render_menu_list(mui_handle_t *mui, mui_render_label_value( mui, + node, i, y, width, @@ -804,6 +848,8 @@ static void mui_render_menu_list(mui_handle_t *mui, entry_value, menu_list_color ); + + sum += node->line_height; } } @@ -1210,11 +1256,15 @@ static void mui_frame(void *data) menu_display_set_alpha(blue_50, 1.0); /* highlighted entry */ + file_list_t *list = menu_entries_get_selection_buf_ptr(0); + mui_node_t *node = (mui_node_t*)menu_entries_get_userdata_at_offset( + list, selection); + menu_display_draw_quad( 0, - header_height - mui->scroll_y + mui->line_height *selection, + header_height - mui->scroll_y + node->y, width, - mui->line_height, + node->line_height, width, height, &highlighted_entry_color[0] @@ -1383,7 +1433,7 @@ static void mui_layout(mui_handle_t *mui) mui->shadow_height = scale_factor / 36; mui->scrollbar_width = scale_factor / 36; mui->tabs_height = scale_factor / 3; - mui->line_height = scale_factor / 2.5; + mui->line_height = scale_factor / 3; mui->margin = scale_factor / 9; mui->icon_size = scale_factor / 3; @@ -1509,7 +1559,7 @@ static float mui_get_scroll(mui_handle_t *mui) video_driver_get_size(&width, &height); if (mui->line_height) - half = (height / mui->line_height) / 2; + half = (height / mui->line_height) / 3; if (selection < half) return 0; @@ -1911,7 +1961,11 @@ static void mui_list_insert(void *userdata, return; } - node->height = 32; + float scale_factor; + scale_factor = menu_display_get_dpi(); + + node->line_height = scale_factor / 3; + node->y = 0; file_list_set_userdata(list, i, node); } @@ -1924,16 +1978,17 @@ static void mui_list_clear(file_list_t *list) for (i = 0; i < size; ++i) { menu_animation_ctx_subject_t subject; - float *subjects[1]; + float *subjects[2]; mui_node_t *node = (mui_node_t*) menu_entries_get_userdata_at_offset(list, i); if (!node) continue; - subjects[0] = &node->height; + subjects[0] = &node->line_height; + subjects[1] = &node->y; - subject.count = 1; + subject.count = 2; subject.data = subjects; menu_animation_ctl(MENU_ANIMATION_CTL_KILL_BY_SUBJECT, &subject); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index faa82f3e0d..08979428d8 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2042,57 +2042,6 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, return xmb->textures.list[XMB_TEXTURE_SUBSETTING]; } -char* word_wrap(char* buffer, char* string, int line_width) { - unsigned i = 0; - int k, counter; - - while(i < strlen(string)) - { - /* copy string until the end of the line is reached */ - for (counter = 1; counter <= line_width; counter++) - { - /* check if end of string reached */ - if (i == strlen(string)) - { - buffer[i] = 0; - return buffer; - } - - buffer[i] = string[i]; - - /* check for newlines embedded in the original input - * and reset the index */ - if (buffer[i] == '\n') - counter = 1; - i++; - } - /* check for whitespace */ - if (string[i] == ' ') - { - buffer[i] = '\n'; - i++; - } - else - { - /* check for nearest whitespace back in string */ - for (k = i; k > 0; k--) - { - if (string[k] == ' ') - { - buffer[k] = '\n'; - /* set string index back to character after this one */ - i = k + 1; - break; - } - } - } - } - - buffer[i] = 0; - - return buffer; -} - static void xmb_draw_items( menu_display_frame_info_t menu_disp_info, xmb_handle_t *xmb, From b0a51d79ee341a08640bd40a514f965550f6fa52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 17 Jan 2017 14:16:49 +0100 Subject: [PATCH 112/427] (GLUI) Improve word wrapping with a better estimation of the glyph width --- menu/drivers/materialui.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 81d58fcd54..e787505e96 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -98,6 +98,7 @@ typedef struct mui_handle unsigned icon_size; unsigned margin; unsigned glyph_width; + unsigned glyph_width2; char box_message[1024]; bool mouse_show; @@ -546,7 +547,7 @@ static void compute_entries_box(mui_handle_t* mui, int width) if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) { - word_wrap(sublabel_str, sublabel_str, (int)((usable_width/0.75) / mui->glyph_width)); + word_wrap(sublabel_str, sublabel_str, (int)(usable_width / mui->glyph_width2)); lines = count_lines(sublabel_str); } @@ -686,7 +687,7 @@ static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) { - word_wrap(sublabel_str, sublabel_str, (int)((usable_width/0.75) / mui->glyph_width)); + word_wrap(sublabel_str, sublabel_str, (int)(usable_width / mui->glyph_width2)); menu_display_draw_text(mui->font2, sublabel_str, mui->margin, @@ -1441,6 +1442,7 @@ static void mui_layout(mui_handle_t *mui) /* we assume the average glyph aspect ratio is close to 3:4 */ mui->glyph_width = new_font_size * 3/4; + mui->glyph_width2 = new_font_size2 * 3/4; mui->font = menu_display_font(APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT, new_font_size); @@ -1456,6 +1458,15 @@ static void mui_layout(mui_handle_t *mui) if (m_width) mui->glyph_width = m_width; } + + if (mui->font2) /* calculate a more realistic ticker_limit */ + { + unsigned m_width2 = + font_driver_get_message_width(mui->font2, "a", 1, 1); + + if (m_width2) + mui->glyph_width2 = m_width2; + } } static void *mui_init(void **userdata) From 617ce26efb812167c1a06791d726e6a14fe81577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 17 Jan 2017 15:21:30 +0100 Subject: [PATCH 113/427] (GLUI) Adapt mouse and touch code to the variable height menu entries --- menu/drivers/materialui.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index e787505e96..1f4417c7cc 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -566,6 +566,7 @@ static void mui_render(void *data) unsigned bottom, width, height, header_height; mui_handle_t *mui = (mui_handle_t*)data; settings_t *settings = config_get_ptr(); + file_list_t *list = menu_entries_get_selection_buf_ptr(0); if (!mui) return; @@ -590,12 +591,20 @@ static void mui_render(void *data) int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS); float old_accel_val = 0.0f; float new_accel_val = 0.0f; - unsigned new_pointer_val = - (pointer_y - mui->line_height + mui->scroll_y - 16) - / mui->line_height; + + size_t ii = 0; + for (ii = 0; ii < menu_entries_get_size(); ii++) + { + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, ii); + + if (pointer_y > (-mui->scroll_y + header_height + node->y) + && pointer_y < (-mui->scroll_y + header_height + node->y + node->line_height) + ) + menu_input_ctl(MENU_INPUT_CTL_POINTER_PTR, &ii); + } menu_input_ctl(MENU_INPUT_CTL_POINTER_ACCEL_READ, &old_accel_val); - menu_input_ctl(MENU_INPUT_CTL_POINTER_PTR, &new_pointer_val); mui->scroll_y -= old_accel_val / 60.0; @@ -608,11 +617,17 @@ static void mui_render(void *data) { int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS); - unsigned new_pointer_val = - (mouse_y - mui->line_height + mui->scroll_y - 16) - / mui->line_height; + size_t ii = 0; + for (ii = 0; ii < menu_entries_get_size(); ii++) + { + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, ii); - menu_input_ctl(MENU_INPUT_CTL_MOUSE_PTR, &new_pointer_val); + if (mouse_y > (-mui->scroll_y + header_height + node->y) + && mouse_y < (-mui->scroll_y + header_height + node->y + node->line_height) + ) + menu_input_ctl(MENU_INPUT_CTL_MOUSE_PTR, &ii); + } } if (mui->scroll_y < 0) From a3e13fde3253291055e34a37ce6e04d71742a151 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 15:35:51 +0100 Subject: [PATCH 114/427] Put this around HAVE_COMMAND ifdefs --- command.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command.c b/command.c index 5a419fd7da..528de34090 100644 --- a/command.c +++ b/command.c @@ -539,6 +539,7 @@ bool command_network_send(const char *cmd_) } +#ifdef HAVE_COMMAND static void command_network_poll(command_t *handle) { fd_set fds; @@ -577,6 +578,7 @@ static void command_network_poll(command_t *handle) } } #endif +#endif #ifdef HAVE_STDIN_CMD static bool command_stdin_init(command_t *handle) @@ -798,8 +800,10 @@ bool command_poll(command_t *handle) memset(handle->state, 0, sizeof(handle->state)); #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) +#ifdef HAVE_COMMAND command_network_poll(handle); #endif +#endif #ifdef HAVE_STDIN_CMD command_stdin_poll(handle); From c3f16de4d431d9021a4deab5ffc797e1c5dd0afb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 15:37:40 +0100 Subject: [PATCH 115/427] Use HAVE_COMMAND ifdef here --- retroarch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/retroarch.c b/retroarch.c index 9da45ef39e..9ac5853f21 100644 --- a/retroarch.c +++ b/retroarch.c @@ -727,10 +727,12 @@ static void retroarch_parse_input(int argc, char *argv[]) #if defined(HAVE_NETWORK_CMD) case RA_OPT_COMMAND: +#ifdef HAVE_COMMAND if (command_network_send((const char*)optarg)) exit(0); else retroarch_fail(1, "network_cmd_send()"); +#endif break; #endif From 8366278d45d78ff220d7de1e2eb7afd38c5ac27f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 15:39:14 +0100 Subject: [PATCH 116/427] More of where that came from --- command.c | 2 ++ menu/cbs/menu_cbs_ok.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/command.c b/command.c index 528de34090..3f846fed1e 100644 --- a/command.c +++ b/command.c @@ -834,8 +834,10 @@ bool command_set(command_handle_t *handle) bool command_free(command_t *handle) { #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) +#ifdef HAVE_COMMAND if (handle && handle->net_fd >= 0) socket_close(handle->net_fd); +#endif #endif free(handle); diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 944791e075..5ef8a5a052 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -97,12 +97,13 @@ unsigned rpl_entry_selection_ptr = 0; unsigned rdb_entry_start_game_selection_ptr = 0; size_t hack_shader_pass = 0; -#ifdef HAVE_NETWORKING /* HACK - we have to find some way to pass state inbetween * function pointer callback functions that don't necessarily * call each other. */ -char *core_buf; -size_t core_len; +char *core_buf = NULL; +size_t core_len = 0; + +#ifdef HAVE_NETWORKING #ifdef HAVE_LAKKA static char lakka_project[128]; From 2849e2aa7953c32b669bcf5d21e814a8ce08aea8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 15:46:36 +0100 Subject: [PATCH 117/427] Get rid of some more configuration.h includes --- frontend/drivers/platform_bsd.c | 4 ++-- frontend/drivers/platform_ctr.c | 1 - frontend/drivers/platform_linux.c | 1 - frontend/drivers/platform_wiiu.c | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/drivers/platform_bsd.c b/frontend/drivers/platform_bsd.c index 5653659327..28fdd5c9b2 100644 --- a/frontend/drivers/platform_bsd.c +++ b/frontend/drivers/platform_bsd.c @@ -14,13 +14,13 @@ * If not, see . */ -#include "../frontend_driver.h" - #include #include #include #include +#include "../frontend_driver.h" + static volatile sig_atomic_t bsd_sighandler_quit; static void frontend_bsd_sighandler(int sig) diff --git a/frontend/drivers/platform_ctr.c b/frontend/drivers/platform_ctr.c index ed804786a9..967d7860ba 100644 --- a/frontend/drivers/platform_ctr.c +++ b/frontend/drivers/platform_ctr.c @@ -32,7 +32,6 @@ #endif #include "../frontend_driver.h" -#include "../../configuration.h" #include "../../verbosity.h" #include "../../defaults.h" #include "../../paths.h" diff --git a/frontend/drivers/platform_linux.c b/frontend/drivers/platform_linux.c index 96ed71e0d2..02257e292e 100644 --- a/frontend/drivers/platform_linux.c +++ b/frontend/drivers/platform_linux.c @@ -54,7 +54,6 @@ #include "../frontend.h" #include "../frontend_driver.h" -#include "../../configuration.h" #include "../../defaults.h" #include "../../retroarch.h" #include "../../verbosity.h" diff --git a/frontend/drivers/platform_wiiu.c b/frontend/drivers/platform_wiiu.c index 29e903ca8b..10f4ccc161 100644 --- a/frontend/drivers/platform_wiiu.c +++ b/frontend/drivers/platform_wiiu.c @@ -25,7 +25,6 @@ #include "../frontend_driver.h" #include "../frontend.h" -#include "../../configuration.h" #include "../../verbosity.h" #include "../../defaults.h" #include "../../paths.h" From bfb124a60ed44abb7109de40af1d3fe02d5e17e6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 16:29:23 +0100 Subject: [PATCH 118/427] Create menu_animation_ticker --- menu/drivers/materialui.c | 8 ++-- menu/drivers/rgui.c | 6 +-- menu/drivers/xmb.c | 4 +- menu/drivers/zarch.c | 2 +- menu/menu_animation.c | 78 +++++++++++++++++++-------------------- menu/menu_animation.h | 3 +- 6 files changed, 51 insertions(+), 50 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 1f4417c7cc..83fd874245 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -692,13 +692,13 @@ static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, ticker.str = label; ticker.selected = selected; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); ticker.s = value_str; ticker.len = value_len; ticker.str = value; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) { @@ -1360,7 +1360,7 @@ static void mui_frame(void *data) ticker.str = title; ticker.selected = true; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); /* Title */ if (mui_get_core_title(title_msg, sizeof(title_msg)) == 0) @@ -1383,7 +1383,7 @@ static void mui_frame(void *data) ticker.str = title_buf_msg; ticker.selected = true; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); strlcpy(title_buf, title_buf_msg_tmp, sizeof(title_buf)); } diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 863bf8a5ad..cba92b0771 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -507,7 +507,7 @@ static void rgui_render(void *data) ticker.str = title; ticker.selected = true; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); hover_color = HOVER_COLOR(settings); normal_color = NORMAL_COLOR(settings); @@ -599,13 +599,13 @@ static void rgui_render(void *data) ticker.str = entry_path; ticker.selected = entry_selected; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); ticker.s = type_str_buf; ticker.len = entry_spacing; ticker.str = entry_value; - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); snprintf(message, sizeof(message), "%c %-*.*s %-*s", entry_selected ? '>' : ' ', diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 08979428d8..766be1e983 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2213,7 +2213,7 @@ static void xmb_draw_items( ticker.str = ticker_str; ticker.selected = (i == current); - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); label_offset = xmb->margins.label.top; if (i == current && width > 320 && height > 240 @@ -2244,7 +2244,7 @@ static void xmb_draw_items( ticker.str = entry_value; ticker.selected = (i == current); - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); if (do_draw_text) xmb_draw_text(menu_disp_info, xmb, value, diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 55b346c57e..1b19e0145c 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -350,7 +350,7 @@ static bool zarch_zui_list_item(zui_t *zui, struct zui_tabbed *tab, int x1, int ticker.str = label; ticker.selected = (bg == zui_bg_hilite || bg == zui_bg_pad_hilite); - menu_animation_ctl(MENU_ANIMATION_CTL_TICKER, &ticker); + menu_animation_ticker(&ticker); menu_display_push_quad(zui->width, zui->height, bg, x1, y1, x2, y2); zarch_zui_draw_text(zui, ZUI_FG_NORMAL, 12, y1 + 35, title_buf); diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 385aa98d47..ede7979eb7 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -519,6 +519,45 @@ bool menu_animation_update(float delta_time) return true; } +bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker) +{ + size_t str_len = utf8len(ticker->str); + size_t offset = 0; + + if ((size_t)str_len <= ticker->len) + { + utf8cpy(ticker->s, + PATH_MAX_LENGTH, + ticker->str, + ticker->len); + return true; + } + + if (!ticker->selected) + { + utf8cpy(ticker->s, PATH_MAX_LENGTH, ticker->str, ticker->len - 3); + strlcat(ticker->s, "...", PATH_MAX_LENGTH); + return true; + } + + if (str_len > ticker->len) + menu_animation_ticker_generic( + ticker->idx, + ticker->len, + &offset, + &str_len); + + utf8cpy( + ticker->s, + PATH_MAX_LENGTH, + utf8skip(ticker->str, offset), + str_len); + + animation_is_active = true; + + return true; +} + bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) { switch (state) @@ -629,45 +668,6 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) } } break; - case MENU_ANIMATION_CTL_TICKER: - { - menu_animation_ctx_ticker_t - *ticker = (menu_animation_ctx_ticker_t*)data; - size_t str_len = ticker ? utf8len(ticker->str) : 0; - size_t offset = 0; - - if ((size_t)str_len <= ticker->len) - { - utf8cpy(ticker->s, - PATH_MAX_LENGTH, - ticker->str, - ticker->len); - return true; - } - - if (!ticker->selected) - { - utf8cpy(ticker->s, PATH_MAX_LENGTH, ticker->str, ticker->len - 3); - strlcat(ticker->s, "...", PATH_MAX_LENGTH); - return true; - } - - if (str_len > ticker->len) - menu_animation_ticker_generic( - ticker->idx, - ticker->len, - &offset, - &str_len); - - utf8cpy( - ticker->s, - PATH_MAX_LENGTH, - utf8skip(ticker->str, offset), - str_len); - - animation_is_active = true; - } - break; case MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET: { menu_animation_ctx_delta_t *delta = diff --git a/menu/menu_animation.h b/menu/menu_animation.h index 631e569f8e..cd5db94f31 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -39,7 +39,6 @@ enum menu_animation_ctl_state MENU_ANIMATION_CTL_UPDATE_TIME, MENU_ANIMATION_CTL_KILL_BY_TAG, MENU_ANIMATION_CTL_KILL_BY_SUBJECT, - MENU_ANIMATION_CTL_TICKER, MENU_ANIMATION_CTL_PUSH, MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET }; @@ -128,6 +127,8 @@ typedef struct menu_animation_ctx_ticker bool menu_animation_update(float delta_time); +bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker); + bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data); RETRO_END_DECLS From df783daab9c89390730543ed637b7d2f6f27f617 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 16:37:03 +0100 Subject: [PATCH 119/427] Create menu_animation_get_ideal_delta_time --- menu/drivers/materialui.c | 2 +- menu/drivers/xmb.c | 2 +- menu/menu_animation.c | 17 ++++++++--------- menu/menu_animation.h | 5 +++-- menu/menu_event.c | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 83fd874245..05089e29ff 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -579,7 +579,7 @@ static void mui_render(void *data) delta.current = delta_time; - if (menu_animation_ctl(MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET, &delta)) + if (menu_animation_get_ideal_delta_time(&delta)) menu_animation_update(delta.ideal); menu_display_set_width(width); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 766be1e983..aad1a21397 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2337,7 +2337,7 @@ static void xmb_render(void *data) delta.current = delta_time; - if (menu_animation_ctl(MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET, &delta)) + if (menu_animation_get_ideal_delta_time(&delta)) menu_animation_update(delta.ideal); if (settings->menu.pointer.enable || settings->menu.mouse.enable) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index ede7979eb7..52d490ad01 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -558,6 +558,14 @@ bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker) return true; } +bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta) +{ + if (!delta) + return false; + delta->ideal = delta->current / IDEAL_DELTA_TIME; + return true; +} + bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) { switch (state) @@ -668,15 +676,6 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) } } break; - case MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET: - { - menu_animation_ctx_delta_t *delta = - (menu_animation_ctx_delta_t*)data; - if (!delta) - return false; - delta->ideal = delta->current / IDEAL_DELTA_TIME; - } - break; case MENU_ANIMATION_CTL_PUSH: return menu_animation_push(&anim, (menu_animation_ctx_entry_t *)data); case MENU_ANIMATION_CTL_NONE: diff --git a/menu/menu_animation.h b/menu/menu_animation.h index cd5db94f31..30be51063b 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -39,8 +39,7 @@ enum menu_animation_ctl_state MENU_ANIMATION_CTL_UPDATE_TIME, MENU_ANIMATION_CTL_KILL_BY_TAG, MENU_ANIMATION_CTL_KILL_BY_SUBJECT, - MENU_ANIMATION_CTL_PUSH, - MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET + MENU_ANIMATION_CTL_PUSH }; enum menu_animation_easing_type @@ -127,6 +126,8 @@ typedef struct menu_animation_ctx_ticker bool menu_animation_update(float delta_time); +bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta); + bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker); bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data); diff --git a/menu/menu_event.c b/menu/menu_event.c index f1ac44e807..dca641b310 100644 --- a/menu/menu_event.c +++ b/menu/menu_event.c @@ -182,7 +182,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input) delta.current = delta_time; - if (menu_animation_ctl(MENU_ANIMATION_CTL_IDEAL_DELTA_TIME_GET, &delta)) + if (menu_animation_get_ideal_delta_time(&delta)) delay_count += delta.ideal; if (menu_input_dialog_get_display_kb()) From 2273b1d05f69c0214ae8a00d3fdeb835344f6516 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 16:40:48 +0100 Subject: [PATCH 120/427] (menu_animation.c) Create more separate functions --- menu/menu_animation.c | 51 +++++++++++++++++++++++-------------------- menu/menu_animation.h | 6 +++-- menu/menu_display.c | 2 +- menu/menu_driver.c | 2 +- 4 files changed, 33 insertions(+), 28 deletions(-) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 52d490ad01..0ac7935d3e 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -566,6 +566,33 @@ bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta) return true; } +void menu_animation_update_time(void) +{ + static retro_time_t last_clock_update = 0; + settings_t *settings = config_get_ptr(); + + cur_time = cpu_features_get_time_usec(); + delta_time = cur_time - old_time; + + if (delta_time >= IDEAL_DELTA_TIME* 4) + delta_time = IDEAL_DELTA_TIME * 4; + if (delta_time <= IDEAL_DELTA_TIME / 4) + delta_time = IDEAL_DELTA_TIME / 4; + old_time = cur_time; + + if (((cur_time - last_clock_update) > 1000000) + && settings->menu.timedate_enable) + { + animation_is_active = true; + last_clock_update = cur_time; + } +} + +bool menu_animation_is_active(void) +{ + return animation_is_active; +} + bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) { switch (state) @@ -588,8 +615,6 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) old_time = 0; delta_time = 0.0f; break; - case MENU_ANIMATION_CTL_IS_ACTIVE: - return animation_is_active; case MENU_ANIMATION_CTL_CLEAR_ACTIVE: animation_is_active = false; break; @@ -604,28 +629,6 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) *ptr = delta_time; } break; - case MENU_ANIMATION_CTL_UPDATE_TIME: - { - static retro_time_t last_clock_update = 0; - settings_t *settings = config_get_ptr(); - - cur_time = cpu_features_get_time_usec(); - delta_time = cur_time - old_time; - - if (delta_time >= IDEAL_DELTA_TIME* 4) - delta_time = IDEAL_DELTA_TIME * 4; - if (delta_time <= IDEAL_DELTA_TIME / 4) - delta_time = IDEAL_DELTA_TIME / 4; - old_time = cur_time; - - if (((cur_time - last_clock_update) > 1000000) - && settings->menu.timedate_enable) - { - animation_is_active = true; - last_clock_update = cur_time; - } - } - break; case MENU_ANIMATION_CTL_KILL_BY_TAG: { unsigned i; diff --git a/menu/menu_animation.h b/menu/menu_animation.h index 30be51063b..ec57abace6 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -31,12 +31,10 @@ typedef void (*tween_cb) (void); enum menu_animation_ctl_state { MENU_ANIMATION_CTL_NONE = 0, - MENU_ANIMATION_CTL_IS_ACTIVE, MENU_ANIMATION_CTL_DEINIT, MENU_ANIMATION_CTL_CLEAR_ACTIVE, MENU_ANIMATION_CTL_SET_ACTIVE, MENU_ANIMATION_CTL_DELTA_TIME, - MENU_ANIMATION_CTL_UPDATE_TIME, MENU_ANIMATION_CTL_KILL_BY_TAG, MENU_ANIMATION_CTL_KILL_BY_SUBJECT, MENU_ANIMATION_CTL_PUSH @@ -130,6 +128,10 @@ bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta); bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker); +void menu_animation_update_time(void); + +bool menu_animation_is_active(void); + bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data); RETRO_END_DECLS diff --git a/menu/menu_display.c b/menu/menu_display.c index 6e45e1fbc7..6ed84a065b 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -390,7 +390,7 @@ void menu_display_set_font_data_init(bool state) bool menu_display_get_update_pending(void) { - if (menu_animation_ctl(MENU_ANIMATION_CTL_IS_ACTIVE, NULL)) + if (menu_animation_is_active()) return true; if (menu_display_get_framebuffer_dirty_flag()) return true; diff --git a/menu/menu_driver.c b/menu/menu_driver.c index bbc6d4d29d..3c14a13175 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -471,7 +471,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) if (BIT64_GET(menu_driver_data->state, MENU_STATE_BLIT)) { - menu_animation_ctl(MENU_ANIMATION_CTL_UPDATE_TIME, NULL); + menu_animation_update_time(); menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL); } From da044da3b4f2353ed6fb53847e0d87c372d2a10d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 16:53:06 +0100 Subject: [PATCH 121/427] Create menu_animation_push --- menu/drivers/materialui.c | 3 +- menu/drivers/xmb.c | 66 ++++++++++++------- menu/menu_animation.c | 130 +++++++++++++++++--------------------- menu/menu_animation.h | 5 +- 4 files changed, 108 insertions(+), 96 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 05089e29ff..2c0a585571 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1609,7 +1609,8 @@ static void mui_navigation_set(void *data, bool scroll) entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } static void mui_list_set_selection(void *data, file_list_t *list) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index aad1a21397..da8c4d1d60 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1123,21 +1123,25 @@ static void xmb_selection_pointer_changed( entry.tag = tag.id; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.subject = &node->label_alpha; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = iz; entry.subject = &node->zoom; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = iy; entry.subject = &node->y; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } } } @@ -1187,17 +1191,20 @@ static void xmb_list_open_old(xmb_handle_t *xmb, entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = 0; entry.subject = &node->label_alpha; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = xmb->icon.size * dir * -2; entry.subject = &node->x; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } } } @@ -1257,16 +1264,19 @@ static void xmb_list_open_new(xmb_handle_t *xmb, entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.subject = &node->label_alpha; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = 0; entry.subject = &node->x; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } } @@ -1320,16 +1330,19 @@ static void xmb_push_animations(xmb_node_t *node, float ia, float ix) entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.subject = &node->label_alpha; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = ix; entry.subject = &node->x; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } static void xmb_list_switch_old(xmb_handle_t *xmb, @@ -1505,12 +1518,14 @@ static void xmb_list_switch_horizontal_list(xmb_handle_t *xmb) entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = iz; entry.subject = &node->zoom; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } } @@ -1538,7 +1553,8 @@ static void xmb_list_switch(xmb_handle_t *xmb) entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); dir = -1; if (xmb->categories.selection_ptr > xmb->categories.selection_ptr_old) @@ -1584,7 +1600,8 @@ static void xmb_list_open_horizontal_list(xmb_handle_t *xmb) entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); } } @@ -1857,20 +1874,24 @@ static void xmb_list_open(xmb_handle_t *xmb) switch (xmb->depth) { case 1: - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = 0; entry.subject = &xmb->textures.arrow.alpha; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); break; case 2: - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); entry.target_value = 1; entry.subject = &xmb->textures.arrow.alpha; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); break; } @@ -3835,7 +3856,8 @@ static void xmb_toggle(void *userdata, bool menu_on) entry.tag = -1; entry.cb = NULL; - menu_animation_ctl(MENU_ANIMATION_CTL_PUSH, &entry); + if (entry.subject) + menu_animation_push(&entry); tmp = !menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL); diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 0ac7935d3e..1b0c400de6 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -311,153 +311,129 @@ static void menu_animation_ticker_generic(uint64_t idx, *width = max_width; } -static void menu_animation_push_internal(menu_animation_t *anim, - const struct tween *t) -{ - struct tween *target = NULL; - - if (anim->first_dead < anim->size && !anim->list[anim->first_dead].alive) - target = &anim->list[anim->first_dead++]; - else - { - if (anim->size >= anim->capacity) - { - anim->capacity++; - anim->list = (struct tween*)realloc(anim->list, - anim->capacity * sizeof(struct tween)); - } - - target = &anim->list[anim->size++]; - } - - *target = *t; -} - -static bool menu_animation_push(menu_animation_t *anim, menu_animation_ctx_entry_t *entry) +bool menu_animation_push(menu_animation_ctx_entry_t *entry) { struct tween t; + struct tween *target = NULL; - if (!entry || !entry->subject) - return false; - - t.alive = true; - t.duration = entry->duration; - t.running_since = 0; - t.initial_value = *entry->subject; - t.target_value = entry->target_value; - t.subject = entry->subject; - t.tag = entry->tag; - t.cb = entry->cb; - t.easing = NULL; + t.alive = true; + t.duration = entry->duration; + t.running_since = 0; + t.initial_value = *entry->subject; + t.target_value = entry->target_value; + t.subject = entry->subject; + t.tag = entry->tag; + t.cb = entry->cb; + t.easing = NULL; switch (entry->easing_enum) { case EASING_LINEAR: - t.easing = &easing_linear; + t.easing = &easing_linear; break; /* Quad */ case EASING_IN_QUAD: - t.easing = &easing_in_quad; + t.easing = &easing_in_quad; break; case EASING_OUT_QUAD: - t.easing = &easing_out_quad; + t.easing = &easing_out_quad; break; case EASING_IN_OUT_QUAD: - t.easing = &easing_in_out_quad; + t.easing = &easing_in_out_quad; break; case EASING_OUT_IN_QUAD: - t.easing = &easing_out_in_quad; + t.easing = &easing_out_in_quad; break; /* Cubic */ case EASING_IN_CUBIC: - t.easing = &easing_in_cubic; + t.easing = &easing_in_cubic; break; case EASING_OUT_CUBIC: - t.easing = &easing_out_cubic; + t.easing = &easing_out_cubic; break; case EASING_IN_OUT_CUBIC: - t.easing = &easing_in_out_cubic; + t.easing = &easing_in_out_cubic; break; case EASING_OUT_IN_CUBIC: - t.easing = &easing_out_in_cubic; + t.easing = &easing_out_in_cubic; break; /* Quart */ case EASING_IN_QUART: - t.easing = &easing_in_quart; + t.easing = &easing_in_quart; break; case EASING_OUT_QUART: - t.easing = &easing_out_quart; + t.easing = &easing_out_quart; break; case EASING_IN_OUT_QUART: - t.easing = &easing_in_out_quart; + t.easing = &easing_in_out_quart; break; case EASING_OUT_IN_QUART: - t.easing = &easing_out_in_quart; + t.easing = &easing_out_in_quart; break; /* Quint */ case EASING_IN_QUINT: - t.easing = &easing_in_quint; + t.easing = &easing_in_quint; break; case EASING_OUT_QUINT: - t.easing = &easing_out_quint; + t.easing = &easing_out_quint; break; case EASING_IN_OUT_QUINT: - t.easing = &easing_in_out_quint; + t.easing = &easing_in_out_quint; break; case EASING_OUT_IN_QUINT: - t.easing = &easing_out_in_quint; + t.easing = &easing_out_in_quint; break; /* Sine */ case EASING_IN_SINE: - t.easing = &easing_in_sine; + t.easing = &easing_in_sine; break; case EASING_OUT_SINE: - t.easing = &easing_out_sine; + t.easing = &easing_out_sine; break; case EASING_IN_OUT_SINE: - t.easing = &easing_in_out_sine; + t.easing = &easing_in_out_sine; break; case EASING_OUT_IN_SINE: - t.easing = &easing_out_in_sine; + t.easing = &easing_out_in_sine; break; /* Expo */ case EASING_IN_EXPO: - t.easing = &easing_in_expo; + t.easing = &easing_in_expo; break; case EASING_OUT_EXPO: - t.easing = &easing_out_expo; + t.easing = &easing_out_expo; break; case EASING_IN_OUT_EXPO: - t.easing = &easing_in_out_expo; + t.easing = &easing_in_out_expo; break; case EASING_OUT_IN_EXPO: - t.easing = &easing_out_in_expo; + t.easing = &easing_out_in_expo; break; /* Circ */ case EASING_IN_CIRC: - t.easing = &easing_in_circ; + t.easing = &easing_in_circ; break; case EASING_OUT_CIRC: - t.easing = &easing_out_circ; + t.easing = &easing_out_circ; break; case EASING_IN_OUT_CIRC: - t.easing = &easing_in_out_circ; + t.easing = &easing_in_out_circ; break; case EASING_OUT_IN_CIRC: - t.easing = &easing_out_in_circ; + t.easing = &easing_out_in_circ; break; /* Bounce */ case EASING_IN_BOUNCE: - t.easing = &easing_in_bounce; + t.easing = &easing_in_bounce; break; case EASING_OUT_BOUNCE: - t.easing = &easing_out_bounce; + t.easing = &easing_out_bounce; break; case EASING_IN_OUT_BOUNCE: - t.easing = &easing_in_out_bounce; + t.easing = &easing_in_out_bounce; break; case EASING_OUT_IN_BOUNCE: - t.easing = &easing_out_in_bounce; + t.easing = &easing_out_in_bounce; break; default: break; @@ -467,7 +443,21 @@ static bool menu_animation_push(menu_animation_t *anim, menu_animation_ctx_entry if (!t.easing || t.duration == 0 || t.initial_value == t.target_value) return false; - menu_animation_push_internal(anim, &t); + if (anim.first_dead < anim.size && !anim.list[anim.first_dead].alive) + target = &anim.list[anim.first_dead++]; + else + { + if (anim.size >= anim.capacity) + { + anim.capacity++; + anim.list = (struct tween*)realloc(anim.list, + anim.capacity * sizeof(struct tween)); + } + + target = &anim.list[anim.size++]; + } + + *target = t; return true; } @@ -679,8 +669,6 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) } } break; - case MENU_ANIMATION_CTL_PUSH: - return menu_animation_push(&anim, (menu_animation_ctx_entry_t *)data); case MENU_ANIMATION_CTL_NONE: default: break; diff --git a/menu/menu_animation.h b/menu/menu_animation.h index ec57abace6..a7a9dfd015 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -36,8 +36,7 @@ enum menu_animation_ctl_state MENU_ANIMATION_CTL_SET_ACTIVE, MENU_ANIMATION_CTL_DELTA_TIME, MENU_ANIMATION_CTL_KILL_BY_TAG, - MENU_ANIMATION_CTL_KILL_BY_SUBJECT, - MENU_ANIMATION_CTL_PUSH + MENU_ANIMATION_CTL_KILL_BY_SUBJECT }; enum menu_animation_easing_type @@ -132,6 +131,8 @@ void menu_animation_update_time(void); bool menu_animation_is_active(void); +bool menu_animation_push(menu_animation_ctx_entry_t *entry); + bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data); RETRO_END_DECLS From ec370d54b20a5b7f55d9228659a0e9e92fbbf9f7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 16:55:34 +0100 Subject: [PATCH 122/427] Cleanups --- menu/menu_animation.c | 14 +++++++------- menu/menu_animation.h | 2 +- menu/menu_driver.c | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 1b0c400de6..d504552e28 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -556,22 +556,22 @@ bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta) return true; } -void menu_animation_update_time(void) +void menu_animation_update_time(bool timedate_enable) { - static retro_time_t last_clock_update = 0; - settings_t *settings = config_get_ptr(); + static retro_time_t + last_clock_update = 0; cur_time = cpu_features_get_time_usec(); delta_time = cur_time - old_time; if (delta_time >= IDEAL_DELTA_TIME* 4) - delta_time = IDEAL_DELTA_TIME * 4; + delta_time = IDEAL_DELTA_TIME * 4; if (delta_time <= IDEAL_DELTA_TIME / 4) - delta_time = IDEAL_DELTA_TIME / 4; - old_time = cur_time; + delta_time = IDEAL_DELTA_TIME / 4; + old_time = cur_time; if (((cur_time - last_clock_update) > 1000000) - && settings->menu.timedate_enable) + && timedate_enable) { animation_is_active = true; last_clock_update = cur_time; diff --git a/menu/menu_animation.h b/menu/menu_animation.h index a7a9dfd015..c03eb1edda 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -127,7 +127,7 @@ bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta); bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker); -void menu_animation_update_time(void); +void menu_animation_update_time(bool timedate_enable); bool menu_animation_is_active(void); diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 3c14a13175..6bd0a55681 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -471,7 +471,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) if (BIT64_GET(menu_driver_data->state, MENU_STATE_BLIT)) { - menu_animation_update_time(); + settings_t *settings = config_get_ptr(); + menu_animation_update_time(settings->menu.timedate_enable); menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL); } From e04dc5ab2e2d83c9481ffa9048c6c64979c05c9f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 16:59:13 +0100 Subject: [PATCH 123/427] Cleanup --- audio/audio_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index e0a2f09d28..177c374ea7 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -456,11 +456,9 @@ static bool audio_driver_init_internal(bool audio_cb_inited) RARCH_WARN("Audio rate control was desired, but driver does not support needed features.\n"); } + /* If we start muted, stop the audio driver, so subsequent unmute works. */ if (!audio_cb_inited && audio_driver_active && settings->audio.mute_enable) - { - /* If we start muted, stop the audio driver, so subsequent unmute works. */ audio_driver_stop(); - } command_event(CMD_EVENT_DSP_FILTER_INIT, NULL); From 7f7b0e14e81c647285a81d651796a584302c445c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 17:12:53 +0100 Subject: [PATCH 124/427] Update diff.diff --- diff.diff | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/diff.diff b/diff.diff index 385e7a39dd..c6ba6a1e81 100644 --- a/diff.diff +++ b/diff.diff @@ -164,16 +164,3 @@ index fc6132d..6c81bcb 100644 } static bool gfx_ctx_wgl_set_video_mode(void *data, -diff --git a/menu/menu_event.c b/menu/menu_event.c -index cf14f68..f1ac44e 100644 ---- a/menu/menu_event.c -+++ b/menu/menu_event.c -@@ -102,7 +102,7 @@ void menu_event_kb_set(bool down, enum retro_key key) - unsigned i; - - for (i = 0; i < RETROK_LAST; i++) -- menu_event_kb_set_internal(i, (menu_event_kb_is_set(i) & 1) << 1); -+ menu_event_kb_set_internal(i, (menu_event_kb_is_set((enum retro_key)i) & 1) << 1); - } - else - menu_event_kb_set_internal(key, ((menu_event_kb_is_set(key) & 1) << 1) | down); From 0bd43bc8853a211a791caae75f058af0b3ccc36d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 17:13:42 +0100 Subject: [PATCH 125/427] update diff.diff --- diff.diff | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/diff.diff b/diff.diff index c6ba6a1e81..b40470ffea 100644 --- a/diff.diff +++ b/diff.diff @@ -13,12 +13,12 @@ index fc6132d..6c81bcb 100644 +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC)(HDC hdc, INT64 traget_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); +typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC hdc); + -+PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; -+PFNWGLGETSYNCVALUESOMLPROC wglGetSyncValuesOML; -+PFNWGLGETMSCRATEOMLPROC wglGetMscRateOML; -+PFNWGLSWAPBUFFERSMSCOMLPROC wglSwapBuffersMscOML; -+PFNWGLWAITFORMSCOMLPROC wglWaitForMscOML; -+PFNWGLWAITFORSBCOMLPROC wglWaitForSbcOML; ++static PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB; ++static PFNWGLGETSYNCVALUESOMLPROC wglGetSyncValuesOML; ++static PFNWGLGETMSCRATEOMLPROC wglGetMscRateOML; ++static PFNWGLSWAPBUFFERSMSCOMLPROC wglSwapBuffersMscOML; ++static PFNWGLWAITFORMSCOMLPROC wglWaitForMscOML; ++static PFNWGLWAITFORSBCOMLPROC wglWaitForSbcOML; + typedef HGLRC (APIENTRY *wglCreateContextAttribsProc)(HDC, HGLRC, const int*); static wglCreateContextAttribsProc pcreate_context; From 805c4c2d12f1ebb55897d855489be17407456f0b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 17:28:19 +0100 Subject: [PATCH 126/427] (android_ctx.c) Initialize these variables --- gfx/drivers_context/android_ctx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 43afdc2d59..ee672c8b95 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -232,7 +232,8 @@ static void android_gfx_ctx_get_video_size(void *data, static void android_gfx_ctx_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height, unsigned frame_count) { - unsigned new_width, new_height; + unsigned new_width = 0; + unsigned new_height = 0; android_ctx_data_t *and = (android_ctx_data_t*)data; (void)frame_count; From 848be8c5494b0eb30cc589d4281e598accc2f552 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 17:31:38 +0100 Subject: [PATCH 127/427] Add libvita2d rules --- Makefile.common | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile.common b/Makefile.common index 0b8123bbf8..2a79421308 100644 --- a/Makefile.common +++ b/Makefile.common @@ -43,6 +43,10 @@ ifeq ($(HAVE_LIBRETRODB), 1) DEFINES += -DHAVE_LIBRETRODB endif +ifeq ($(HAVE_VITA2D), 1) + DEFINES += -DHAVE_VITA2D +endif + ifeq ($(HAVE_FBO), 1) DEFINES += -DHAVE_FBO endif @@ -241,6 +245,7 @@ OBJ += frontend/frontend.o \ performance_counters.o \ verbosity.o + ifeq ($(HAVE_CC_RESAMPLER), 1) DEFINES += -DHAVE_CC_RESAMPLER OBJ += audio/drivers_resampler/cc_resampler.o @@ -594,6 +599,15 @@ ifeq ($(HAVE_THREAD_STORAGE), 1) DEFINES += -DHAVE_THREAD_STORAGE endif +ifeq ($(HAVE_VITA2D), 1) + OBJ += $(DEPS_DIR)/libvita2d/source/vita2d.o \ + $(DEPS_DIR)/libvita2d/source/vita2d_texture.o \ + $(DEPS_DIR)/libvita2d/source/vita2d_draw.o \ + $(DEPS_DIR)/libvita2d/source/utils.o + + OBJ += gfx/drivers/vita2d_gfx.o +endif + ifeq ($(HAVE_WAYLAND), 1) OBJ += gfx/drivers_context/wayland_ctx.o DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS) From 92489a3f1471608ff1d17157010374d2184252ee Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 17:33:10 +0100 Subject: [PATCH 128/427] Add CFLAGS for vita2d --- Makefile.common | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.common b/Makefile.common index 2a79421308..038e66c90d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -605,6 +605,7 @@ ifeq ($(HAVE_VITA2D), 1) $(DEPS_DIR)/libvita2d/source/vita2d_draw.o \ $(DEPS_DIR)/libvita2d/source/utils.o +CFLAGS += -I$(DEPS_DIR)/libvita2d/include OBJ += gfx/drivers/vita2d_gfx.o endif From a817a58f433ebdda91523763cf594d96dcfd77fd Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 17:46:31 +0100 Subject: [PATCH 129/427] Added translations for informations in german --- intl/msg_hash_de.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index f68ee51d4c..c9d1d411f3 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -141,15 +141,15 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_CURSOR_DIRECTORY, "Cursor-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_CURSOR_MANAGER, - "Cursormanager") + "Zeiger-Manager") MSG_HASH(MENU_ENUM_LABEL_VALUE_CUSTOM_RATIO, "Benutzerdefiniertes Verhältnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_DATABASE_MANAGER, - "Datenbankmanager") + "Datenbank-Manager") MSG_HASH(MENU_ENUM_LABEL_VALUE_DELETE_ENTRY, "Von der Playlist löschen") MSG_HASH(MENU_ENUM_LABEL_VALUE_FAVORITES, -"Lesezeichen") + "Lesezeichen") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, "") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, @@ -375,7 +375,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "Port für Netzwerk-Befehle") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_INFORMATION, - "Network Information") + "Netzwerkinformationen") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, "Network Gamepad") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, @@ -446,6 +446,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS, "Overlay-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAL60_ENABLE, "Verwende PAL60-Modus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY, + "Ãœbergeordnetes Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, "Pausiere, wenn das Menü aktiv ist") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, @@ -554,8 +556,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "Automatische Save States") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY, "Savestate-Verzeichnis") +MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG, + "Aktuelle Konfigurationen speichern") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG, - "Konfiguration speichern") + "Neue Konfigurationen speichern") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_STATE, "Savestate speichern") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS, From db5633202063c24b1bfca83cb032f33c25671056 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 17:48:43 +0100 Subject: [PATCH 130/427] Add Netplay translations for german --- intl/msg_hash_de.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index c9d1d411f3..c35d5335dc 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -347,13 +347,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CLIENT_SWAP_INPUT, /* TODO, Original stri MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DELAY_FRAMES, "Verzögere Netplay-Frames") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, - "Disconnect") + "Verbindung trennen") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE, "Aktiviere Netplay") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_CLIENT, - "Connect to Netplay host") + "Verbinde zu Netplay Host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST, - "Start hosting") + "Starte Host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS, /* TODO, Original string changed */ "IP-Addresse für Netplay") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_LAN_SCAN_SETTINGS, From 7de726c7f370429d7adef1fe82b5f3b8c01a17e5 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 17:49:21 +0100 Subject: [PATCH 131/427] Fixed typos --- intl/msg_hash_de.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index c35d5335dc..b9c45674a9 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -371,9 +371,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, "Netplay NAT Traversal") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE, - "Netzwerk-Befehle") + "Netzwerkbefehle") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, - "Port für Netzwerk-Befehle") + "Port für Netzwerkbefehle") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_INFORMATION, "Netzwerkinformationen") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, @@ -381,7 +381,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, "Network Remote Base Port") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS, - "Netzwerk-Einstellungen") + "Netzwerkeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO, "Nein") MSG_HASH(MENU_ENUM_LABEL_VALUE_NONE, From 7beecd37af40800ae72d5acd7ce9c8b198384309 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 17:56:49 +0100 Subject: [PATCH 132/427] Add platextra files for Vita --- Makefile.common | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.common b/Makefile.common index 038e66c90d..2e04b755ac 100644 --- a/Makefile.common +++ b/Makefile.common @@ -605,6 +605,14 @@ ifeq ($(HAVE_VITA2D), 1) $(DEPS_DIR)/libvita2d/source/vita2d_draw.o \ $(DEPS_DIR)/libvita2d/source/utils.o + OBJ += $(DEPS_DIR)/libvita2d/shader/compiled/clear_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/compiled/clear_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/compiled/color_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/compiled/color_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/compiled/texture_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/compiled/texture_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/compiled/texture_tint_f_gxp.o + CFLAGS += -I$(DEPS_DIR)/libvita2d/include OBJ += gfx/drivers/vita2d_gfx.o endif From 7026b63f78e455138742fd2a9016ef186c8714e2 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 17:56:53 +0100 Subject: [PATCH 133/427] Added some network and netplay translations --- intl/msg_hash_de.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index b9c45674a9..0c9873e9ea 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -342,6 +342,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NEAREST, "Nächster") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY, "Netplay") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, // TODO: What actually does this? The translation might be odd. + "Netplay Bildübetragungsrate prüfen") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CLIENT_SWAP_INPUT, /* TODO, Original string changed */ "Tausche Netplay-Eingabe") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DELAY_FRAMES, @@ -362,10 +364,16 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_MODE, "Aktiviere Netplay-Client") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME, "Benutzername") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, + "Server Passwort") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS, "Netplay settings") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, + "Server Passwort für Zuschauer") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATOR_MODE_ENABLE, "Aktiviere Netplay-Zuschauermodus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, // TODO: What is this actually? + "Zustandsloser Netplay-Modus") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, "TCP/UDP-Port für Netplay") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, @@ -906,6 +914,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, "Hoste eine Netplay Session oder trete einer bei.") +MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, + "Ändere die Netzwerkeinstellungen") MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, "Lade Add-Ons, Komponenten und Inhalte für RetroArch herunter.") MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, From 15853842f0a1930d8ec98f0084d44fd8b26d4067 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 18:01:29 +0100 Subject: [PATCH 134/427] Add more files --- Makefile.common | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile.common b/Makefile.common index 2e04b755ac..580c0003ef 100644 --- a/Makefile.common +++ b/Makefile.common @@ -436,7 +436,8 @@ endif ifeq ($(HAVE_NEON),1) OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \ - audio/drivers_resampler/cc_resampler_neon.o + audio/drivers_resampler/cc_resampler_neon.o \ + memory/neon/memcpy-neon.o # When compiled without this, tries to attempt to compile sinc lerp, # which will error out # @@ -613,8 +614,14 @@ ifeq ($(HAVE_VITA2D), 1) $(DEPS_DIR)/libvita2d/shader/compiled/texture_f_gxp.o \ $(DEPS_DIR)/libvita2d/shader/compiled/texture_tint_f_gxp.o -CFLAGS += -I$(DEPS_DIR)/libvita2d/include - OBJ += gfx/drivers/vita2d_gfx.o +ifeq ($(HAVE_MENU),1) + OBJ += menu/drivers_display/menu_display_vita2d.o +endif + + OBJ += gfx/drivers/vita2d_gfx.o \ + gfx/drivers_font/vita2d_font.o + + CFLAGS += -I$(DEPS_DIR)/libvita2d/include endif ifeq ($(HAVE_WAYLAND), 1) @@ -962,8 +969,7 @@ ifeq ($(HAVE_OMAP), 1) endif ifeq ($(HAVE_EXYNOS), 1) - OBJ += gfx/drivers/exynos_gfx.o \ - memory/neon/memcpy-neon.o + OBJ += gfx/drivers/exynos_gfx.o LIBS += $(DRM_LIBS) $(EXYNOS_LIBS) DEFINES += $(DRM_CFLAGS) $(EXYNOS_CFLAGS) HAVE_AND_WILL_USE_DRM = 1 From a30b34e86b0c87edaf987fa18020fd91a68e4990 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:02:15 +0100 Subject: [PATCH 135/427] Added missing netplay translations for german --- intl/msg_hash_de.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 0c9873e9ea..1663b33e09 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -359,7 +359,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS, /* TODO, Original string changed */ "IP-Addresse für Netplay") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_LAN_SCAN_SETTINGS, - "Scan local network") + "Durchsuche lokales Netzwerk") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_MODE, "Aktiviere Netplay-Client") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME, @@ -415,7 +415,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_ITEMS, "Keine Einträge.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_NETPLAY_HOSTS_FOUND, - "No netplay hosts found.") + "Kein Netplay Host gefunden.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "No networks found.") MSG_HASH(MENU_ENUM_LABEL_VALUE_NO_PERFORMANCE_COUNTERS, @@ -914,6 +914,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, "Hoste eine Netplay Session oder trete einer bei.") +MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_LAN_SCAN_SETTINGS, + "Suche und verbinde mit Netplay Hosts in deinem lokalen Netzwerk.") MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, "Ändere die Netzwerkeinstellungen") MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, From 7ad3bd3119fa1c90877aff428774ad275de81464 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:02:41 +0100 Subject: [PATCH 136/427] Updated .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 85b23f3d15..74d1108101 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,9 @@ menu/driverspzarch.c # Ctags /tags +# CLion +/cmake-build-debug/ + # Android /pkg/android/phoenix/obj/ /pkg/android/phoenix/assets/ From 706c9ce257b7f37d2281f84e0d248efd695a9215 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:03:55 +0100 Subject: [PATCH 137/427] Fixed typo --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 1663b33e09..cecfe90f9d 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -917,7 +917,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_LAN_SCAN_SETTINGS, "Suche und verbinde mit Netplay Hosts in deinem lokalen Netzwerk.") MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, - "Ändere die Netzwerkeinstellungen") + "Ändere die Netzwerkeinstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, "Lade Add-Ons, Komponenten und Inhalte für RetroArch herunter.") MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, From 63ef32c38cfe5e7638a3ff2dad4a2fccde064f22 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:04:21 +0100 Subject: [PATCH 138/427] Fixed typo --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index cecfe90f9d..abb5f2d18f 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -353,7 +353,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE, "Aktiviere Netplay") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_CLIENT, - "Verbinde zu Netplay Host") + "Verbinde zu einem Netplay Host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST, "Starte Host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS, /* TODO, Original string changed */ From a57e43b63a1ec8a4870e59ab25ad3d099f5b2c48 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:05:03 +0100 Subject: [PATCH 139/427] Renamed content to inhalt --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index abb5f2d18f..280ae3c055 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -499,7 +499,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RELEASE_YEAR, MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_SHA1, "SHA1") MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT, - "Starte Content") + "Starte Inhalt") MSG_HASH(MENU_ENUM_LABEL_VALUE_REBOOT, "Neustart") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, From 2f68f66b8b083941a01c6fb1f94f172c2a059ed0 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:08:05 +0100 Subject: [PATCH 140/427] Translated core info file updater --- intl/msg_hash_de.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 280ae3c055..9328625128 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -172,6 +172,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS, /* UPDATE/FIXME */ "Datenträger-Optionen") MSG_HASH(MENU_ENUM_LABEL_VALUE_DONT_CARE, "Mir egal") +MSG_HASH(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, + "Inhalt Downloader") MSG_HASH(MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_ENABLE, "Aktiviere DPI-Override") MSG_HASH(MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_VALUE, @@ -760,6 +762,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS, "Aktualisiere CG-Shader") MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, "Aktualisiere Cheats") +MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_CORE_INFO_FILES, + "Aktualisiere Core Info Dateien") MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_DATABASES, "Aktualisiere Datenbanken") MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS, From f7101083ac55a4a483c7fd0de27e01c58aec2afb Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Tue, 17 Jan 2017 18:11:12 +0100 Subject: [PATCH 141/427] Added german translations for load core menu --- intl/msg_hash_de.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 9328625128..b8a74f1e07 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -172,6 +172,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS, /* UPDATE/FIXME */ "Datenträger-Optionen") MSG_HASH(MENU_ENUM_LABEL_VALUE_DONT_CARE, "Mir egal") +MSG_HASH(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, + "Core herunterladen...") MSG_HASH(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, "Inhalt Downloader") MSG_HASH(MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_ENABLE, @@ -606,6 +608,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, "Sortiere Save States per Ordner") MSG_HASH(MENU_ENUM_LABEL_VALUE_STATUS, "Status") +MSG_HASH(MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD, + "Starte Remote-RetroPad") +MSG_HASH(MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, + "Starte Videoprozessor") MSG_HASH(MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "stdin-Befehle") MSG_HASH(MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, From 7931436f5b9d1e090f60a117ed97ccaa3fcdf8c0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 18:12:23 +0100 Subject: [PATCH 142/427] Apply xerpi diff --- audio/drivers/psp_audio.c | 1 + bootstrap/vita/sbrk.c | 3 +++ frontend/drivers/platform_psp.c | 8 ++++++++ gfx/common/vita2d_common.h | 2 ++ gfx/drivers/vita2d_gfx.c | 8 +++++++- gfx/drivers_font/vita2d_font.c | 3 +++ input/drivers/psp_input.c | 1 + input/drivers_joypad/psp_joypad.c | 10 ++++++++++ libretro-common/include/net/net_compat.h | 2 ++ libretro-common/net/net_socket.c | 1 + 10 files changed, 38 insertions(+), 1 deletion(-) diff --git a/audio/drivers/psp_audio.c b/audio/drivers/psp_audio.c index d3fa1f27d3..27ddec535b 100644 --- a/audio/drivers/psp_audio.c +++ b/audio/drivers/psp_audio.c @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef VITA #include diff --git a/bootstrap/vita/sbrk.c b/bootstrap/vita/sbrk.c index ee47f8def9..051cae86b7 100644 --- a/bootstrap/vita/sbrk.c +++ b/bootstrap/vita/sbrk.c @@ -1,6 +1,9 @@ #include #include #include "../../defines/psp_defines.h" +#include +#include + static int _newlib_heap_memblock; static unsigned _newlib_heap_size; static char *_newlib_heap_base, *_newlib_heap_end, *_newlib_heap_cur; diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 27979d3e06..47b2f709d8 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -18,10 +18,17 @@ #include #include +#include "retroarch.h" +#include "paths.h" + #ifdef HAVE_CONFIG_H #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #ifdef VITA #include #include @@ -38,6 +45,7 @@ #include #endif +#include #include #include #ifndef IS_SALAMANDER diff --git a/gfx/common/vita2d_common.h b/gfx/common/vita2d_common.h index 30a9e2f8ea..8d0153a427 100644 --- a/gfx/common/vita2d_common.h +++ b/gfx/common/vita2d_common.h @@ -21,9 +21,11 @@ #include #include +#include #include "../../defines/psp_defines.h" #include "../../driver.h" +#include "../video_driver.h" #include "../video_coord_array.h" typedef struct vita_menu_frame diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index d647b542ce..ed2804e37f 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -16,8 +16,12 @@ #include +#include +#include + #include #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -27,11 +31,13 @@ #include "../../menu/menu_driver.h" #endif -#include "../../defines/psp_defines.h" #include "../common/vita2d_common.h" #include "../../driver.h" #include "../../runloop.h" #include "../video_coord_array.h" +#include "../video_context_driver.h" + +#include "../../defines/psp_defines.h" extern void *memcpy_neon(void *dst, const void *src, size_t n); diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index 0069501abc..c02ebcb020 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -17,6 +17,9 @@ #include #include +#include + +#include "../common/vita2d_common.h" #include "../font_driver.h" diff --git a/input/drivers/psp_input.c b/input/drivers/psp_input.c index f6e0bef4d3..9658a5b7e2 100644 --- a/input/drivers/psp_input.c +++ b/input/drivers/psp_input.c @@ -33,6 +33,7 @@ #include #include +#include #ifdef HAVE_KERNEL_PRX #include "../../bootstrap/psp1/kernel_functions.h" diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index c904b0b020..d48ede2a1e 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -15,13 +15,23 @@ */ #include +#include + +#include #include "../../tasks/tasks_internal.h" #include "../../configuration.h" +#include "../../defines/psp_defines.h" + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #if defined(VITA) #include +#include #include #define PSP_MAX_PADS 4 static int psp2_model; diff --git a/libretro-common/include/net/net_compat.h b/libretro-common/include/net/net_compat.h index 76c9c51df2..32d73aa241 100644 --- a/libretro-common/include/net/net_compat.h +++ b/libretro-common/include/net/net_compat.h @@ -101,6 +101,8 @@ struct hostent char *h_addr; }; +struct SceNetInAddr inet_aton(const char *ip_addr); + #else #include #include diff --git a/libretro-common/net/net_socket.c b/libretro-common/net/net_socket.c index 6d0cfdf700..73c697335a 100644 --- a/libretro-common/net/net_socket.c +++ b/libretro-common/net/net_socket.c @@ -142,6 +142,7 @@ int socket_select(int nfds, fd_set *readfs, fd_set *writefds, #if defined(__CELLOS_LV2__) return socketselect(nfds, readfs, writefds, errorfds, timeout); #elif defined(VITA) + extern int retro_epoll_fd; SceNetEpollEvent ev = {0}; ev.events = SCE_NET_EPOLLIN | SCE_NET_EPOLLHUP; From 4743230b09b392388bf2eeeb71d8176514fb2ddc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 18:15:11 +0100 Subject: [PATCH 143/427] Some header includes shouldn't be system includes --- gfx/drivers/vita2d_gfx.c | 4 ++-- gfx/drivers_font/vita2d_font.c | 2 +- input/drivers_joypad/psp_joypad.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index ed2804e37f..6d01afac36 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -16,8 +16,6 @@ #include -#include -#include #include #include @@ -36,6 +34,8 @@ #include "../../runloop.h" #include "../video_coord_array.h" #include "../video_context_driver.h" +#include "../../verbosity.h" +#include "../../configuration.h" #include "../../defines/psp_defines.h" diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index c02ebcb020..32c3511ebb 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -17,13 +17,13 @@ #include #include -#include #include "../common/vita2d_common.h" #include "../font_driver.h" #include "../../configuration.h" +#include "../../verbosity.h" typedef struct { diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index d48ede2a1e..282600f218 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -17,7 +17,7 @@ #include #include -#include +#include "../input_config.h" #include "../../tasks/tasks_internal.h" From 49515f020898094c0c7bfc65968544bd0e562508 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 18:19:36 +0100 Subject: [PATCH 144/427] Add Makefile.vita --- Makefile.vita | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 Makefile.vita diff --git a/Makefile.vita b/Makefile.vita new file mode 100644 index 0000000000..860a915fb5 --- /dev/null +++ b/Makefile.vita @@ -0,0 +1,189 @@ +TARGET := retroarch_vita +DEBUG = 0 +GRIFFIN_BUILD = 0 +WHOLE_ARCHIVE_LINK = 0 + +VITA_TITLE_ID := RETROARCH +VITA_TITLE_NAME := RetroArch + +PC_DEVELOPMENT_IP_ADDRESS = +PC_DEVELOPMENT_TCP_PORT = + +OBJ := + +DEFINES := + +ifeq ($(GRIFFIN_BUILD), 1) + OBJ += griffin/griffin.o + DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB + DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER +else + + HAVE_NEON := 1 + HAVE_FILTERS_BUILTIN := 1 + HAVE_LANGEXTRA := 1 + HAVE_RPNG := 1 + HAVE_RJPEG := 1 + HAVE_RBMP := 1 + HAVE_RTGA := 1 + HAVE_ZLIB := 1 + HAVE_7ZIP := 1 + HAVE_VITA2D := 1 + HAVE_NETWORKING := 1 + HAVE_SOCKET_LEGACY := 1 + HAVE_OVERLAY := 1 + HAVE_MENU := 1 + HAVE_MATERIALUI := 1 + HAVE_XMB := 1 + HAVE_STB_FONT := 1 + HAVE_THREADS := 1 + HAVE_LIBRETRODB := 1 + RARCH_CONSOLE := 1 + + include Makefile.common + BLACKLIST := + BLACKLIST += input/input_overlay.o + BLACKLIST += tasks/task_overlay.o + OBJ := $(filter-out $(BLACKLIST),$(OBJ)) + + OBJ += input/drivers/psp_input.o + OBJ += input/drivers_joypad/psp_joypad.o + OBJ += audio/drivers/psp_audio.o + OBJ += frontend/drivers/platform_psp.o + OBJ += gfx/video_filters/2xsai.o + OBJ += gfx/video_filters/super2xsai.o + OBJ += gfx/video_filters/supereagle.o + OBJ += gfx/video_filters/2xbr.o + OBJ += gfx/video_filters/darken.o + OBJ += gfx/video_filters/epx.o + OBJ += gfx/video_filters/scale2x.o + OBJ += gfx/video_filters/blargg_ntsc_snes.o + OBJ += gfx/video_filters/lq2x.o + OBJ += gfx/video_filters/phosphor2x.o + OBJ += libretro-common/audio/dsp_filters/echo.o + OBJ += libretro-common/audio/dsp_filters/eq.o + OBJ += libretro-common/audio/dsp_filters/chorus.o + OBJ += libretro-common/audio/dsp_filters/iir.o + OBJ += libretro-common/audio/dsp_filters/panning.o + OBJ += libretro-common/audio/dsp_filters/phaser.o + OBJ += libretro-common/audio/dsp_filters/reverb.o + OBJ += libretro-common/audio/dsp_filters/wahwah.o +endif + + +ifeq ($(strip $(VITASDK)),) +$(error "Please set VITASDK in your environment. export VITASDK=vitasdk") +endif + +export PATH := $(PATH):$(VITASDK)/bin + +PREFIX := arm-vita-eabi- + +CC := $(PREFIX)gcc +CXX := $(PREFIX)g++ +AS := $(PREFIX)as +AR := $(PREFIX)ar +OBJCOPY := $(PREFIX)objcopy +STRIP := $(PREFIX)strip +NM := $(PREFIX)nm +LD := $(CXX) + +INCDIRS := -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include +LIBDIRS := -L. + +ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA +CFLAGS += $(ARCHFLAGS) -Wl,-q -mword-relocations -fno-optimize-sibling-calls + +ifeq ($(DEBUG), 1) + CFLAGS += -O0 -g +else + CFLAGS += -O3 +endif +LDFLAGS := $(CFLAGS) + +ASFLAGS := $(CFLAGS) + +CFLAGS += -Wall -ffast-math +CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE +CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES) + +ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),) + CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"' +endif + +ifneq ($(PC_DEVELOPMENT_TCP_PORT),) + CFLAGS += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT) +endif + +ifeq ($(WHOLE_ARCHIVE_LINK), 1) + WHOLE_START := -Wl,--whole-archive + WHOLE_END := -Wl,--no-whole-archive +endif +CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions + +VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub \ + -lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceAudio_stub \ + -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \ + -lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz + +LIBS := $(WHOLE_START) -lretro_vita $(WHOLE_END) $(VITA_LIBS) -lm -lc + +TARGETS := $(TARGET).vpk + +DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend +POSTCOMPILE = mv -f $*.Tdepend $*.depend + + +all: $(TARGETS) + +%.o: %.cpp +%.o: %.cpp %.depend + $(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS) + $(POSTCOMPILE) + +%.o: %.c +%.o: %.c %.depend + $(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS) + $(POSTCOMPILE) + + +%.o: %.S +%.o: %.S %.depend + $(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) + $(POSTCOMPILE) + +%.o: %.s +%.o: %.s %.depend + $(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS) + $(POSTCOMPILE) + +%.depend: ; + +$(TARGET).elf: $(OBJ) libretro_vita.a + $(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ + +%.velf: %.elf + vita-elf-create $< $@ + +%.self: %.velf + vita-make-fself -c -s $< $@ + +%.vpk: %.self + vita-mksfoex -s TITLE_ID=$(VITA_TITLE_ID) "$(VITA_TITLE_NAME)" param.sfo + vita-pack-vpk -s param.sfo -b $< $@ + +clean: + rm -f $(OBJ) $(TARGET).elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk + rm -f $(OBJ:.o=.depend) + +# Useful for developers +vpksend: $(TARGET).vpk + curl -T $< ftp://$(PSVITAIP):1337/ux0:/ + +send: $(TARGET).self + curl -T $< ftp://$(PSVITAIP):1337/ux0:/app/$(VITA_TITLE_ID)/eboot.bin + +.PHONY: clean all send vpksend +.PRECIOUS: %.depend + +-include $(OBJ:.o=.depend) From d9c62e5e605c8cb21ba84e6c4f5cf72b7541a8b4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 18:24:34 +0100 Subject: [PATCH 145/427] Fix C89_BUILD --- intl/msg_hash_de.h | 4 ++-- menu/drivers/materialui.c | 32 +++++++++++++++++++------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index b8a74f1e07..865ac62e12 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -346,7 +346,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NEAREST, "Nächster") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY, "Netplay") -MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, // TODO: What actually does this? The translation might be odd. +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, /* TODO: What actually does this? The translation might be odd. */ "Netplay Bildübetragungsrate prüfen") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CLIENT_SWAP_INPUT, /* TODO, Original string changed */ "Tausche Netplay-Eingabe") @@ -376,7 +376,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "Server Passwort für Zuschauer") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATOR_MODE_ENABLE, "Aktiviere Netplay-Zuschauermodus") -MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, // TODO: What is this actually? +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, /* TODO: What is this actually? */ "Zustandsloser Netplay-Modus") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, "TCP/UDP-Port für Netplay") diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 2c0a585571..00fd2138c6 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -539,22 +539,24 @@ static void compute_entries_box(mui_handle_t* mui, int width) for (; i < menu_entries_get_end(); i++) { - unsigned lines = 0; char sublabel_str[255]; - sublabel_str[0] = '\0'; + float scale_factor; + unsigned lines = 0; mui_node_t *node = (mui_node_t*) menu_entries_get_userdata_at_offset(list, i); + sublabel_str[0] = '\0'; + if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) { word_wrap(sublabel_str, sublabel_str, (int)(usable_width / mui->glyph_width2)); lines = count_lines(sublabel_str); } - float scale_factor = menu_display_get_dpi(); - node->line_height = (scale_factor / 3) + (lines * mui->font->size); - node->y = sum; - sum += node->line_height; + scale_factor = menu_display_get_dpi(); + node->line_height = (scale_factor / 3) + (lines * mui->font->size); + node->y = sum; + sum += node->line_height; } } @@ -805,9 +807,11 @@ static void mui_render_menu_list(mui_handle_t *mui, uint32_t font_hover_color, float *menu_list_color) { - unsigned header_height; - uint64_t *frame_count; + float sum = 0; + unsigned header_height = 0; size_t i = 0; + uint64_t *frame_count = NULL; + file_list_t *list = NULL; frame_count = video_driver_get_frame_count_ptr(); if (!menu_display_get_update_pending()) @@ -819,9 +823,9 @@ static void mui_render_menu_list(mui_handle_t *mui, mui->raster_block2.carr.coords.vertices = 0; menu_entries_ctl(MENU_ENTRIES_CTL_START_GET, &i); - file_list_t *list = menu_entries_get_selection_buf_ptr(0); - float sum = 0; + list = menu_entries_get_selection_buf_ptr(0); + for (; i < menu_entries_get_end(); i++) { int y; @@ -1025,6 +1029,8 @@ static void mui_frame(void *data) float color_nv_accent[16] = {0}; float footer_bg_color_real[16] = {0}; float header_bg_color_real[16] = {0}; + file_list_t *list = NULL; + mui_node_t *node = NULL; unsigned width = 0; unsigned height = 0; unsigned ticker_limit = 0; @@ -1272,8 +1278,8 @@ static void mui_frame(void *data) menu_display_set_alpha(blue_50, 1.0); /* highlighted entry */ - file_list_t *list = menu_entries_get_selection_buf_ptr(0); - mui_node_t *node = (mui_node_t*)menu_entries_get_userdata_at_offset( + list = menu_entries_get_selection_buf_ptr(0); + node = (mui_node_t*)menu_entries_get_userdata_at_offset( list, selection); menu_display_draw_quad( @@ -1967,6 +1973,7 @@ static void mui_list_insert(void *userdata, size_t list_size) { size_t selection; + float scale_factor; int current = 0; int i = list_size; mui_node_t *node = NULL; @@ -1988,7 +1995,6 @@ static void mui_list_insert(void *userdata, return; } - float scale_factor; scale_factor = menu_display_get_dpi(); node->line_height = scale_factor / 3; From fa0aaf54f7e81a487f6061936581d0fd0020fa3e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 18:55:59 +0100 Subject: [PATCH 146/427] (PSP) update --- frontend/drivers/platform_psp.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 47b2f709d8..887a15e440 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -18,17 +18,10 @@ #include #include -#include "retroarch.h" -#include "paths.h" - #ifdef HAVE_CONFIG_H #include "../../config.h" #endif -#ifdef HAVE_MENU -#include "../../menu/menu_driver.h" -#endif - #ifdef VITA #include #include @@ -52,10 +45,16 @@ #include #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../frontend_driver.h" #include "../../defaults.h" #include "../../file_path_special.h" #include "../../defines/psp_defines.h" +#include "../../retroarch.h" +#include "../../paths.h" #include "../../verbosity.h" #if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) From ebcf42ceb7848d203e4b19f1972e595e5e916c70 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Tue, 17 Jan 2017 18:47:45 +0100 Subject: [PATCH 147/427] Remove unused variables --- menu/drivers/materialui.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 00fd2138c6..920f317752 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -668,7 +668,6 @@ static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, char sublabel_str[255]; char value_str[255]; uint32_t sublabel_color; - float label_offset = 0; bool switch_is_on = true; int value_len = utf8len(value); int ticker_limit = 0; @@ -834,7 +833,6 @@ static void mui_render_menu_list(mui_handle_t *mui, char entry_value[255]; bool entry_selected = false; char sublabel_str[255]; - float scale_factor; mui_node_t *node = (mui_node_t*) menu_entries_get_userdata_at_offset(list, i); @@ -1974,7 +1972,6 @@ static void mui_list_insert(void *userdata, { size_t selection; float scale_factor; - int current = 0; int i = list_size; mui_node_t *node = NULL; mui_handle_t *mui = (mui_handle_t*)userdata; From 0354ced675e5b12e0c6fac77cd68d11e5a4beed7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:02:41 +0100 Subject: [PATCH 148/427] Style nits --- gfx/drivers/sunxi_gfx.c | 8 +++++--- gfx/drivers_shader/shader_glsl.c | 12 ++++++++---- gfx/drivers_shader/shader_vulkan.cpp | 3 ++- input/drivers/qnx_input.c | 29 ++++++++++++++-------------- input/drivers_hid/iohidmanager_hid.c | 21 +++++++++++--------- input/drivers_joypad/mfi_joypad.m | 13 ++++++++----- input/drivers_joypad/psp_joypad.c | 23 ++++++++++++++-------- 7 files changed, 64 insertions(+), 45 deletions(-) diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index 7b426e484a..da03c23332 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -923,9 +923,11 @@ static void sunxi_set_texture_frame(void *data, const void *frame, bool rgb32, static void sunxi_set_aspect_ratio (void *data, unsigned aspect_ratio_idx) { struct sunxi_video *_dispvars = (struct sunxi_video*)data; - /* Here we obtain the new aspect ratio. */ - float new_aspect = aspectratio_lut[aspect_ratio_idx].value; - if (new_aspect != _dispvars->aspect_ratio) { + float new_aspect = aspectratio_lut[aspect_ratio_idx].value; + + if (new_aspect != _dispvars->aspect_ratio) + { + /* Here we set the new aspect ratio. */ _dispvars->aspect_ratio = new_aspect; sunxi_setup_scale(_dispvars, _dispvars->src_width, _dispvars->src_height, _dispvars->src_pitch); } diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index cec9055b99..62d04e485c 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -1367,12 +1367,16 @@ static bool gl_glsl_set_mvp(void *data, void *shader_data, const math_matrix_4x4 goto fallback; loc = glsl->uniforms[glsl->active_idx].mvp; - if (loc >= 0) { - if (current_idx != glsl->active_idx || mat->data != current_mat_data_pointer[glsl->active_idx] || *mat->data != current_mat_data[glsl->active_idx]) { + if (loc >= 0) + { + if ( (current_idx != glsl->active_idx) || + (mat->data != current_mat_data_pointer[glsl->active_idx]) || + (*mat->data != current_mat_data[glsl->active_idx])) + { glUniformMatrix4fv(loc, 1, GL_FALSE, mat->data); - current_idx = glsl->active_idx; + current_idx = glsl->active_idx; current_mat_data_pointer[glsl->active_idx] = (float*)mat->data; - current_mat_data[glsl->active_idx] = *mat->data; + current_mat_data[glsl->active_idx] = *mat->data; } } return true; diff --git a/gfx/drivers_shader/shader_vulkan.cpp b/gfx/drivers_shader/shader_vulkan.cpp index 50a80223bf..f5d8b5dad5 100644 --- a/gfx/drivers_shader/shader_vulkan.cpp +++ b/gfx/drivers_shader/shader_vulkan.cpp @@ -2902,7 +2902,8 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset( } auto itr = find_if(shader->parameters, shader->parameters + shader->num_parameters, - [&](const video_shader_parameter ¶m) { + [&](const video_shader_parameter ¶m) + { return meta_param.id == param.id; }); diff --git a/input/drivers/qnx_input.c b/input/drivers/qnx_input.c index 20277b5517..2d90df2c6e 100644 --- a/input/drivers/qnx_input.c +++ b/input/drivers/qnx_input.c @@ -590,16 +590,17 @@ static void qnx_handle_navigator_event( switch (bps_event_get_code(event)) { case NAVIGATOR_SYSKEY_PRESS: - switch(navigator_event_get_syskey_key(event)) { - case NAVIGATOR_SYSKEY_BACK: - input_keyboard_event(true, RETROK_BACKSPACE, 0, 0, RETRO_DEVICE_KEYBOARD); - input_keyboard_event(false, RETROK_BACKSPACE, 0, 0, RETRO_DEVICE_KEYBOARD); - break; - case NAVIGATOR_SYSKEY_SEND: - case NAVIGATOR_SYSKEY_END: - break; - default: - break; + switch(navigator_event_get_syskey_key(event)) + { + case NAVIGATOR_SYSKEY_BACK: + input_keyboard_event(true, RETROK_BACKSPACE, 0, 0, RETRO_DEVICE_KEYBOARD); + input_keyboard_event(false, RETROK_BACKSPACE, 0, 0, RETRO_DEVICE_KEYBOARD); + break; + case NAVIGATOR_SYSKEY_SEND: + case NAVIGATOR_SYSKEY_END: + break; + default: + break; } break; case NAVIGATOR_SWIPE_DOWN: @@ -612,21 +613,19 @@ static void qnx_handle_navigator_event( case NAVIGATOR_WINDOW_INVISIBLE: while(true) { + unsigned event_code; + /* Block until we get a resume or exit event. */ bps_get_event(&event_pause, -1); - unsigned event_code = bps_event_get_code(event_pause); + event_code = bps_event_get_code(event_pause); if(event_code == NAVIGATOR_WINDOW_STATE) { if(navigator_event_get_window_state(event_pause) == NAVIGATOR_WINDOW_FULLSCREEN) - { break; - } } else if(event_code == NAVIGATOR_EXIT) - { goto shutdown; - } } break; case NAVIGATOR_WINDOW_FULLSCREEN: diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index 50c7559c7f..d071978b53 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -82,9 +82,11 @@ CFComparisonResult iohidmanager_sort_elements(const void *val1, const void *val2 static bool iohidmanager_check_for_id(apple_input_rec_t *rec, uint32_t id) { - while(rec) { - if(rec->id == id) return true; - rec = rec->next; + while(rec) + { + if(rec->id == id) + return true; + rec = rec->next; } return false; } @@ -133,20 +135,21 @@ static bool iohidmanager_hid_joypad_button(void *data, /* Check hat. */ if (hat_dir) { - if(h >= 1) { + if(h >= 1) return false; - } + switch(hat_dir) { - case HAT_LEFT_MASK: + case HAT_LEFT_MASK: return hid->hats[port][0] < 0; - case HAT_RIGHT_MASK: + case HAT_RIGHT_MASK: return hid->hats[port][0] > 0; - case HAT_UP_MASK: + case HAT_UP_MASK: return hid->hats[port][1] < 0; - case HAT_DOWN_MASK: + case HAT_DOWN_MASK: return hid->hats[port][1] > 0; } + return 0; } diff --git a/input/drivers_joypad/mfi_joypad.m b/input/drivers_joypad/mfi_joypad.m index 7349507812..0439f6068e 100644 --- a/input/drivers_joypad/mfi_joypad.m +++ b/input/drivers_joypad/mfi_joypad.m @@ -114,12 +114,13 @@ static void apple_gamecontroller_joypad_poll(void) static void apple_gamecontroller_joypad_register(GCGamepad *gamepad) { - gamepad.valueChangedHandler = ^(GCGamepad *updateGamepad, GCControllerElement *element) { + gamepad.valueChangedHandler = ^(GCGamepad *updateGamepad, GCControllerElement *element) + { apple_gamecontroller_joypad_poll_internal(updateGamepad.controller); }; - gamepad.controller.controllerPausedHandler = ^(GCController *controller) { - + gamepad.controller.controllerPausedHandler = ^(GCController *controller) + { uint32_t slot = (uint32_t)controller.playerIndex; mfi_buttons[slot] |= (1 << RETRO_DEVICE_ID_JOYPAD_START); @@ -187,13 +188,15 @@ bool apple_gamecontroller_joypad_init(void *data) [[NSNotificationCenter defaultCenter] addObserverForName:GCControllerDidConnectNotification object:nil queue:[NSOperationQueue mainQueue] - usingBlock:^(NSNotification *note) { + usingBlock:^(NSNotification *note) + { apple_gamecontroller_joypad_connect([note object]); }]; [[NSNotificationCenter defaultCenter] addObserverForName:GCControllerDidDisconnectNotification object:nil queue:[NSOperationQueue mainQueue] - usingBlock:^(NSNotification *note) { + usingBlock:^(NSNotification *note) + { apple_gamecontroller_joypad_disconnect([note object]); } ]; #endif diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index 282600f218..b008325168 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -67,7 +67,8 @@ static const char *psp_joypad_name(unsigned pad) if (psp2_model != SCE_KERNEL_MODEL_VITATV) return "Vita Controller"; - switch (curr_ctrl_info.port[pad + 1]) { + switch (curr_ctrl_info.port[pad + 1]) + { case SCE_CTRL_TYPE_DS3: return "DS3 Controller"; case SCE_CTRL_TYPE_DS4: @@ -102,7 +103,8 @@ static bool psp_joypad_init(void *data) #if defined(VITA) psp2_model = sceKernelGetModelForCDialog(); - if (psp2_model != SCE_KERNEL_MODEL_VITATV) { + if (psp2_model != SCE_KERNEL_MODEL_VITATV) + { sceTouchSetSamplingState(SCE_TOUCH_PORT_BACK, SCE_TOUCH_SAMPLING_STATE_START); sceTouchSetSamplingState(SCE_TOUCH_PORT_FRONT, SCE_TOUCH_SAMPLING_STATE_START); players_count = 1; @@ -188,16 +190,19 @@ static void psp_joypad_poll(void) #endif #ifdef VITA - if (psp2_model != SCE_KERNEL_MODEL_VITATV) { + if (psp2_model != SCE_KERNEL_MODEL_VITATV) players_count = 1; - } else { + else + { sceCtrlGetControllerPortInfo(&curr_ctrl_info); - for (player = 0; player < players_count; player++) { + for (player = 0; player < players_count; player++) + { if (old_ctrl_info.port[player + 1] == curr_ctrl_info.port[player + 1]) continue; if (old_ctrl_info.port[player + 1] != SCE_CTRL_TYPE_UNPAIRED && - curr_ctrl_info.port[player + 1] == SCE_CTRL_TYPE_UNPAIRED) { + curr_ctrl_info.port[player + 1] == SCE_CTRL_TYPE_UNPAIRED) + { memset(&actuators[player], 0, sizeof(SceCtrlActuator)); input_autoconfigure_disconnect(player, psp_joypad.ident); } @@ -321,7 +326,8 @@ static bool psp_joypad_rumble(unsigned pad, switch (effect) { case RETRO_RUMBLE_WEAK: - switch (curr_ctrl_info.port[pad + 1]) { + switch (curr_ctrl_info.port[pad + 1]) + { case SCE_CTRL_TYPE_DS3: actuators[pad].small = strength > 1 ? 1 : 0; break; @@ -333,7 +339,8 @@ static bool psp_joypad_rumble(unsigned pad, } break; case RETRO_RUMBLE_STRONG: - switch (curr_ctrl_info.port[pad + 1]) { + switch (curr_ctrl_info.port[pad + 1]) + { case SCE_CTRL_TYPE_DS3: actuators[pad].large = strength > 1 ? LERP(strength, 0xffff, 0xbf) + 0x40 : 0; break; From e5b7b83b3f0e8422a59a8501ee50aca00eeb203f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:04:42 +0100 Subject: [PATCH 149/427] (ui) Style nits --- ui/drivers/cocoa/cocoatouch_menu.m | 39 +++++++++++------------ ui/drivers/ui_cocoatouch.m | 50 ++++++++++++++++-------------- 2 files changed, 44 insertions(+), 45 deletions(-) diff --git a/ui/drivers/cocoa/cocoatouch_menu.m b/ui/drivers/cocoa/cocoatouch_menu.m index 6b2b931d6f..a3262b38ac 100644 --- a/ui/drivers/cocoa/cocoatouch_menu.m +++ b/ui/drivers/cocoa/cocoatouch_menu.m @@ -274,15 +274,14 @@ static void RunActionSheet(const char* title, const struct string_list* items, - (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if (buttonIndex == alertView.firstOtherButtonIndex) { - menu_entry_bind_key_set(self.i, RETROK_UNKNOWN); - } else if(buttonIndex == alertView.firstOtherButtonIndex + 1) { - menu_entry_bind_joykey_set(self.i, NO_BTN); - } else if(buttonIndex == alertView.firstOtherButtonIndex + 2) { - menu_entry_bind_joyaxis_set(self.i, AXIS_NONE); - } - - [self finishWithClickedButton:true]; + if (buttonIndex == alertView.firstOtherButtonIndex) + menu_entry_bind_key_set(self.i, RETROK_UNKNOWN); + else if(buttonIndex == alertView.firstOtherButtonIndex + 1) + menu_entry_bind_joykey_set(self.i, NO_BTN); + else if(buttonIndex == alertView.firstOtherButtonIndex + 2) + menu_entry_bind_joyaxis_set(self.i, AXIS_NONE); + + [self finishWithClickedButton:true]; } - (void)checkBind:(NSTimer*)send @@ -290,15 +289,14 @@ static void RunActionSheet(const char* title, const struct string_list* items, int32_t value = 0; int32_t idx = menu_entry_bind_index(self.i); - if ((value = cocoa_input_find_any_key())) { - menu_entry_bind_key_set(self.i, input_keymaps_translate_keysym_to_rk(value)); - } else if ((value = cocoa_input_find_any_button(idx)) >= 0) { - menu_entry_bind_joykey_set(self.i, value); - } else if ((value = cocoa_input_find_any_axis(idx))) { - menu_entry_bind_joyaxis_set(self.i, (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(abs(value) - 1)); - } else { + if ((value = cocoa_input_find_any_key())) + menu_entry_bind_key_set(self.i, input_keymaps_translate_keysym_to_rk(value)); + else if ((value = cocoa_input_find_any_button(idx)) >= 0) + menu_entry_bind_joykey_set(self.i, value); + else if ((value = cocoa_input_find_any_axis(idx))) + menu_entry_bind_joyaxis_set(self.i, (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(abs(value) - 1)); + else return; - } [self finishWithClickedButton:false]; } @@ -496,10 +494,9 @@ replacementString:(NSString *)string [super initialize:main idx:i]; self.formatter = [RANumberFormatter new]; - if (menu_entry_num_has_range(self.i)) { - [self.formatter setRangeFrom:BOXFLOAT(menu_entry_num_min(self.i)) - To:BOXFLOAT(menu_entry_num_max(self.i))]; - } + if (menu_entry_num_has_range(self.i)) + [self.formatter setRangeFrom:BOXFLOAT(menu_entry_num_min(self.i)) + To:BOXFLOAT(menu_entry_num_max(self.i))]; } @end diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index 5351e059cc..e502e62ea5 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -190,9 +190,8 @@ enum * but is bad for business with events. */ static double last_time_stamp; - if (last_time_stamp == event.timestamp) { - return [super handleKeyUIEvent:event]; - } + if (last_time_stamp == event.timestamp) + return [super handleKeyUIEvent:event]; last_time_stamp = event.timestamp; @@ -495,21 +494,25 @@ enum - (void)mainMenuPushPop: (bool)pushp { - if ( pushp ) { - self.menu_count++; - RAMenuBase* next_menu = [RAMainMenu new]; - next_menu.last_menu = self.mainmenu; - self.mainmenu = next_menu; - [self pushViewController:self.mainmenu animated:YES]; - } else { - if ( self.menu_count == 0 ) { - [self.mainmenu reloadData]; - } else { - self.menu_count--; + if ( pushp ) + { + self.menu_count++; + RAMenuBase* next_menu = [RAMainMenu new]; + next_menu.last_menu = self.mainmenu; + self.mainmenu = next_menu; + [self pushViewController:self.mainmenu animated:YES]; + } + else + { + if ( self.menu_count == 0 ) + [self.mainmenu reloadData]; + else + { + self.menu_count--; - [self popViewControllerAnimated:YES]; - self.mainmenu = self.mainmenu.last_menu; - } + [self popViewControllerAnimated:YES]; + self.mainmenu = self.mainmenu.last_menu; + } } } @@ -627,9 +630,8 @@ static void ui_companion_cocoatouch_notify_list_pushed(void *data, file_list_t *list, file_list_t *menu_list) { RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform; - bool pushp = false; - - size_t new_size = file_list_get_size( menu_list ); + bool pushp = false; + size_t new_size = file_list_get_size( menu_list ); /* FIXME workaround for the double call */ if ( old_size == 0 ) @@ -638,13 +640,13 @@ static void ui_companion_cocoatouch_notify_list_pushed(void *data, return; } - if ( old_size == new_size ) { + if ( old_size == new_size ) pushp = false; - } else if ( old_size < new_size ) { + else if ( old_size < new_size ) pushp = true; - } else if ( old_size > new_size ) { + else if ( old_size > new_size ) printf( "notify_list_pushed: old size should not be larger\n" ); - } + old_size = new_size; if (ap) From 9a87bada554e0885978575d1ba1d104d8797435b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:05:33 +0100 Subject: [PATCH 150/427] Style nit --- network/netplay/netplay_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/network/netplay/netplay_init.c b/network/netplay/netplay_init.c index e13a0b5a6f..df20b49cb2 100644 --- a/network/netplay/netplay_init.c +++ b/network/netplay/netplay_init.c @@ -349,7 +349,8 @@ bool netplay_wait_and_init_serialization(netplay_t *netplay) return true; /* Wait a maximum of 60 frames */ - for (frame = 0; frame < 60; frame++) { + for (frame = 0; frame < 60; frame++) + { if (netplay_try_init_serialization(netplay)) return true; From c6e1b47d984fb065f7d02cae98bb1c376902d9ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:20:15 +0100 Subject: [PATCH 151/427] (libretro-common) Style nits --- libretro-common/formats/tga/rtga.c | 3 +- libretro-common/string/stdstring.c | 5 ++-- libretro-common/utils/md5.c | 46 ++++++++++++++++-------------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/libretro-common/formats/tga/rtga.c b/libretro-common/formats/tga/rtga.c index b684aa0ae1..297c21ac41 100644 --- a/libretro-common/formats/tga/rtga.c +++ b/libretro-common/formats/tga/rtga.c @@ -66,7 +66,8 @@ static INLINE uint8_t rtga__get8(rtga__context *s) static void rtga__skip(rtga__context *s, int n) { - if (n < 0) { + if (n < 0) + { s->img_buffer = s->img_buffer_end; return; } diff --git a/libretro-common/string/stdstring.c b/libretro-common/string/stdstring.c index 663bb35c1a..e23e7fc38a 100644 --- a/libretro-common/string/stdstring.c +++ b/libretro-common/string/stdstring.c @@ -165,7 +165,8 @@ char *string_trim_whitespace(char *const s) return s; } -char* word_wrap(char* buffer, char* string, int line_width) { +char* word_wrap(char* buffer, char* string, int line_width) +{ unsigned i = 0; int k, counter; @@ -214,4 +215,4 @@ char* word_wrap(char* buffer, char* string, int line_width) { buffer[i] = 0; return buffer; -} \ No newline at end of file +} diff --git a/libretro-common/utils/md5.c b/libretro-common/utils/md5.c index 3208f1d65b..34b3a7e3a1 100644 --- a/libretro-common/utils/md5.c +++ b/libretro-common/utils/md5.c @@ -217,24 +217,27 @@ void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size) used = saved_lo & 0x3f; - if (used) { - available = 64 - used; + if (used) + { + available = 64 - used; - if (size < available) { - memcpy(&ctx->buffer[used], data, size); - return; - } + if (size < available) + { + memcpy(&ctx->buffer[used], data, size); + return; + } - memcpy(&ctx->buffer[used], data, available); - data = (const unsigned char *)data + available; - size -= available; - MD5_body(ctx, ctx->buffer, 64); - } + memcpy(&ctx->buffer[used], data, available); + data = (const unsigned char *)data + available; + size -= available; + MD5_body(ctx, ctx->buffer, 64); + } - if (size >= 64) { - data = MD5_body(ctx, data, size & ~(unsigned long)0x3f); - size &= 0x3f; - } + if (size >= 64) + { + data = MD5_body(ctx, data, size & ~(unsigned long)0x3f); + size &= 0x3f; + } memcpy(ctx->buffer, data, size); } @@ -249,12 +252,13 @@ void MD5_Final(unsigned char *result, MD5_CTX *ctx) available = 64 - used; - if (available < 8) { - memset(&ctx->buffer[used], 0, available); - MD5_body(ctx, ctx->buffer, 64); - used = 0; - available = 64; - } + if (available < 8) + { + memset(&ctx->buffer[used], 0, available); + MD5_body(ctx, ctx->buffer, 64); + used = 0; + available = 64; + } memset(&ctx->buffer[used], 0, available - 8); From 472df1ad337eb0979decc488b77d12eb7a89f23b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:31:11 +0100 Subject: [PATCH 152/427] Add HAVE_NETLOGGER rule --- Makefile.common | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.common b/Makefile.common index 580c0003ef..6902b10549 100644 --- a/Makefile.common +++ b/Makefile.common @@ -94,6 +94,11 @@ CFLAGS += -I$(LIBRETRO_COMM_DIR)/include # Switches +ifeq ($(HAVE_NETLOGGER), 1) + CFLAGS += -DHAVE_LOGGER + DEFINES += -DHAVE_LOGGER + OBJ += network/net_logger.o +endif # System From d0ec96ba7b8b5f9f497649d64ea4b1f8679505fa Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:31:29 +0100 Subject: [PATCH 153/427] Add this to Makefile.vita --- Makefile.vita | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.vita b/Makefile.vita index 860a915fb5..06d1968efb 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -2,6 +2,7 @@ TARGET := retroarch_vita DEBUG = 0 GRIFFIN_BUILD = 0 WHOLE_ARCHIVE_LINK = 0 +HAVE_NETLOGGER = 0 VITA_TITLE_ID := RETROARCH VITA_TITLE_NAME := RetroArch From 0c814f767c6116dd520fcb2c701044e786af203f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:39:12 +0100 Subject: [PATCH 154/427] Remove configuration.h header dependencies --- command.c | 2 +- managers/cheat_manager.c | 10 +++++----- managers/cheat_manager.h | 2 +- managers/core_option_manager.c | 2 +- managers/core_option_manager.h | 2 +- managers/state_manager.c | 16 +++++++--------- managers/state_manager.h | 4 ++-- menu/cbs/menu_cbs_ok.c | 3 ++- runloop.c | 3 ++- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/command.c b/command.c index 3f846fed1e..bbfdffdc4f 100644 --- a/command.c +++ b/command.c @@ -2011,7 +2011,7 @@ bool command_event(enum event_command cmd, void *data) #endif { if (settings->rewind_enable) - state_manager_event_init(); + state_manager_event_init(settings->rewind_buffer_size); } } break; diff --git a/managers/cheat_manager.c b/managers/cheat_manager.c index 4c5aa92f6f..342eb23360 100644 --- a/managers/cheat_manager.c +++ b/managers/cheat_manager.c @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include "../config.h" @@ -33,7 +34,8 @@ #endif #include "cheat_manager.h" -#include "../configuration.h" + +#include "../msg_hash.h" #include "../runloop.h" #include "../dynamic.h" #include "../core.h" @@ -127,20 +129,18 @@ void cheat_manager_set_code(unsigned i, const char *str) * * Returns: true (1) if successful, otherwise false (0). **/ -bool cheat_manager_save(const char *path) +bool cheat_manager_save(const char *path, const char *cheat_database) { bool ret; unsigned i; char buf[PATH_MAX_LENGTH]; char cheats_file[PATH_MAX_LENGTH]; config_file_t *conf = NULL; - settings_t *settings = config_get_ptr(); cheat_manager_t *handle = cheat_manager_state; buf[0] = cheats_file[0] = '\0'; - fill_pathname_join(buf, settings->path.cheat_database, - path, sizeof(buf)); + fill_pathname_join(buf, cheat_database, path, sizeof(buf)); fill_pathname_noext(cheats_file, buf, ".cht", sizeof(cheats_file)); diff --git a/managers/cheat_manager.h b/managers/cheat_manager.h index 61ec66c5f9..d208b118fa 100644 --- a/managers/cheat_manager.h +++ b/managers/cheat_manager.h @@ -36,7 +36,7 @@ bool cheat_manager_load(const char *path); * * Returns: true (1) if successful, otherwise false (0). **/ -bool cheat_manager_save(const char *path); +bool cheat_manager_save(const char *path, const char *cheat_database); bool cheat_manager_realloc(unsigned new_size); diff --git a/managers/core_option_manager.c b/managers/core_option_manager.c index 4c7b418418..135d129985 100644 --- a/managers/core_option_manager.c +++ b/managers/core_option_manager.c @@ -164,7 +164,7 @@ core_option_manager_t *core_option_manager_new(const char *conf_path, if (!opt) return NULL; - if (*conf_path) + if (!string_is_empty(conf_path)) opt->conf = config_file_new(conf_path); if (!opt->conf) opt->conf = config_file_new(NULL); diff --git a/managers/core_option_manager.h b/managers/core_option_manager.h index 46929df1f8..8e40a41a68 100644 --- a/managers/core_option_manager.h +++ b/managers/core_option_manager.h @@ -21,7 +21,7 @@ #include #include -#include "lists/string_list.h" +#include RETRO_BEGIN_DECLS diff --git a/managers/state_manager.c b/managers/state_manager.c index 48a06fce99..435b1f4dd8 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -23,7 +23,6 @@ #include #include "state_manager.h" -#include "../configuration.h" #include "../msg_hash.h" #include "../movie.h" #include "../core.h" @@ -504,12 +503,11 @@ static void state_manager_capacity(state_manager_t *state, } #endif -void state_manager_event_init(void) +void state_manager_event_init(unsigned rewind_buffer_size) { retro_ctx_serialize_info_t serial_info; retro_ctx_size_info_t info; void *state = NULL; - settings_t *settings = config_get_ptr(); if (rewind_state.state) return; @@ -533,10 +531,10 @@ void state_manager_event_init(void) RARCH_LOG("%s: %u MB\n", msg_hash_to_str(MSG_REWIND_INIT), - (unsigned)(settings->rewind_buffer_size / 1000000)); + (unsigned)(rewind_buffer_size / 1000000)); rewind_state.state = state_manager_new(rewind_state.size, - settings->rewind_buffer_size); + rewind_buffer_size); if (!rewind_state.state) RARCH_WARN("%s.\n", msg_hash_to_str(MSG_REWIND_INIT_FAILED)); @@ -579,7 +577,8 @@ void state_manager_event_deinit(void) * * Checks if rewind toggle/hold was being pressed and/or held. **/ -void state_manager_check_rewind(bool pressed) +void state_manager_check_rewind(bool pressed, + unsigned rewind_granularity) { static bool first = true; @@ -631,10 +630,9 @@ void state_manager_check_rewind(bool pressed) else { static unsigned cnt = 0; - settings_t *settings = config_get_ptr(); - cnt = (cnt + 1) % (settings->rewind_granularity ? - settings->rewind_granularity : 1); /* Avoid possible SIGFPE. */ + cnt = (cnt + 1) % (rewind_granularity ? + rewind_granularity : 1); /* Avoid possible SIGFPE. */ if ((cnt == 0) || bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) { diff --git a/managers/state_manager.h b/managers/state_manager.h index 934d6d0b50..49ad3cfb59 100644 --- a/managers/state_manager.h +++ b/managers/state_manager.h @@ -32,7 +32,7 @@ bool state_manager_frame_is_reversed(void); void state_manager_event_deinit(void); -void state_manager_event_init(void); +void state_manager_event_init(unsigned rewind_buffer_size); /** * check_rewind: @@ -40,7 +40,7 @@ void state_manager_event_init(void); * * Checks if rewind toggle/hold was being pressed and/or held. **/ -void state_manager_check_rewind(bool pressed); +void state_manager_check_rewind(bool pressed, unsigned rewind_granularity); RETRO_END_DECLS diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 5ef8a5a052..214adf3d18 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1894,6 +1894,7 @@ static void menu_input_st_string_cb_cheat_file_save_as( if (str && *str) { rarch_setting_t *setting = NULL; + settings_t *settings = config_get_ptr(); const char *label = menu_input_dialog_get_label_buffer(); if (!string_is_empty(label)) @@ -1905,7 +1906,7 @@ static void menu_input_st_string_cb_cheat_file_save_as( menu_setting_generic(setting, false); } else if (!string_is_empty(label)) - cheat_manager_save(str); + cheat_manager_save(str, settings->path.cheat_database); } menu_input_dialog_end(); diff --git a/runloop.c b/runloop.c index 307313a1b4..4c9c64d3f6 100644 --- a/runloop.c +++ b/runloop.c @@ -966,7 +966,8 @@ static enum runloop_state runloop_check_state( #ifdef HAVE_CHEEVOS if (!settings->cheevos.hardcore_mode_enable) #endif - state_manager_check_rewind(runloop_cmd_press(current_input, RARCH_REWIND)); + state_manager_check_rewind(runloop_cmd_press(current_input, RARCH_REWIND), + settings->rewind_granularity); runloop_slowmotion = runloop_cmd_press(current_input, RARCH_SLOWMOTION); From b4cdad1a6f9e372c9bc559fa7dd412fb7a7d7e50 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:43:19 +0100 Subject: [PATCH 155/427] Cleanups --- input/input_driver.c | 13 ++++++++++--- input/input_remote.c | 15 +++++++-------- input/input_remote.h | 6 +++--- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 2003087627..aad9b2a9cb 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -315,7 +315,8 @@ void input_poll(void) #ifdef HAVE_NETWORKGAMEPAD if (input_driver_remote) - input_remote_poll(input_driver_remote); + input_remote_poll(input_driver_remote, + settings->input.max_users); #endif } @@ -1184,7 +1185,12 @@ void input_driver_deinit_remote(void) { #ifdef HAVE_NETWORKGAMEPAD if (input_driver_remote) - input_remote_free(input_driver_remote); + { + settings_t *settings = config_get_ptr(); + + input_remote_free(input_driver_remote, + settings->input.max_users); + } input_driver_remote = NULL; #endif } @@ -1198,7 +1204,8 @@ bool input_driver_init_remote(void) return false; input_driver_remote = input_remote_new( - settings->network_remote_base_port); + settings->network_remote_base_port, + settings->input.max_users); if (input_driver_remote) return true; diff --git a/input/input_remote.c b/input/input_remote.c index 5523e24dd3..09d7b916db 100644 --- a/input/input_remote.c +++ b/input/input_remote.c @@ -120,7 +120,7 @@ error: } #endif -input_remote_t *input_remote_new(uint16_t port) +input_remote_t *input_remote_new(uint16_t port, unsigned max_users) { unsigned user; #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) @@ -135,7 +135,7 @@ input_remote_t *input_remote_new(uint16_t port) (void)port; #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) - for(user = 0; user < settings->input.max_users; user ++) + for(user = 0; user < max_users; user ++) { handle->net_fd[user] = -1; if(settings->network_remote_enable_user[user]) @@ -148,18 +148,17 @@ input_remote_t *input_remote_new(uint16_t port) #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) error: - input_remote_free(handle); + input_remote_free(handle, max_users); return NULL; #endif } -void input_remote_free(input_remote_t *handle) +void input_remote_free(input_remote_t *handle, unsigned max_users) { unsigned user; #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) - settings_t *settings = config_get_ptr(); - for(user = 0; user < settings->input.max_users; user ++) + for(user = 0; user < max_users; user ++) socket_close(handle->net_fd[user]); #endif @@ -229,13 +228,13 @@ bool input_remote_key_pressed(int key, unsigned port) return (ol_state->buttons[port] & (UINT64_C(1) << key)); } -void input_remote_poll(input_remote_t *handle) +void input_remote_poll(input_remote_t *handle, unsigned max_users) { unsigned user; settings_t *settings = config_get_ptr(); input_remote_state_t *ol_state = input_remote_get_state_ptr(); - for(user = 0; user < settings->input.max_users; user++) + for(user = 0; user < max_users; user++) { if (settings->network_remote_enable_user[user]) { diff --git a/input/input_remote.h b/input/input_remote.h index 605cde065b..9c8b1341cf 100644 --- a/input/input_remote.h +++ b/input/input_remote.h @@ -30,11 +30,11 @@ RETRO_BEGIN_DECLS typedef struct input_remote input_remote_t; -input_remote_t *input_remote_new(uint16_t port); +input_remote_t *input_remote_new(uint16_t port, unsigned max_users); -void input_remote_free(input_remote_t *handle); +void input_remote_free(input_remote_t *handle, unsigned max_users); -void input_remote_poll(input_remote_t *handle); +void input_remote_poll(input_remote_t *handle, unsigned max_users); bool input_remote_key_pressed(int key, unsigned port); From aa59b33931c45593e831bf8eb97e87f8fc0cbe50 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 19:59:33 +0100 Subject: [PATCH 156/427] Use input_config_set_device --- input/input_config.c | 9 +++++ input/input_config.h | 2 ++ menu/menu_setting.c | 7 ++-- retroarch.c | 81 ++++++++++++++++++++++++++++---------------- 4 files changed, 66 insertions(+), 33 deletions(-) diff --git a/input/input_config.c b/input/input_config.c index 1f41f3a199..0ff6e000f3 100644 --- a/input/input_config.c +++ b/input/input_config.c @@ -495,6 +495,14 @@ void input_config_set_device_name(unsigned port, const char *name) } } +void input_config_set_device(unsigned port, unsigned id) +{ + settings_t *settings = config_get_ptr(); + + if (settings) + settings->input.libretro_device[port] = id; +} + bool input_config_get_bind_idx(unsigned port, unsigned *joy_idx_real) { settings_t *settings = config_get_ptr(); @@ -519,3 +527,4 @@ const struct retro_keybind *input_config_get_bind_auto(unsigned port, unsigned i return &settings->input.autoconf_binds[joy_idx][id]; return NULL; } + diff --git a/input/input_config.h b/input/input_config.h index f21997e9fd..64c7050565 100644 --- a/input/input_config.h +++ b/input/input_config.h @@ -69,6 +69,8 @@ void input_config_parse_joy_axis(void *data, const char *prefix, void input_config_set_device_name(unsigned port, const char *name); +void input_config_set_device(unsigned port, unsigned id); + const char *input_config_get_device_name(unsigned port); const struct retro_keybind *input_config_get_bind_auto(unsigned port, unsigned id); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index bacc866d20..29a72212b7 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1022,7 +1022,6 @@ static int setting_action_start_libretro_device_type(void *data) unsigned devices[128], types = 0, port = 0; const struct retro_controller_info *desc = NULL; rarch_system_info_t *system = NULL; - settings_t *settings = config_get_ptr(); rarch_setting_t *setting = (rarch_setting_t*)data; if (setting_generic_action_start_default(setting) != 0) @@ -1062,7 +1061,7 @@ static int setting_action_start_libretro_device_type(void *data) current_device = RETRO_DEVICE_JOYPAD; - settings->input.libretro_device[port] = current_device; + input_config_set_device(port, current_device); pad.port = port; pad.device = current_device; @@ -1176,7 +1175,7 @@ static int setting_action_left_libretro_device_type( current_device = devices [(current_idx + types - 1) % types]; - settings->input.libretro_device[port] = current_device; + input_config_set_device(port, current_device); pad.port = port; pad.device = current_device; @@ -1243,7 +1242,7 @@ static int setting_action_right_libretro_device_type( current_device = devices [(current_idx + 1) % types]; - settings->input.libretro_device[port] = current_device; + input_config_set_device(port, current_device); pad.port = port; pad.device = current_device; diff --git a/retroarch.c b/retroarch.c index 9ac5853f21..eb5f6596db 100644 --- a/retroarch.c +++ b/retroarch.c @@ -67,6 +67,7 @@ #include "core_info.h" #include "dynamic.h" #include "driver.h" +#include "input/input_config.h" #include "msg_hash.h" #include "movie.h" #include "dirs.h" @@ -401,7 +402,6 @@ static void retroarch_parse_input(int argc, char *argv[]) { const char *optstring = NULL; bool explicit_menu = false; - settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); const struct option opts[] = { @@ -545,7 +545,8 @@ static void retroarch_parse_input(int argc, char *argv[]) retroarch_fail(1, "retroarch_parse_input()"); } new_port = port -1; - settings->input.libretro_device[new_port] = id; + + input_config_set_device(new_port, id); retroarch_override_setting_set( RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); @@ -564,7 +565,7 @@ static void retroarch_parse_input(int argc, char *argv[]) } new_port = port - 1; - settings->input.libretro_device[new_port] = RETRO_DEVICE_ANALOG; + input_config_set_device(new_port, RETRO_DEVICE_ANALOG); retroarch_override_setting_set( RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); } @@ -606,7 +607,7 @@ static void retroarch_parse_input(int argc, char *argv[]) retroarch_fail(1, "retroarch_parse_input()"); } new_port = port - 1; - settings->input.libretro_device[port - 1] = RETRO_DEVICE_NONE; + input_config_set_device(port - 1, RETRO_DEVICE_NONE); retroarch_override_setting_set( RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &new_port); } @@ -631,6 +632,8 @@ static void retroarch_parse_input(int argc, char *argv[]) case 'L': if (path_is_directory(optarg)) { + settings_t *settings = config_get_ptr(); + path_clear(RARCH_PATH_CORE); strlcpy(settings->directory.libretro, optarg, sizeof(settings->directory.libretro)); @@ -698,31 +701,43 @@ static void retroarch_parse_input(int argc, char *argv[]) break; case 'C': - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL); - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL); - netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); - strlcpy(settings->netplay.server, optarg, - sizeof(settings->netplay.server)); + { + settings_t *settings = config_get_ptr(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL); + netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); + strlcpy(settings->netplay.server, optarg, + sizeof(settings->netplay.server)); + } break; case RA_OPT_STATELESS: - settings->netplay.stateless_mode = true; - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, NULL); + { + settings_t *settings = config_get_ptr(); + settings->netplay.stateless_mode = true; + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, NULL); + } break; case RA_OPT_CHECK_FRAMES: - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, NULL); - settings->netplay.check_frames = strtoul(optarg, NULL, 0); + { + settings_t *settings = config_get_ptr(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, NULL); + settings->netplay.check_frames = strtoul(optarg, NULL, 0); + } break; case RA_OPT_PORT: - retroarch_override_setting_set( - RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT, NULL); - settings->netplay.port = strtoul(optarg, NULL, 0); + { + settings_t *settings = config_get_ptr(); + retroarch_override_setting_set( + RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT, NULL); + settings->netplay.port = strtoul(optarg, NULL, 0); + } break; #if defined(HAVE_NETWORK_CMD) @@ -772,9 +787,12 @@ static void retroarch_parse_input(int argc, char *argv[]) break; case RA_OPT_NICK: - rarch_ctl(RARCH_CTL_USERNAME_SET, NULL); - strlcpy(settings->username, optarg, - sizeof(settings->username)); + { + settings_t *settings = config_get_ptr(); + rarch_ctl(RARCH_CTL_USERNAME_SET, NULL); + strlcpy(settings->username, optarg, + sizeof(settings->username)); + } break; case RA_OPT_APPENDCONFIG: @@ -1109,7 +1127,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) static bool rarch_bps_pref = false; static bool rarch_ips_pref = false; static bool rarch_patch_blocked = false; - settings_t *settings = config_get_ptr(); #ifdef HAVE_THREAD_STORAGE static sthread_tls_t rarch_tls; const void *MAGIC_POINTER = (void*)0xB16B00B5; @@ -1239,7 +1256,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) { unsigned i; for (i = 0; i < MAX_USERS; i++) - settings->input.libretro_device[i] = RETRO_DEVICE_JOYPAD; + input_config_set_device(i, RETRO_DEVICE_JOYPAD); } runloop_ctl(RUNLOOP_CTL_HTTPSERVER_INIT, NULL); runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_INIT, NULL); @@ -1306,8 +1323,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) menu_driver_ctl(RARCH_MENU_CTL_SET_TOGGLE, NULL); #endif #ifdef HAVE_OVERLAY - if (settings->input.overlay_hide_in_menu) - command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); + { + settings_t *settings = config_get_ptr(); + if (settings->input.overlay_hide_in_menu) + command_event(CMD_EVENT_OVERLAY_DEINIT, NULL); + } #endif break; case RARCH_CTL_MENU_RUNNING_FINISHED: @@ -1316,8 +1336,11 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data) #endif video_driver_set_texture_enable(false, false); #ifdef HAVE_OVERLAY - if (settings && settings->input.overlay_hide_in_menu) - command_event(CMD_EVENT_OVERLAY_INIT, NULL); + { + settings_t *settings = config_get_ptr(); + if (settings && settings->input.overlay_hide_in_menu) + command_event(CMD_EVENT_OVERLAY_INIT, NULL); + } #endif break; case RARCH_CTL_IS_MAIN_THREAD: From 05d455a8ceaba48e1b2022c2d3d551a4bc7e9423 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 20:07:41 +0100 Subject: [PATCH 157/427] Cleanups --- retroarch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/retroarch.c b/retroarch.c index eb5f6596db..786f0877c3 100644 --- a/retroarch.c +++ b/retroarch.c @@ -917,6 +917,8 @@ bool retroarch_validate_game_options(char *s, size_t len, bool mkdir) const char *game_name = NULL; rarch_system_info_t *system = NULL; + config_directory[0] = core_path[0] = '\0'; + runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); if (system) @@ -927,9 +929,8 @@ bool retroarch_validate_game_options(char *s, size_t len, bool mkdir) if (string_is_empty(core_name) || string_is_empty(game_name)) return false; - config_directory[0] = core_path[0] = '\0'; - - fill_pathname_application_special(config_directory, sizeof(config_directory), + fill_pathname_application_special(config_directory, + sizeof(config_directory), APPLICATION_SPECIAL_DIRECTORY_CONFIG); /* Concatenate strings into full paths for game_path */ From 4b4aeec4452855dba8a65db5f93a1a0d55fa3cf5 Mon Sep 17 00:00:00 2001 From: Sergi Granell Date: Tue, 17 Jan 2017 18:57:44 +0100 Subject: [PATCH 158/427] (VITA) Use .c shaders --- Makefile.common | 14 ++++----- Makefile.griffin | 15 +++++----- deps/libvita2d/shader/clear_f_gxp.c | 21 +++++++++++++ deps/libvita2d/shader/clear_v_gxp.c | 23 ++++++++++++++ deps/libvita2d/shader/color_f_gxp.c | 19 ++++++++++++ deps/libvita2d/shader/color_v_gxp.c | 28 ++++++++++++++++++ deps/libvita2d/shader/compiled/clear_f_gxp.o | Bin 765 -> 0 bytes deps/libvita2d/shader/compiled/clear_v_gxp.o | Bin 792 -> 0 bytes deps/libvita2d/shader/compiled/color_f_gxp.o | Bin 744 -> 0 bytes deps/libvita2d/shader/compiled/color_v_gxp.o | Bin 872 -> 0 bytes .../libvita2d/shader/compiled/texture_f_gxp.o | Bin 762 -> 0 bytes .../shader/compiled/texture_tint_f_gxp.o | Bin 807 -> 0 bytes .../libvita2d/shader/compiled/texture_v_gxp.o | Bin 878 -> 0 bytes deps/libvita2d/shader/tetxure_f_gxp.c | 20 +++++++++++++ deps/libvita2d/shader/tetxure_tint_f_gxp.c | 24 +++++++++++++++ deps/libvita2d/shader/tetxure_v_gxp.c | 28 ++++++++++++++++++ deps/libvita2d/shader/texture_f_gxp.c | 20 +++++++++++++ deps/libvita2d/shader/texture_tint_f_gxp.c | 24 +++++++++++++++ deps/libvita2d/shader/texture_v_gxp.c | 28 ++++++++++++++++++ deps/libvita2d/source/vita2d.c | 28 +++++++++--------- 20 files changed, 264 insertions(+), 28 deletions(-) create mode 100644 deps/libvita2d/shader/clear_f_gxp.c create mode 100644 deps/libvita2d/shader/clear_v_gxp.c create mode 100644 deps/libvita2d/shader/color_f_gxp.c create mode 100644 deps/libvita2d/shader/color_v_gxp.c delete mode 100644 deps/libvita2d/shader/compiled/clear_f_gxp.o delete mode 100644 deps/libvita2d/shader/compiled/clear_v_gxp.o delete mode 100644 deps/libvita2d/shader/compiled/color_f_gxp.o delete mode 100644 deps/libvita2d/shader/compiled/color_v_gxp.o delete mode 100644 deps/libvita2d/shader/compiled/texture_f_gxp.o delete mode 100644 deps/libvita2d/shader/compiled/texture_tint_f_gxp.o delete mode 100644 deps/libvita2d/shader/compiled/texture_v_gxp.o create mode 100644 deps/libvita2d/shader/tetxure_f_gxp.c create mode 100644 deps/libvita2d/shader/tetxure_tint_f_gxp.c create mode 100644 deps/libvita2d/shader/tetxure_v_gxp.c create mode 100644 deps/libvita2d/shader/texture_f_gxp.c create mode 100644 deps/libvita2d/shader/texture_tint_f_gxp.c create mode 100644 deps/libvita2d/shader/texture_v_gxp.c diff --git a/Makefile.common b/Makefile.common index 6902b10549..8207a496fe 100644 --- a/Makefile.common +++ b/Makefile.common @@ -611,13 +611,13 @@ ifeq ($(HAVE_VITA2D), 1) $(DEPS_DIR)/libvita2d/source/vita2d_draw.o \ $(DEPS_DIR)/libvita2d/source/utils.o - OBJ += $(DEPS_DIR)/libvita2d/shader/compiled/clear_v_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/compiled/clear_f_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/compiled/color_v_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/compiled/color_f_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/compiled/texture_v_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/compiled/texture_f_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/compiled/texture_tint_f_gxp.o + OBJ += $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/color_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o ifeq ($(HAVE_MENU),1) OBJ += menu/drivers_display/menu_display_vita2d.o diff --git a/Makefile.griffin b/Makefile.griffin index 5c9d62ec3a..425fddbcef 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -219,13 +219,14 @@ else ifeq ($(platform), vita) -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \ -lSceMotion_stub -lSceAppMgr_stub -lpng -lm -lc - PLATEXTRA := deps/libvita2d/shader/compiled/clear_v_gxp.o \ - deps/libvita2d/shader/compiled/clear_f_gxp.o \ - deps/libvita2d/shader/compiled/color_v_gxp.o \ - deps/libvita2d/shader/compiled/color_f_gxp.o \ - deps/libvita2d/shader/compiled/texture_v_gxp.o \ - deps/libvita2d/shader/compiled/texture_f_gxp.o \ - deps/libvita2d/shader/compiled/texture_tint_f_gxp.o + PLATEXTRA := $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/color_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o + PLATOBJS += \ libretro-common/audio/conversion/s16_to_float_neon.o \ libretro-common/audio/conversion/float_to_s16_neon.o \ diff --git a/deps/libvita2d/shader/clear_f_gxp.c b/deps/libvita2d/shader/clear_f_gxp.c new file mode 100644 index 0000000000..1019171f73 --- /dev/null +++ b/deps/libvita2d/shader/clear_f_gxp.c @@ -0,0 +1,21 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file clear_f.gxp */ +const long int clear_f_gxp_size = 236; +const unsigned char clear_f_gxp[236] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0xEC, 0x00, 0x00, 0x00, 0x42, 0xC5, 0x15, 0xBE, + 0xAA, 0xA6, 0x78, 0x8C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xA8, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x80, 0x19, 0xA0, + 0x7E, 0x0D, 0x84, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xFA, + 0x00, 0x00, 0x00, 0xC5, 0x22, 0x04, 0x80, 0x38, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x01, 0xE4, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x75, 0x43, 0x6C, 0x65, 0x61, 0x72, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x00 +}; diff --git a/deps/libvita2d/shader/clear_v_gxp.c b/deps/libvita2d/shader/clear_v_gxp.c new file mode 100644 index 0000000000..4130fdd4a7 --- /dev/null +++ b/deps/libvita2d/shader/clear_v_gxp.c @@ -0,0 +1,23 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file clear_v.gxp */ +const long int clear_v_gxp_size = 264; +const unsigned char clear_v_gxp[264] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x31, 0x0F, 0x53, 0x68, + 0x27, 0x82, 0x90, 0xBD, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xC4, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x52, 0x45, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x44, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x00, 0xF8, 0x01, 0x00, 0x24, 0x9F, + 0x88, 0x1F, 0xC5, 0x08, 0x00, 0x0F, 0x00, 0x03, 0x21, 0x05, 0x80, 0x38, 0x00, 0x0F, 0x04, 0x03, + 0x59, 0x05, 0x80, 0x38, 0x00, 0x00, 0x20, 0xA0, 0x00, 0x50, 0x27, 0xFB, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x50, 0x6F, 0x73, + 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x00 +}; diff --git a/deps/libvita2d/shader/color_f_gxp.c b/deps/libvita2d/shader/color_f_gxp.c new file mode 100644 index 0000000000..40cc096965 --- /dev/null +++ b/deps/libvita2d/shader/color_f_gxp.c @@ -0,0 +1,19 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file color_f.gxp */ +const long int color_f_gxp_size = 208; +const unsigned char color_f_gxp[208] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x00, 0x41, 0x94, 0xBB, 0xB6, + 0x66, 0x1E, 0xDD, 0x20, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0F, 0xA0, 0xD0, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xFA, 0x02, 0x80, 0x19, 0xA0, 0x7E, 0x0D, 0x80, 0x40 +}; diff --git a/deps/libvita2d/shader/color_v_gxp.c b/deps/libvita2d/shader/color_v_gxp.c new file mode 100644 index 0000000000..443a87a40d --- /dev/null +++ b/deps/libvita2d/shader/color_v_gxp.c @@ -0,0 +1,28 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file color_v.gxp */ +const long int color_v_gxp_size = 340; +const unsigned char color_v_gxp[340] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0x51, 0x01, 0x00, 0x00, 0xE2, 0xF2, 0xA7, 0xCC, + 0x01, 0x74, 0x8D, 0xD3, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xE4, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x9C, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x44, 0xFA, 0x80, 0x00, 0x08, 0x83, 0x21, 0x1D, 0x80, 0x38, 0x02, 0x80, 0x81, 0xAF, + 0x9C, 0x0D, 0xC0, 0x40, 0x0E, 0x86, 0xB9, 0xFF, 0xBC, 0x0D, 0xC0, 0x40, 0x04, 0x11, 0x49, 0xCF, + 0x80, 0x8F, 0xB1, 0x18, 0x02, 0x11, 0x45, 0xCF, 0x80, 0x8F, 0xB1, 0x18, 0x00, 0x11, 0x01, 0xC0, + 0x81, 0x81, 0xB1, 0x18, 0x01, 0xD1, 0x42, 0xC0, 0x81, 0x81, 0xB1, 0x18, 0x00, 0x00, 0x20, 0xA0, + 0x00, 0x50, 0x27, 0xFB, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x01, 0xE4, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x50, 0x6F, 0x73, + 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x61, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x77, 0x76, 0x70, + 0x00, 0x00, 0x00, 0x00 +}; diff --git a/deps/libvita2d/shader/compiled/clear_f_gxp.o b/deps/libvita2d/shader/compiled/clear_f_gxp.o deleted file mode 100644 index bca3ed35fca0a79131ce86ebe5ec67b8aa5cc3fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 765 zcmah_u};H440TFMCkhnPMsJS7?2uZVL*a`0qM9lM;l0!D!EE619ad+kQf;0 zPq6R}jC=q{Ob7}5k~$kCsI1`;=U!+)) zr@cTW=^v}zVJYd?QSIlA-RT+h-zCiG4)*U$@bXoe%aPRfr3m>Y?+(v-q(!LbE8dj^ z-tv?PM|_v_deFWYNTnk#REHl)tv%I^FbKOIZ-hcg-{*B1^>u)9J)TyV3Wr|n2rZx% OjRsn@5OtVf&qUv0{Z>!_ diff --git a/deps/libvita2d/shader/compiled/color_f_gxp.o b/deps/libvita2d/shader/compiled/color_f_gxp.o deleted file mode 100644 index 99acc76b100db335d202e8fedfd47512bd190a57..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 744 zcmah{!AiqG5S^_lJ!vfp;!zOnsd(_{K``1&4}u;yW(Dg(1N{jRgnoj5 z;njl&f5WQ?I+N_yZ7&W?-kZtWH@llW9QBSFV_<_p8~!SQJ@cZ%Hq^nh(tnYBD3^@# z8}Y+%0_)U3UUT~IxTwII*3~gdw~E=sv|dQz3>W35M>?8Cx((AqDB~4%Tga@R)pgHL zfT20<>1p!(c(J|%j0_gy1?vRUo9&X7tS~x_I5OOVd!EQP5ibq5*fX_{Nc-A1bp_0$ z9-Y5AeOsa4E$xkv+kDz%Q&Fh`=on0J*( lWs-1T=GQtyyGR65ad(1D1AtB-w17@N9%|7?)T+YBuwVQ$Q%V2; diff --git a/deps/libvita2d/shader/compiled/color_v_gxp.o b/deps/libvita2d/shader/compiled/color_v_gxp.o deleted file mode 100644 index 53279ff00f0ab065a9b86731c33f58750bdc8cd2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcmah{Jxc>Y5S@z&NeW|53)2V&1cQZGSlDSWF(4@dDrmKAydyc1+=aXK6Tu6Dm0)9G zVc|azOTof_AcFru3tI~jRERToyBaNYVDe_(zInUZz5QZ&LDMu)p+OG5JAi4q5MmBu z5LMEDk$foor1ArCwZ~jJ#gUIl4Z$)tJ|fM)}|z$TcbnJ3I9W&#ESjxLK3vWIo4zeTuOvLY8ob}(#r4FyU*NC9!Z~f!T zOhhjR7}b+Eoz7(@cDEQH!00(t#@|zcXBvhO)42N-^>`n2KNJ)6BYS#-ET;Atz6UMw zisM&1RDoOs^pv fw5xN&bXo5XrfmRB8eDLg^mbZ;R}qC9VqI3B_Rer& diff --git a/deps/libvita2d/shader/compiled/texture_f_gxp.o b/deps/libvita2d/shader/compiled/texture_f_gxp.o deleted file mode 100644 index 8888b95ffb55dbbfc3fb77779a12cdce3abcbb4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 762 zcmah_Jx>Bb5S=|C*eNl_Ry!&hEiFturLi#4!fsi(6)wU-?v@0!kY8df{U;Xu0y_)- zfThMn-`wtUr-^Zr+4tt{o7s>1le1GH1o;ruprRr=a2pmIRHcfy{);?^bImzFflJ33 z{G=LqP|{z~G)K*SRV4d1ksC-q3zXVunmLVqd=~q5oCe6_1-?BnKhOJGSLY-!e2Kk> z?&9(8dA}{zZ4Y}m7@v>>WU#uW$n`li4uc%$tXRtLX%{kGI_@!a^&ybYvj6Nv+>TG; z_tU%8jsUxs+O-ybY~?J--yT$gd=5)SPp#+A)xXjk%C}~%{M%etRZrDX%sJ}x z_SFCuHRj_IW|C@oEql|k%#2FSZ!NynBs+1U(wRJ#G8}a$L!FpRsw9#Z+L$=$WguxU qmaSAJdN7co&Th;I1N$n{sr-40P9maaq>Q3wHX9n%0h-ie-?48*NmeWX diff --git a/deps/libvita2d/shader/compiled/texture_tint_f_gxp.o b/deps/libvita2d/shader/compiled/texture_tint_f_gxp.o deleted file mode 100644 index 18fb7f18c010c1f77590eff88c40636c7340fd7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 807 zcmaiy%}PQ+6vxll^`nJlw1{eB5#>rEYS%*gauXCK;vyKXcuT=lt|Mqf8T1nE-S+}6 ze1M=HqHT+I6+!*aof$GPI&kK9&YAx?Gv4ufcYjX^LDmGN=qDpuHyfHM3X@}{|B~mh zj~V4Bm>L>xCq+>Y84Y6zNf+e4Fr0M>_$1uULP$O6il)Xo9?iNLQv(8vplJb-oo98~ z!XXI^UqNAcQB_`Q4;vyDv?N%=#`k)HSK$stu(FBZUfm!jQeeZx7Tm|ickdbkftGp6 z3#_C;Cm{FaOs*jufwOo9z3a*VSk<9kqdOlQWX9<&)V;g!#|N2BavpE9y%_aplUMPZ z%tWAcXc}~IN)i;$`g`%#JUkSf#2Ha5SE;G(dbRG8^4hxg_iDeCRoGu{^WhicniISe zNBm!yLN;e&u1(SF*V?ZfBHTi?d`~LeOP#LC)l?#t#u~KvWj+8RLbx=6Y hAIWCf^}UiDG0Cgp4bml7xs+~p&XrpPm9JSg(Kn8#SCRk# diff --git a/deps/libvita2d/shader/compiled/texture_v_gxp.o b/deps/libvita2d/shader/compiled/texture_v_gxp.o deleted file mode 100644 index 71099b67a592f336c38899804f0c7d138501d841..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 878 zcmah`u}T9$5S@#O#v+nR)Ye@8&SKvS=6v=wmT0S+IV`JqEX}-PlrfUf7uHDAjjXCN>Xj7NpudOSbAdrf z=Oh9+S9qXMBGL?b&8XTJq@go>)mH&YSGE~I@@OO#%*KNH?NzEV*K>T|dO!qo{xLYa z8;Y5^5aVWdqh7xoN<1xx2rzsN`SJIj&@T=Bh-tiiigNu2kWRGaw1ZI$<0aY$wRqn3 zZE3p>@O4q$bY0Jaz1 zuw7QH?l50+PyVji`vO?OcDPq#3yfvm&C0fLq|dlxu{9y3?G$|^UeRVt9(P2!%(BAY hk}evSxFtOH^A_P)0FxG%947tRw&Vpw=|xyl>=PECbIkw% diff --git a/deps/libvita2d/shader/tetxure_f_gxp.c b/deps/libvita2d/shader/tetxure_f_gxp.c new file mode 100644 index 0000000000..c024e14d4d --- /dev/null +++ b/deps/libvita2d/shader/tetxure_f_gxp.c @@ -0,0 +1,20 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file texture_f.gxp */ +const long int texture_f_gxp_size = 220; +const unsigned char texture_f_gxp[220] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0xDC, 0x00, 0x00, 0x00, 0x4D, 0xD2, 0xB7, 0x2A, + 0xF5, 0x56, 0x28, 0x8B, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xFA, 0x10, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00 +}; diff --git a/deps/libvita2d/shader/tetxure_tint_f_gxp.c b/deps/libvita2d/shader/tetxure_tint_f_gxp.c new file mode 100644 index 0000000000..3d14207221 --- /dev/null +++ b/deps/libvita2d/shader/tetxure_tint_f_gxp.c @@ -0,0 +1,24 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file texture_tint_f.gxp */ +const long int texture_tint_f_gxp_size = 288; +const unsigned char texture_tint_f_gxp[288] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0x1F, 0x01, 0x00, 0x00, 0xEA, 0xFC, 0xA0, 0xCB, + 0x79, 0x0C, 0xE6, 0xA5, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x00, 0xF8, + 0x02, 0x80, 0x99, 0xAF, 0xBC, 0x0D, 0xC0, 0x40, 0x3C, 0x00, 0x04, 0xCF, 0x84, 0x47, 0xA4, 0x08, + 0x00, 0xBC, 0x19, 0x20, 0x7E, 0x0D, 0x81, 0x40, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x01, 0xE4, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1B, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x75, 0x54, 0x69, 0x6E, 0x74, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x74, 0x65, 0x78, 0x00, 0x00 +}; diff --git a/deps/libvita2d/shader/tetxure_v_gxp.c b/deps/libvita2d/shader/tetxure_v_gxp.c new file mode 100644 index 0000000000..d9fd24ee60 --- /dev/null +++ b/deps/libvita2d/shader/tetxure_v_gxp.c @@ -0,0 +1,28 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file texture_v.gxp */ +const long int texture_v_gxp_size = 340; +const unsigned char texture_v_gxp[340] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x34, 0x73, 0xC9, 0xAD, + 0xE1, 0xC5, 0xBA, 0x45, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xE4, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x9C, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x06, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xB0, 0x7E, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x44, 0xFA, 0x80, 0x00, 0x08, 0x83, 0x21, 0x0D, 0x80, 0x38, 0x02, 0x80, 0x81, 0xAF, + 0x9C, 0x0D, 0xC0, 0x40, 0x0E, 0x86, 0xB9, 0xFF, 0xBC, 0x0D, 0xC0, 0x40, 0x04, 0x11, 0x49, 0xCF, + 0x80, 0x8F, 0xB1, 0x18, 0x02, 0x11, 0x45, 0xCF, 0x80, 0x8F, 0xB1, 0x18, 0x00, 0x11, 0x01, 0xC0, + 0x81, 0x81, 0xB1, 0x18, 0x01, 0xD1, 0x42, 0xC0, 0x81, 0x81, 0xB1, 0x18, 0x00, 0x00, 0x20, 0xA0, + 0x00, 0x50, 0x27, 0xFB, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0xE4, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x50, 0x6F, 0x73, + 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x61, 0x54, 0x65, 0x78, 0x63, 0x6F, 0x6F, 0x72, 0x64, 0x00, + 0x77, 0x76, 0x70, 0x00 +}; diff --git a/deps/libvita2d/shader/texture_f_gxp.c b/deps/libvita2d/shader/texture_f_gxp.c new file mode 100644 index 0000000000..c024e14d4d --- /dev/null +++ b/deps/libvita2d/shader/texture_f_gxp.c @@ -0,0 +1,20 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file texture_f.gxp */ +const long int texture_f_gxp_size = 220; +const unsigned char texture_f_gxp[220] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0xDC, 0x00, 0x00, 0x00, 0x4D, 0xD2, 0xB7, 0x2A, + 0xF5, 0x56, 0x28, 0x8B, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xFA, 0x10, 0x00, 0x00, 0x00, 0x02, 0x04, 0x02, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00 +}; diff --git a/deps/libvita2d/shader/texture_tint_f_gxp.c b/deps/libvita2d/shader/texture_tint_f_gxp.c new file mode 100644 index 0000000000..3d14207221 --- /dev/null +++ b/deps/libvita2d/shader/texture_tint_f_gxp.c @@ -0,0 +1,24 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file texture_tint_f.gxp */ +const long int texture_tint_f_gxp_size = 288; +const unsigned char texture_tint_f_gxp[288] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0x1F, 0x01, 0x00, 0x00, 0xEA, 0xFC, 0xA0, 0xCB, + 0x79, 0x0C, 0xE6, 0xA5, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xC8, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x44, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x00, 0xF8, + 0x02, 0x80, 0x99, 0xAF, 0xBC, 0x0D, 0xC0, 0x40, 0x3C, 0x00, 0x04, 0xCF, 0x84, 0x47, 0xA4, 0x08, + 0x00, 0xBC, 0x19, 0x20, 0x7E, 0x0D, 0x81, 0x40, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x01, 0xE4, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1B, 0x00, 0x00, 0x00, 0x02, 0x04, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x75, 0x54, 0x69, 0x6E, 0x74, 0x43, 0x6F, 0x6C, 0x6F, 0x72, 0x00, 0x74, 0x65, 0x78, 0x00, 0x00 +}; diff --git a/deps/libvita2d/shader/texture_v_gxp.c b/deps/libvita2d/shader/texture_v_gxp.c new file mode 100644 index 0000000000..d9fd24ee60 --- /dev/null +++ b/deps/libvita2d/shader/texture_v_gxp.c @@ -0,0 +1,28 @@ +/* Generated by bin2c, do not edit manually */ + +/* Contents of file texture_v.gxp */ +const long int texture_v_gxp_size = 340; +const unsigned char texture_v_gxp[340] = { + 0x47, 0x58, 0x50, 0x00, 0x01, 0x04, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x34, 0x73, 0xC9, 0xAD, + 0xE1, 0xC5, 0xBA, 0x45, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xE4, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x9C, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x06, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xB0, 0x7E, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x44, 0xFA, 0x80, 0x00, 0x08, 0x83, 0x21, 0x0D, 0x80, 0x38, 0x02, 0x80, 0x81, 0xAF, + 0x9C, 0x0D, 0xC0, 0x40, 0x0E, 0x86, 0xB9, 0xFF, 0xBC, 0x0D, 0xC0, 0x40, 0x04, 0x11, 0x49, 0xCF, + 0x80, 0x8F, 0xB1, 0x18, 0x02, 0x11, 0x45, 0xCF, 0x80, 0x8F, 0xB1, 0x18, 0x00, 0x11, 0x01, 0xC0, + 0x81, 0x81, 0xB1, 0x18, 0x01, 0xD1, 0x42, 0xC0, 0x81, 0x81, 0xB1, 0x18, 0x00, 0x00, 0x20, 0xA0, + 0x00, 0x50, 0x27, 0xFB, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x01, 0xE4, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x50, 0x6F, 0x73, + 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x61, 0x54, 0x65, 0x78, 0x63, 0x6F, 0x6F, 0x72, 0x64, 0x00, + 0x77, 0x76, 0x70, 0x00 +}; diff --git a/deps/libvita2d/source/vita2d.c b/deps/libvita2d/source/vita2d.c index aeb2605cdb..2192a2a374 100644 --- a/deps/libvita2d/source/vita2d.c +++ b/deps/libvita2d/source/vita2d.c @@ -34,25 +34,25 @@ typedef struct vita2d_display_data { /* Extern */ -extern const SceGxmProgram clear_v_gxp_start; -extern const SceGxmProgram clear_f_gxp_start; -extern const SceGxmProgram color_v_gxp_start; -extern const SceGxmProgram color_f_gxp_start; -extern const SceGxmProgram texture_v_gxp_start; -extern const SceGxmProgram texture_f_gxp_start; -extern const SceGxmProgram texture_tint_f_gxp_start; +extern const SceGxmProgram clear_v_gxp; +extern const SceGxmProgram clear_f_gxp; +extern const SceGxmProgram color_v_gxp; +extern const SceGxmProgram color_f_gxp; +extern const SceGxmProgram texture_v_gxp; +extern const SceGxmProgram texture_f_gxp; +extern const SceGxmProgram texture_tint_f_gxp; /* Static variables */ static int pgf_module_was_loaded = 0; -static const SceGxmProgram *const clearVertexProgramGxp = &clear_v_gxp_start; -static const SceGxmProgram *const clearFragmentProgramGxp = &clear_f_gxp_start; -static const SceGxmProgram *const colorVertexProgramGxp = &color_v_gxp_start; -static const SceGxmProgram *const colorFragmentProgramGxp = &color_f_gxp_start; -static const SceGxmProgram *const textureVertexProgramGxp = &texture_v_gxp_start; -static const SceGxmProgram *const textureFragmentProgramGxp = &texture_f_gxp_start; -static const SceGxmProgram *const textureTintFragmentProgramGxp = &texture_tint_f_gxp_start; +static const SceGxmProgram *const clearVertexProgramGxp = &clear_v_gxp; +static const SceGxmProgram *const clearFragmentProgramGxp = &clear_f_gxp; +static const SceGxmProgram *const colorVertexProgramGxp = &color_v_gxp; +static const SceGxmProgram *const colorFragmentProgramGxp = &color_f_gxp; +static const SceGxmProgram *const textureVertexProgramGxp = &texture_v_gxp; +static const SceGxmProgram *const textureFragmentProgramGxp = &texture_f_gxp; +static const SceGxmProgram *const textureTintFragmentProgramGxp = &texture_tint_f_gxp; static int vita2d_initialized = 0; static float clear_color[4] = {0.0f, 0.0f, 0.0f, 1.0f}; From 610f69757f6de96c744008a35730da66d4c66537 Mon Sep 17 00:00:00 2001 From: Sergi Granell Date: Tue, 17 Jan 2017 20:54:22 +0100 Subject: [PATCH 159/427] Add DEPS_DIR to Makefile.griffin --- Makefile.griffin | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/Makefile.griffin b/Makefile.griffin index 425fddbcef..34c05785e3 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -1,13 +1,15 @@ -DEBUG = 0 -HAVE_LOGGER = 0 -HAVE_FILE_LOGGER = 0 -HAVE_CC_RESAMPLER = 1 -WHOLE_ARCHIVE_LINK = 0 -BIG_STACK = 1 +ROOT_DIR := . +DEPS_DIR := $(ROOT_DIR)/deps +DEBUG = 0 +HAVE_LOGGER = 0 +HAVE_FILE_LOGGER = 0 +HAVE_CC_RESAMPLER = 1 +WHOLE_ARCHIVE_LINK = 0 +BIG_STACK = 1 PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255 PC_DEVELOPMENT_UDP_PORT = 3490 -RARCH_CONSOLE = 0 -USBGECKO = 0 +RARCH_CONSOLE = 0 +USBGECKO = 0 ifneq ($(EMSCRIPTEN),) platform = emscripten @@ -219,20 +221,20 @@ else ifeq ($(platform), vita) -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \ -lSceMotion_stub -lSceAppMgr_stub -lpng -lm -lc - PLATEXTRA := $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/color_f_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/texture_v_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \ - $(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o + PLATOBJS += $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/color_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_v_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \ + $(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o - PLATOBJS += \ - libretro-common/audio/conversion/s16_to_float_neon.o \ - libretro-common/audio/conversion/float_to_s16_neon.o \ - memory/neon/memcpy-neon.o \ - libretro-common/audio/resampler/drivers/sinc_resampler_neon.o \ - audio/drivers_resampler/cc_resampler_neon.o + PLATOBJS += \ + libretro-common/audio/conversion/s16_to_float_neon.o \ + libretro-common/audio/conversion/float_to_s16_neon.o \ + memory/neon/memcpy-neon.o \ + libretro-common/audio/resampler/drivers/sinc_resampler_neon.o \ + audio/drivers_resampler/cc_resampler_neon.o LIBDIRS += -L. LDFLAGS += -Wl,-q From f35f21744d5408379d58ad3d32efb39129ed0a40 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 22:08:09 +0100 Subject: [PATCH 160/427] (Vita) Set these menu drivers --- Makefile.vita | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.vita b/Makefile.vita index 06d1968efb..1cbce99a46 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -3,6 +3,9 @@ DEBUG = 0 GRIFFIN_BUILD = 0 WHOLE_ARCHIVE_LINK = 0 HAVE_NETLOGGER = 0 +HAVE_RGUI = 1 +HAVE_MATERIALUI = 1 +HAVE_XMB = 1 VITA_TITLE_ID := RETROARCH VITA_TITLE_NAME := RetroArch From 3dacc03b522191c7c6c291163b17f23946e21096 Mon Sep 17 00:00:00 2001 From: Sergi Granell Date: Tue, 17 Jan 2017 23:12:36 +0100 Subject: [PATCH 161/427] Get HAVE_XMB define out of HAVE_RGUI Add -DHAVE_STB_FONT to HAVE_STB_FONT Add -DHAVE_OVERLAY to HAVE_OVERLAY (VITA) Improve Makefile.vita (proper netlogging) --- Makefile.common | 17 ++++++++++++----- Makefile.vita | 37 +++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/Makefile.common b/Makefile.common index 8207a496fe..ab3538335f 100644 --- a/Makefile.common +++ b/Makefile.common @@ -497,10 +497,10 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1) HAVE_XMB = 1 endif else - HAVE_ZARCH = 0 - HAVE_MATERIALUI = 0 - #HAVE_NUKLEAR = 0 - HAVE_XMB = 0 + HAVE_ZARCH ?= 0 + HAVE_MATERIALUI ?= 0 + #HAVE_NUKLEAR ?= 0 + HAVE_XMB ?= 0 endif ifeq ($(HAVE_RGUI), 1) @@ -526,12 +526,14 @@ ifeq ($(HAVE_ZARCH), 1) OBJ += menu/drivers/zarch.o DEFINES += -DHAVE_ZARCH endif + +endif + ifeq ($(HAVE_XMB), 1) OBJ += menu/drivers/xmb.o DEFINES += -DHAVE_XMB HAVE_MENU_COMMON = 1 endif -endif ifeq ($(HAVE_LAKKA), 1) DEFINES += -DHAVE_LAKKA @@ -579,9 +581,14 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/drivers/null.o endif +ifeq ($(HAVE_OVERLAY), 1) + DEFINES += -DHAVE_OVERLAY +endif + ifeq ($(HAVE_STB_FONT), 1) OBJ += gfx/drivers_font_renderer/stb.o OBJ += gfx/drivers_font_renderer/stb_unicode.o + DEFINES += -DHAVE_STB_FONT endif ifeq ($(HAVE_FREETYPE), 1) diff --git a/Makefile.vita b/Makefile.vita index 1cbce99a46..9b27cb4b32 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -1,17 +1,13 @@ TARGET := retroarch_vita -DEBUG = 0 +DEBUG ?= 0 GRIFFIN_BUILD = 0 WHOLE_ARCHIVE_LINK = 0 -HAVE_NETLOGGER = 0 -HAVE_RGUI = 1 -HAVE_MATERIALUI = 1 -HAVE_XMB = 1 VITA_TITLE_ID := RETROARCH VITA_TITLE_NAME := RetroArch PC_DEVELOPMENT_IP_ADDRESS = -PC_DEVELOPMENT_TCP_PORT = +PC_DEVELOPMENT_UDP_PORT = OBJ := @@ -19,8 +15,12 @@ DEFINES := ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o - DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB + DEFINES += -DHAVE_GRIFFIN=1 + DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER + ifeq ($(DEBUG), 1) + DEFINES += -DHAVE_NETLOGGER + endif else HAVE_NEON := 1 @@ -35,19 +35,24 @@ else HAVE_VITA2D := 1 HAVE_NETWORKING := 1 HAVE_SOCKET_LEGACY := 1 - HAVE_OVERLAY := 1 HAVE_MENU := 1 + HAVE_MENU_COMMON := 1 + HAVE_OVERLAY := 1 HAVE_MATERIALUI := 1 HAVE_XMB := 1 + HAVE_RGUI := 1 HAVE_STB_FONT := 1 HAVE_THREADS := 1 HAVE_LIBRETRODB := 1 + HAVE_CC_RESAMPLER := 1 RARCH_CONSOLE := 1 + ifeq ($(DEBUG), 1) + HAVE_NETLOGGER = 1 + endif + include Makefile.common BLACKLIST := - BLACKLIST += input/input_overlay.o - BLACKLIST += tasks/task_overlay.o OBJ := $(filter-out $(BLACKLIST),$(OBJ)) OBJ += input/drivers/psp_input.o @@ -79,7 +84,7 @@ ifeq ($(strip $(VITASDK)),) $(error "Please set VITASDK in your environment. export VITASDK=vitasdk") endif -export PATH := $(PATH):$(VITASDK)/bin +export PATH := $(PATH):$(VITASDK)/bin PREFIX := arm-vita-eabi- @@ -96,16 +101,16 @@ INCDIRS := -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include LIBDIRS := -L. ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA -CFLAGS += $(ARCHFLAGS) -Wl,-q -mword-relocations -fno-optimize-sibling-calls +CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls ifeq ($(DEBUG), 1) - CFLAGS += -O0 -g + CFLAGS += -O2 -g else CFLAGS += -O3 endif -LDFLAGS := $(CFLAGS) ASFLAGS := $(CFLAGS) +LDFLAGS := -Wl,-q CFLAGS += -Wall -ffast-math CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE @@ -115,8 +120,8 @@ ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),) CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"' endif -ifneq ($(PC_DEVELOPMENT_TCP_PORT),) - CFLAGS += -DPC_DEVELOPMENT_TCP_PORT=$(PC_DEVELOPMENT_TCP_PORT) +ifneq ($(PC_DEVELOPMENT_UDP_PORT),) + CFLAGS += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) endif ifeq ($(WHOLE_ARCHIVE_LINK), 1) From dbed4d4fc60aeea806c4a7d44b613d27f837cdea Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Jan 2017 23:54:13 +0100 Subject: [PATCH 162/427] Add video_info->fullscreen --- gfx/video_driver.c | 1 + gfx/video_driver.h | 1 + 2 files changed, 2 insertions(+) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index ef7380267c..0600f086a6 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2192,6 +2192,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->post_filter_record = settings->video.post_filter_record; video_info->max_swapchain_images = settings->video.max_swapchain_images; video_info->windowed_fullscreen = settings->video.windowed_fullscreen; + video_info->fullscreen = settings->video.fullscreen; video_info->monitor_index = settings->video.monitor_index; video_info->shared_context = settings->video.shared_context; video_info->font_enable = settings->video.font_enable; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 6efb630b8b..0e70d9b8cd 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -98,6 +98,7 @@ typedef struct video_frame_info bool post_filter_record; unsigned max_swapchain_images; bool windowed_fullscreen; + bool fullscreen; unsigned monitor_index; bool font_enable; } video_frame_info_t; From 51976d496f692b4f933e99e5af817de6e8c9039c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 00:18:27 +0100 Subject: [PATCH 163/427] Don't manipulate buffer if we are fullscreen - no text writing to display window then or internal buffer --- gfx/video_driver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 0600f086a6..9ff334989e 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1048,7 +1048,10 @@ bool video_monitor_get_fps( (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); video_driver_frame_time_samples[write_index] = new_time - fps_time; - fps_time = new_time; + fps_time = new_time; + + if (video_info.fullscreen) + return false; if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) { @@ -1088,6 +1091,10 @@ bool video_monitor_get_fps( } curr_time = fps_time = new_time; + + if (video_info.fullscreen) + return true; + strlcpy(buf, video_driver_title_buf, size); if (buf_fps) strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); From b433ccab09d4a56b5e3eaed109a845e6dab22f17 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 00:23:57 +0100 Subject: [PATCH 164/427] Make 'Show FPS" work again --- gfx/video_driver.c | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 9ff334989e..1e0954bae2 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1050,35 +1050,35 @@ bool video_monitor_get_fps( video_driver_frame_time_samples[write_index] = new_time - fps_time; fps_time = new_time; - if (video_info.fullscreen) - return false; - - if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) + if (!video_info.fullscreen) { - char frames_text[64]; - - last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); - curr_time = new_time; - - fill_pathname_noext(buf, - video_driver_title_buf, - " || ", - size); - - if (video_info.fps_show) + if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) { - char fps_text[64]; - snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); - strlcat(buf, fps_text, size); + char frames_text[64]; + + last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); + curr_time = new_time; + + fill_pathname_noext(buf, + video_driver_title_buf, + " || ", + size); + + if (video_info.fps_show) + { + char fps_text[64]; + snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); + strlcat(buf, fps_text, size); + } + + strlcat(buf, "Frames: ", size); + + snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, + (unsigned long long)video_driver_frame_count); + + strlcat(buf, frames_text, size); + ret = true; } - - strlcat(buf, "Frames: ", size); - - snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, - (unsigned long long)video_driver_frame_count); - - strlcat(buf, frames_text, size); - ret = true; } if (buf_fps && video_info.fps_show) From 552144c24d70ba59402ddeda01642c6748867f95 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 00:25:55 +0100 Subject: [PATCH 165/427] Revert "Make 'Show FPS" work again" This reverts commit b433ccab09d4a56b5e3eaed109a845e6dab22f17. --- gfx/video_driver.c | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 1e0954bae2..9ff334989e 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1050,35 +1050,35 @@ bool video_monitor_get_fps( video_driver_frame_time_samples[write_index] = new_time - fps_time; fps_time = new_time; - if (!video_info.fullscreen) + if (video_info.fullscreen) + return false; + + if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) { - if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) + char frames_text[64]; + + last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); + curr_time = new_time; + + fill_pathname_noext(buf, + video_driver_title_buf, + " || ", + size); + + if (video_info.fps_show) { - char frames_text[64]; - - last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); - curr_time = new_time; - - fill_pathname_noext(buf, - video_driver_title_buf, - " || ", - size); - - if (video_info.fps_show) - { - char fps_text[64]; - snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); - strlcat(buf, fps_text, size); - } - - strlcat(buf, "Frames: ", size); - - snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, - (unsigned long long)video_driver_frame_count); - - strlcat(buf, frames_text, size); - ret = true; + char fps_text[64]; + snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); + strlcat(buf, fps_text, size); } + + strlcat(buf, "Frames: ", size); + + snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, + (unsigned long long)video_driver_frame_count); + + strlcat(buf, frames_text, size); + ret = true; } if (buf_fps && video_info.fps_show) From 4fbd41852a98ccca4d3ceb2ff155a2bf0c82634d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 00:26:56 +0100 Subject: [PATCH 166/427] Revert "Don't manipulate buffer if we are fullscreen - no text writing" This reverts commit 51976d496f692b4f933e99e5af817de6e8c9039c. --- gfx/video_driver.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 9ff334989e..0600f086a6 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1048,10 +1048,7 @@ bool video_monitor_get_fps( (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); video_driver_frame_time_samples[write_index] = new_time - fps_time; - fps_time = new_time; - - if (video_info.fullscreen) - return false; + fps_time = new_time; if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) { @@ -1091,10 +1088,6 @@ bool video_monitor_get_fps( } curr_time = fps_time = new_time; - - if (video_info.fullscreen) - return true; - strlcpy(buf, video_driver_title_buf, size); if (buf_fps) strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); From a220815b408a9f1e227e90b3887c2196a21404f4 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 17 Jan 2017 18:42:58 -0500 Subject: [PATCH 167/427] fix race condition in frame count with video_threaded on --- gfx/video_context_driver.c | 2 +- gfx/video_driver.c | 81 ++++++++++++++++++++++++-------------- gfx/video_driver.h | 2 +- menu/drivers/materialui.c | 12 +++--- menu/drivers/rgui.c | 8 ++-- menu/drivers/xmb.c | 8 ++-- menu/drivers/zarch.c | 6 +-- runloop.c | 2 +- 8 files changed, 71 insertions(+), 50 deletions(-) diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 59e223224b..9bf06e725d 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -282,7 +282,7 @@ bool video_context_driver_check_window(gfx_ctx_size_t *size_data) size_data->quit, size_data->resize, size_data->width, - size_data->height, ((unsigned int)*video_driver_get_frame_count_ptr())); + size_data->height, (unsigned int)video_driver_get_frame_count()); return true; } diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 0600f086a6..a5c142b9ee 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -65,6 +65,34 @@ #define FPS_UPDATE_INTERVAL 256 +#ifdef HAVE_THREADS +#define video_driver_lock() \ + if (display_lock) \ + slock_lock(display_lock) + +#define video_driver_unlock() \ + if (display_lock) \ + slock_unlock(display_lock) + +#define video_driver_lock_free() \ + slock_free(display_lock); \ + display_lock = NULL + +#define video_driver_threaded_lock() \ + if (video_driver_is_threaded()) \ + video_driver_lock() + +#define video_driver_threaded_unlock() \ + if (video_driver_is_threaded()) \ + video_driver_unlock() +#else +#define video_driver_lock() ((void)0) +#define video_driver_unlock() ((void)0) +#define video_driver_lock_free() ((void)0) +#define video_driver_threaded_lock() ((void)0) +#define video_driver_threaded_unlock() ((void)0) +#endif + typedef struct video_pixel_scaler { struct scaler_ctx *scaler; @@ -1037,10 +1065,15 @@ bool video_monitor_get_fps( static retro_time_t curr_time; static retro_time_t fps_time; retro_time_t new_time = cpu_features_get_time_usec(); + uint64_t frame_count; + + video_driver_threaded_lock(); + frame_count = video_driver_frame_count; + video_driver_threaded_unlock(); *buf = '\0'; - if (video_driver_frame_count) + if (frame_count) { static float last_fps; bool ret = false; @@ -1050,7 +1083,7 @@ bool video_monitor_get_fps( video_driver_frame_time_samples[write_index] = new_time - fps_time; fps_time = new_time; - if ((video_driver_frame_count % FPS_UPDATE_INTERVAL) == 0) + if ((frame_count % FPS_UPDATE_INTERVAL) == 0) { char frames_text[64]; @@ -1072,7 +1105,7 @@ bool video_monitor_get_fps( strlcat(buf, "Frames: ", size); snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, - (unsigned long long)video_driver_frame_count); + (unsigned long long)frame_count); strlcat(buf, frames_text, size); ret = true; @@ -1082,7 +1115,7 @@ bool video_monitor_get_fps( snprintf(buf_fps, size_fps, "FPS: %6.1f || %s: " STRING_REP_UINT64, last_fps, msg_hash_to_str(MSG_FRAMES), - (unsigned long long)video_driver_frame_count); + (unsigned long long)frame_count); return ret; } @@ -1320,26 +1353,6 @@ void video_driver_menu_settings(void **list_data, void *list_info_data, #endif } - -#ifdef HAVE_THREADS -#define video_driver_lock() \ - if (display_lock) \ - slock_lock(display_lock) - -#define video_driver_unlock() \ - if (display_lock) \ - slock_unlock(display_lock) - -#define video_driver_lock_free() \ - slock_free(display_lock); \ - display_lock = NULL - -#else -#define video_driver_lock() ((void)0) -#define video_driver_unlock() ((void)0) -#define video_driver_lock_free() ((void)0) -#endif - static void video_driver_lock_new(void) { video_driver_lock_free(); @@ -1687,9 +1700,13 @@ bool video_driver_read_viewport(uint8_t *buffer) return false; } -uint64_t *video_driver_get_frame_count_ptr(void) +uint64_t video_driver_get_frame_count(void) { - return &video_driver_frame_count; + uint64_t frame_count; + video_driver_threaded_lock(); + frame_count = video_driver_frame_count; + video_driver_threaded_unlock(); + return frame_count; } bool video_driver_frame_filter_alive(void) @@ -2058,7 +2075,8 @@ void video_driver_frame(const void *data, unsigned width, static struct retro_perf_counter video_frame_conv = {0}; unsigned output_width = 0; unsigned output_height = 0; - unsigned output_pitch = 0; + unsigned output_pitch = 0; + uint64_t frame_count = 0; const char *msg = NULL; if (!video_driver_active) @@ -2115,13 +2133,16 @@ void video_driver_frame(const void *data, unsigned width, && video_info.font_enable && msg) strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); + video_driver_threaded_lock(); + frame_count = video_driver_frame_count; + video_driver_frame_count++; + video_driver_threaded_unlock(); + if (!current_video || !current_video->frame( video_driver_data, data, width, height, - video_driver_frame_count, + frame_count, pitch, video_driver_msg, video_info)) video_driver_active = false; - - video_driver_frame_count++; } void video_driver_display_type_set(enum rarch_display_type type) diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 0e70d9b8cd..768b896607 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -275,7 +275,7 @@ bool video_driver_find_driver(void); void video_driver_apply_state_changes(void); bool video_driver_read_viewport(uint8_t *buffer); bool video_driver_cached_frame(void); -uint64_t *video_driver_get_frame_count_ptr(void); +uint64_t video_driver_get_frame_count(void); bool video_driver_frame_filter_alive(void); bool video_driver_frame_filter_is_32bit(void); void video_driver_default_settings(void); diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 920f317752..8775926814 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -809,9 +809,9 @@ static void mui_render_menu_list(mui_handle_t *mui, float sum = 0; unsigned header_height = 0; size_t i = 0; - uint64_t *frame_count = NULL; + uint64_t frame_count = NULL; file_list_t *list = NULL; - frame_count = video_driver_get_frame_count_ptr(); + frame_count = video_driver_get_frame_count(); if (!menu_display_get_update_pending()) return; @@ -859,7 +859,7 @@ static void mui_render_menu_list(mui_handle_t *mui, y, width, height, - *frame_count / 20, + frame_count / 20, font_hover_color, entry_selected, rich_label, @@ -1037,7 +1037,7 @@ static void mui_frame(void *data) size_t selection = 0; size_t title_margin = 0; mui_handle_t *mui = (mui_handle_t*)data; - uint64_t *frame_count = video_driver_get_frame_count_ptr(); + uint64_t frame_count = video_driver_get_frame_count(); settings_t *settings = config_get_ptr(); bool background_rendered = false; bool libretro_running = menu_display_libretro_running(); @@ -1360,7 +1360,7 @@ static void mui_frame(void *data) ticker.s = title_buf; ticker.len = ticker_limit; - ticker.idx = *frame_count / 100; + ticker.idx = frame_count / 100; ticker.str = title; ticker.selected = true; @@ -1383,7 +1383,7 @@ static void mui_frame(void *data) ticker.s = title_buf_msg_tmp; ticker.len = ticker_limit; - ticker.idx = *frame_count / 20; + ticker.idx = frame_count / 20; ticker.str = title_buf_msg; ticker.selected = true; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index cba92b0771..acaeec1848 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -394,11 +394,11 @@ static void rgui_render(void *data) char title_msg[64]; char msg[255]; bool msg_force = false; - uint64_t *frame_count = NULL; + uint64_t frame_count = NULL; settings_t *settings = config_get_ptr(); rgui_t *rgui = (rgui_t*)data; - frame_count = video_driver_get_frame_count_ptr(); + frame_count = video_driver_get_frame_count(); msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0'; @@ -503,7 +503,7 @@ static void rgui_render(void *data) ticker.s = title_buf; ticker.len = RGUI_TERM_WIDTH(fb_width) - 10; - ticker.idx = *frame_count / RGUI_TERM_START_X(fb_width); + ticker.idx = frame_count / RGUI_TERM_START_X(fb_width); ticker.str = title; ticker.selected = true; @@ -595,7 +595,7 @@ static void rgui_render(void *data) ticker.s = entry_title_buf; ticker.len = RGUI_TERM_WIDTH(fb_width) - (entry_spacing + 1 + 2); - ticker.idx = *frame_count / RGUI_TERM_START_X(fb_width); + ticker.idx = frame_count / RGUI_TERM_START_X(fb_width); ticker.str = entry_path; ticker.selected = entry_selected; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index da8c4d1d60..108258bfa2 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2073,10 +2073,10 @@ static void xmb_draw_items( size_t i; math_matrix_4x4 mymat; menu_display_ctx_rotate_draw_t rotate_draw; - uint64_t *frame_count = NULL; + uint64_t frame_count = NULL; xmb_node_t *core_node = NULL; size_t end = 0; - frame_count = video_driver_get_frame_count_ptr(); + frame_count = video_driver_get_frame_count(); if (!list || !list->size) return; @@ -2230,7 +2230,7 @@ static void xmb_draw_items( ticker.s = name; ticker.len = ticker_limit; - ticker.idx = *frame_count / 20; + ticker.idx = frame_count / 20; ticker.str = ticker_str; ticker.selected = (i == current); @@ -2261,7 +2261,7 @@ static void xmb_draw_items( ticker.s = value; ticker.len = 35; - ticker.idx = *frame_count / 20; + ticker.idx = frame_count / 20; ticker.str = entry_value; ticker.selected = (i == current); diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 1b19e0145c..34a6d38e81 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -317,13 +317,13 @@ static bool zarch_zui_list_item(zui_t *zui, struct zui_tabbed *tab, int x1, int menu_animation_ctx_ticker_t ticker; unsigned ticker_size; char title_buf[PATH_MAX_LENGTH]; - uint64_t *frame_count = NULL; + uint64_t frame_count = NULL; unsigned id = zarch_zui_hash(zui, label); int x2 = x1 + zui->width - 290 - 40; int y2 = y1 + 50; bool active = zarch_zui_check_button_up(zui, id, x1, y1, x2, y2); const float *bg = zui_bg_panel; - frame_count = video_driver_get_frame_count_ptr(); + frame_count = video_driver_get_frame_count(); title_buf[0] = '\0'; @@ -346,7 +346,7 @@ static bool zarch_zui_list_item(zui_t *zui, struct zui_tabbed *tab, int x1, int ticker.s = title_buf; ticker.len = ticker_size; - ticker.idx = *frame_count / 50; + ticker.idx = frame_count / 50; ticker.str = label; ticker.selected = (bg == zui_bg_hilite || bg == zui_bg_pad_hilite); diff --git a/runloop.c b/runloop.c index 4c9c64d3f6..131062f6ed 100644 --- a/runloop.c +++ b/runloop.c @@ -673,7 +673,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) * d) Video driver no longer alive. * e) End of BSV movie and BSV EOF exit is true. (TODO/FIXME - explain better) */ -#define time_to_exit(quit_key_pressed) (runloop_shutdown_initiated || quit_key_pressed || !video_driver_is_alive() || bsv_movie_ctl(BSV_MOVIE_CTL_END_EOF, NULL) || (runloop_max_frames && (*(video_driver_get_frame_count_ptr()) >= runloop_max_frames)) || runloop_exec) +#define time_to_exit(quit_key_pressed) (runloop_shutdown_initiated || quit_key_pressed || !video_driver_is_alive() || bsv_movie_ctl(BSV_MOVIE_CTL_END_EOF, NULL) || (runloop_max_frames && (video_driver_get_frame_count() >= runloop_max_frames)) || runloop_exec) #define runloop_check_cheevos() (settings->cheevos.enable && cheevos_loaded && (!cheats_are_enabled && !cheats_were_enabled)) From 8cdfa75b485f81382fe695e006d4628093ece1cb Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 17 Jan 2017 18:44:29 -0500 Subject: [PATCH 168/427] set ints to 0 instead of NULL --- menu/drivers/materialui.c | 2 +- menu/drivers/rgui.c | 2 +- menu/drivers/xmb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 8775926814..5841bf9e03 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -809,7 +809,7 @@ static void mui_render_menu_list(mui_handle_t *mui, float sum = 0; unsigned header_height = 0; size_t i = 0; - uint64_t frame_count = NULL; + uint64_t frame_count = 0; file_list_t *list = NULL; frame_count = video_driver_get_frame_count(); diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index acaeec1848..2b683af47c 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -394,7 +394,7 @@ static void rgui_render(void *data) char title_msg[64]; char msg[255]; bool msg_force = false; - uint64_t frame_count = NULL; + uint64_t frame_count = 0; settings_t *settings = config_get_ptr(); rgui_t *rgui = (rgui_t*)data; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 108258bfa2..8fe641b054 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2073,7 +2073,7 @@ static void xmb_draw_items( size_t i; math_matrix_4x4 mymat; menu_display_ctx_rotate_draw_t rotate_draw; - uint64_t frame_count = NULL; + uint64_t frame_count = 0; xmb_node_t *core_node = NULL; size_t end = 0; frame_count = video_driver_get_frame_count(); From e862abfe1201666669f6ac674f254abbb546ad5f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 00:54:36 +0100 Subject: [PATCH 169/427] Initialize frame_count to 0 --- gfx/video_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index a5c142b9ee..8d7535a902 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1065,7 +1065,7 @@ bool video_monitor_get_fps( static retro_time_t curr_time; static retro_time_t fps_time; retro_time_t new_time = cpu_features_get_time_usec(); - uint64_t frame_count; + uint64_t frame_count = 0; video_driver_threaded_lock(); frame_count = video_driver_frame_count; From fa5404fc53ca53947975b186504bdbc7a8f54c30 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 17 Jan 2017 19:09:15 -0500 Subject: [PATCH 170/427] fix race condition when switching fullscreen with threaded_video on --- gfx/video_driver.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 8d7535a902..9ad62c93be 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -74,9 +74,19 @@ if (display_lock) \ slock_unlock(display_lock) +#define video_driver_context_lock() \ + if (context_lock) \ + slock_lock(context_lock) + +#define video_driver_context_unlock() \ + if (context_lock) \ + slock_unlock(context_lock) + #define video_driver_lock_free() \ slock_free(display_lock); \ - display_lock = NULL + slock_free(context_lock); \ + display_lock = NULL; \ + context_lock = NULL #define video_driver_threaded_lock() \ if (video_driver_is_threaded()) \ @@ -91,6 +101,8 @@ #define video_driver_lock_free() ((void)0) #define video_driver_threaded_lock() ((void)0) #define video_driver_threaded_unlock() ((void)0) +#define video_driver_context_lock() ((void)0) +#define video_driver_context_unlock() ((void)0) #endif typedef struct video_pixel_scaler @@ -169,6 +181,7 @@ static uint8_t *video_driver_record_gpu_buffer = NULL; #ifdef HAVE_THREADS static slock_t *display_lock = NULL; +static slock_t *context_lock = NULL; #endif struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = { @@ -1360,6 +1373,10 @@ static void video_driver_lock_new(void) if (!display_lock) display_lock = slock_new(); retro_assert(display_lock); + + if (!context_lock) + context_lock = slock_new(); + retro_assert(context_lock); #endif } @@ -1790,7 +1807,7 @@ void video_driver_reinit(void) video_driver_get_hw_context(); if (hwr->cache_context) - video_driver_cache_context = true; + video_driver_cache_context = true; else video_driver_cache_context = false; @@ -1816,15 +1833,26 @@ bool video_driver_owns_driver(void) bool video_driver_is_hw_context(void) { - return hw_render.context_type != RETRO_HW_CONTEXT_NONE; + bool is_hw_context = false; + + video_driver_context_lock(); + is_hw_context = (hw_render.context_type != RETRO_HW_CONTEXT_NONE); + video_driver_context_unlock(); + + return is_hw_context; } void video_driver_deinit_hw_context(void) { + video_driver_context_lock(); + if (hw_render.context_destroy) hw_render.context_destroy(); memset(&hw_render, 0, sizeof(hw_render)); + + video_driver_context_unlock(); + hw_render_context_negotiation = NULL; } From 039064d0f19bd5e3a378b44a578e37e395406c42 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 17 Jan 2017 19:21:15 -0500 Subject: [PATCH 171/427] remove HAVE_LANGEXTRA from Xbox build, fixes compilation on vc2003 --- pkg/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj b/pkg/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj index 6f114b9c99..b664a981f7 100644 --- a/pkg/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj +++ b/pkg/msvc/RetroArch-Xbox1/RetroArch-Xbox1.vcproj @@ -22,7 +22,7 @@ Optimization="3" OptimizeForProcessor="2" AdditionalIncludeDirectories=""$(SolutionDir)\..\..\libretro-common\include";"$(SolutionDir)\..\..\libretro-common\include\compat\msvc";"$(SolutionDir)\msvc-71";"$(SolutionDir)\..\..\deps\zlib"" - PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_CC_RESAMPLER;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN" + PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RGUI;HAVE_MENU;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_EXEC;HAVE_DSOUND;HAVE_CC_RESAMPLER;HAVE_D3D;HAVE_D3D8;RARCH_INTERNAL;WANT_ZLIB;SINC_LOWER_QUALITY;HAVE_THREADS;HAVE_FILTERS_BUILTIN" MinimalRebuild="TRUE" BasicRuntimeChecks="0" RuntimeLibrary="1" From a3f5590f41e5ceaaadaa55ea3d354aee27e0a975 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 01:23:09 +0100 Subject: [PATCH 172/427] remove dependence on configuration.h inside task_database.c --- menu/cbs/menu_cbs_scan.c | 12 ++++++++++-- tasks/task_database.c | 13 ++++++------- tasks/tasks_internal.h | 5 ++++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/menu/cbs/menu_cbs_scan.c b/menu/cbs/menu_cbs_scan.c index 12b89cefd6..180d2128f5 100644 --- a/menu/cbs/menu_cbs_scan.c +++ b/menu/cbs/menu_cbs_scan.c @@ -54,6 +54,7 @@ int action_scan_file(const char *path, const char *menu_label = NULL; const char *menu_path = NULL; menu_handle_t *menu = NULL; + settings_t *settings = config_get_ptr(); fullpath[0] = '\0'; @@ -64,7 +65,10 @@ int action_scan_file(const char *path, fill_pathname_join(fullpath, menu_path, path, sizeof(fullpath)); - task_push_dbscan(fullpath, false, handle_dbscan_finished); + task_push_dbscan( + settings->directory.playlist, + settings->path.content_database, + fullpath, false, handle_dbscan_finished); return 0; } @@ -77,6 +81,7 @@ int action_scan_directory(const char *path, const char *menu_label = NULL; const char *menu_path = NULL; menu_handle_t *menu = NULL; + settings_t *settings = config_get_ptr(); fullpath[0] = '\0'; @@ -90,7 +95,10 @@ int action_scan_directory(const char *path, if (path) fill_pathname_join(fullpath, fullpath, path, sizeof(fullpath)); - task_push_dbscan(fullpath, true, handle_dbscan_finished); + task_push_dbscan( + settings->directory.playlist, + settings->path.content_database, + fullpath, true, handle_dbscan_finished); return 0; } diff --git a/tasks/task_database.c b/tasks/task_database.c index a300e833ea..6136d28409 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -28,7 +28,6 @@ #include "../database_info.h" -#include "../configuration.h" #include "../file_path_special.h" #include "../list_special.h" #include "../msg_hash.h" @@ -700,10 +699,12 @@ task_finished: free(dbinfo); } -bool task_push_dbscan(const char *fullpath, +bool task_push_dbscan( + const char *playlist_directory, + const char *content_database, + const char *fullpath, bool directory, retro_task_callback_t cb) { - settings_t *settings = config_get_ptr(); retro_task_t *t = (retro_task_t*)calloc(1, sizeof(*t)); db_handle_t *db = (db_handle_t*)calloc(1, sizeof(db_handle_t)); @@ -714,11 +715,9 @@ bool task_push_dbscan(const char *fullpath, t->state = db; t->callback = cb; - strlcpy(db->playlist_directory, - settings->directory.playlist, + strlcpy(db->playlist_directory, playlist_directory, sizeof(db->playlist_directory)); - strlcpy(db->content_database_path, - settings->path.content_database, + strlcpy(db->content_database_path, content_database, sizeof(db->content_database_path)); if (directory) diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 0d50899867..ae900ee8fa 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -104,7 +104,10 @@ bool task_push_image_load(const char *fullpath, retro_task_callback_t cb, void *userdata); #ifdef HAVE_LIBRETRODB -bool task_push_dbscan(const char *fullpath, +bool task_push_dbscan( + const char *playlist_directory, + const char *content_database, + const char *fullpath, bool directory, retro_task_callback_t cb); #endif From c78991b6a2f28e103eb625b26febbe808a750a65 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 17 Jan 2017 19:41:20 -0500 Subject: [PATCH 173/427] msvc2005 buildfix --- pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj index cd6fe31110..2cbca08e1c 100644 --- a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -143,7 +143,7 @@ OutputFile="$(OutDir)/RetroArch-msvc2005.exe" LinkIncremental="1" GenerateDebugInformation="true" - SubSystem="2" + SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" From 8e52d0af6c3b21b0c9293a9d36f5e9e06bae3284 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 18 Jan 2017 02:02:32 -0500 Subject: [PATCH 174/427] Windows 98 buildfix --- frontend/drivers/platform_win32.c | 16 ++++++++++++++++ pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index 03e79a1054..dcd5f3947b 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -311,18 +311,34 @@ static void frontend_win32_environment_get(int *argc, char *argv[], static uint64_t frontend_win32_get_mem_total(void) { + /* OSes below 2000 don't have the Ex version, and non-Ex cannot work with >4GB RAM */ +#if _WIN32_WINNT > 0x0400 MEMORYSTATUSEX mem_info; mem_info.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&mem_info); return mem_info.ullTotalPhys; +#else + MEMORYSTATUS mem_info; + mem_info.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&mem_info); + return mem_info.dwTotalPhys; +#endif } static uint64_t frontend_win32_get_mem_used(void) { + /* OSes below 2000 don't have the Ex version, and non-Ex cannot work with >4GB RAM */ +#if _WIN32_WINNT > 0x0400 MEMORYSTATUSEX mem_info; mem_info.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&mem_info); return ((frontend_win32_get_mem_total() - mem_info.ullAvailPhys)); +#else + MEMORYSTATUS mem_info; + mem_info.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&mem_info); + return ((frontend_win32_get_mem_total() - mem_info.dwAvailPhys)); +#endif } static void frontend_win32_attach_console(void) diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj index 2cbca08e1c..ed39ed06e1 100644 --- a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(SolutionDir)\..\..\libretro-common\include";"$(SolutionDir)\..\..\libretro-common\include\compat\msvc";"$(SolutionDir)\..\..\gfx\include"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500;_WIN32;RARCH_INTERNAL;HAVE_THREADS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_SHADERPIPELINE;HAVE_OPENGL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;WANT_ZLIB;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_RTHREADS;HAVE_DYNAMIC;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;__STDC_CONSTANT_MACROS" + PreprocessorDefinitions="_WIN32_WINNT=0x0400;_WIN32;RARCH_INTERNAL;HAVE_THREADS;HAVE_D3D;HAVE_D3D9;HAVE_GLSL;HAVE_SHADERPIPELINE;HAVE_OPENGL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_LANGEXTRA;HAVE_FBO;HAVE_ZLIB;HAVE_RPNG;HAVE_RJPEG;HAVE_RBMP;HAVE_RTGA;HAVE_IMAGEVIEWER;HAVE_XMB;WANT_ZLIB;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DYLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_RTHREADS;HAVE_DYNAMIC;HAVE_OVERLAY;HAVE_RGUI;HAVE_GL_SYNC;HAVE_MENU;HAVE_7ZIP;HAVE_MATERIALUI;HAVE_LIBRETRODB;HAVE_STB_FONT;__STDC_CONSTANT_MACROS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" From 1c36c395d4b0383b0bf813a4c4978548b216ba26 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 18 Jan 2017 02:08:04 -0500 Subject: [PATCH 175/427] vc2005 version fix --- pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj index ed39ed06e1..6ccefc1c91 100644 --- a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -121,7 +121,7 @@ Date: Wed, 18 Jan 2017 13:41:56 +0100 Subject: [PATCH 176/427] Add diff2.diff --- diff2.diff | 2364 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2364 insertions(+) create mode 100644 diff2.diff diff --git a/diff2.diff b/diff2.diff new file mode 100644 index 0000000000..14d68a640b --- /dev/null +++ b/diff2.diff @@ -0,0 +1,2364 @@ +diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c +index fb5e5d25b..a79c6037f 100644 +--- a/gfx/common/x11_common.c ++++ b/gfx/common/x11_common.c +@@ -323,7 +323,7 @@ void x11_suspend_screensaver(Window wnd, bool enable) + x11_suspend_screensaver_xdg_screensaver(wnd, enable); + } + +-static bool get_video_mode(video_frame_info_t video_info, ++static bool get_video_mode(video_frame_info_t *video_info, + Display *dpy, unsigned width, unsigned height, + XF86VidModeModeInfo *mode, XF86VidModeModeInfo *desktop_mode) + { +@@ -345,7 +345,7 @@ static bool get_video_mode(video_frame_info_t video_info, + + /* If we use black frame insertion, we fake a 60 Hz monitor + * for 120 Hz one, etc, so try to match that. */ +- refresh_mod = video_info.black_frame_insertion ? 0.5f : 1.0f; ++ refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; + + for (i = 0; i < num_modes; i++) + { +@@ -361,7 +361,7 @@ static bool get_video_mode(video_frame_info_t video_info, + continue; + + refresh = refresh_mod * m->dotclock * 1000.0f / (m->htotal * m->vtotal); +- diff = fabsf(refresh - video_info.refresh_rate); ++ diff = fabsf(refresh - video_info->refresh_rate); + + if (!ret || diff < minimum_fps_diff) + { +@@ -375,7 +375,7 @@ static bool get_video_mode(video_frame_info_t video_info, + return ret; + } + +-bool x11_enter_fullscreen(video_frame_info_t video_info, ++bool x11_enter_fullscreen(video_frame_info_t *video_info, + Display *dpy, unsigned width, + unsigned height, XF86VidModeModeInfo *desktop_mode) + { +@@ -715,18 +715,10 @@ bool x11_connect(void) + return true; + } + +-void x11_update_window_title(void *data, video_frame_info_t video_info) ++void x11_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- if (video_monitor_get_fps(video_info, +- buf, sizeof(buf), buf_fps, sizeof(buf_fps))) +- XStoreName(g_x11_dpy, g_x11_win, buf); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); ++ if (video_info->monitor_fps_enable) ++ XStoreName(g_x11_dpy, g_x11_win, video_info->window_text); + } + + bool x11_input_ctx_new(bool true_full) +diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h +index b08db07e0..c4ffec01d 100644 +--- a/gfx/common/x11_common.h ++++ b/gfx/common/x11_common.h +@@ -45,7 +45,7 @@ void x11_save_last_used_monitor(Window win); + void x11_show_mouse(Display *dpy, Window win, bool state); + void x11_windowed_fullscreen(Display *dpy, Window win); + void x11_suspend_screensaver(Window win, bool enable); +-bool x11_enter_fullscreen(video_frame_info_t video_info, ++bool x11_enter_fullscreen(video_frame_info_t *video_info, + Display *dpy, unsigned width, + unsigned height, XF86VidModeModeInfo *desktop_mode); + +@@ -84,7 +84,7 @@ bool x11_alive(void *data); + + bool x11_connect(void); + +-void x11_update_window_title(void *data, video_frame_info_t video_info); ++void x11_update_title(void *data, video_frame_info_t *video_info); + + bool x11_input_ctx_new(bool true_full); + +diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c +index c56ca64b5..b55eb5bd4 100644 +--- a/gfx/drivers/caca_gfx.c ++++ b/gfx/drivers/caca_gfx.c +@@ -94,7 +94,7 @@ static void *caca_gfx_init(const video_info_t *video, + + static bool caca_gfx_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + size_t len = 0; + void *buffer = NULL; +diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c +index 44f36f98f..67afa4e36 100644 +--- a/gfx/drivers/ctr_gfx.c ++++ b/gfx/drivers/ctr_gfx.c +@@ -446,7 +446,7 @@ static void* ctr_init(const video_info_t* video, + static bool ctr_frame(void* data, const void* frame, + unsigned width, unsigned height, + uint64_t frame_count, +- unsigned pitch, const char* msg, video_frame_info_t info) ++ unsigned pitch, const char* msg, video_frame_info_t *video_info) + { + uint32_t diff; + static uint64_t currentTick,lastTick; +diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp +index 46e706e67..abf51ba80 100644 +--- a/gfx/drivers/d3d.cpp ++++ b/gfx/drivers/d3d.cpp +@@ -1368,7 +1368,7 @@ static void d3d_get_overlay_interface(void *data, + static bool d3d_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, + uint64_t frame_count, unsigned pitch, +- const char *msg, video_frame_info_t video_info) ++ const char *msg, video_frame_info_t *video_info) + { + unsigned width, height; + static struct retro_perf_counter d3d_frame = {0}; +@@ -1412,18 +1412,18 @@ static bool d3d_frame(void *data, const void *frame, + /* render_chain() only clears out viewport, + * clear out everything. */ + D3DVIEWPORT screen_vp; +- screen_vp.X = 0; +- screen_vp.Y = 0; +- screen_vp.MinZ = 0; +- screen_vp.MaxZ = 1; +- screen_vp.Width = width; ++ screen_vp.X = 0; ++ screen_vp.Y = 0; ++ screen_vp.MinZ = 0; ++ screen_vp.MaxZ = 1; ++ screen_vp.Width = width; + screen_vp.Height = height; + d3d_set_viewports(d3d->dev, &screen_vp); + d3d_clear(d3d->dev, 0, 0, D3DCLEAR_TARGET, 0, 1, 0); + + /* Insert black frame first, so we + * can screenshot, etc. */ +- if (video_info.black_frame_insertion) ++ if (video_info->black_frame_insertion) + { + if (!d3d_swap(d3d, d3d->dev) || d3d->needs_restore) + return true; +diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c +index 873eced47..1c27cd26f 100644 +--- a/gfx/drivers/dispmanx_gfx.c ++++ b/gfx/drivers/dispmanx_gfx.c +@@ -430,7 +430,7 @@ static void *dispmanx_gfx_init(const video_info_t *video, + + static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + struct dispmanx_video *_dispvars = data; + float aspect = video_driver_get_aspect_ratio(); +@@ -438,7 +438,9 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, + if (!frame) + return true; + +- if (width != _dispvars->core_width || height != _dispvars->core_height || _dispvars->aspect_ratio != aspect) ++ if ( (width != _dispvars->core_width) || ++ (height != _dispvars->core_height) || ++ (_dispvars->aspect_ratio != aspect)) + { + /* Sanity check. */ + if (width == 0 || height == 0) +@@ -467,18 +469,11 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, + settings->video.max_swapchain_images, + 0, + &_dispvars->main_surface); +- ++ + /* We need to recreate the menu surface too, if it exists already, so we + * free it and let dispmanx_set_texture_frame() recreate it as it detects it's NULL.*/ +- if (_dispvars->menu_active && _dispvars->menu_surface) { ++ if (_dispvars->menu_active && _dispvars->menu_surface) + dispmanx_surface_free(_dispvars, &_dispvars->menu_surface); +- } +- } +- +- if (video_info.fps_show) +- { +- char buf[128]; +- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); + } + + /* Update main surface: locate free page, blit and flip. */ +diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c +index 9e2146313..62c22f8b5 100644 +--- a/gfx/drivers/drm_gfx.c ++++ b/gfx/drivers/drm_gfx.c +@@ -744,11 +744,12 @@ static void *drm_gfx_init(const video_info_t *video, + + static bool drm_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + struct drm_video *_drmvars = data; + +- if (width != _drmvars->core_width || height != _drmvars->core_height) ++ if ( ( width != _drmvars->core_width) || ++ (height != _drmvars->core_height)) + { + /* Sanity check. */ + if (width == 0 || height == 0) +@@ -778,14 +779,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, + drm_plane_setup(_drmvars->main_surface); + } + +- if (_drmvars->menu_active) +- { +- char buf[128]; +- buf[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); +- } +- + /* Update main surface: locate free page, blit and flip. */ + drm_surface_update(_drmvars, frame, _drmvars->main_surface); + return true; +diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c +index 68f5132eb..00f0fae39 100644 +--- a/gfx/drivers/exynos_gfx.c ++++ b/gfx/drivers/exynos_gfx.c +@@ -1159,7 +1159,6 @@ static int exynos_render_msg(struct exynos_video *vid, + return exynos_blend_font(pdata); + } + +- + static void *exynos_gfx_init(const video_info_t *video, + const input_driver_t **input, void **input_data) + { +@@ -1273,7 +1272,7 @@ static void exynos_gfx_free(void *data) + + static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + struct exynos_video *vid = data; + struct exynos_page *page = NULL; +@@ -1304,18 +1303,6 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, + goto fail; + } + +- if (video_info.fps_show) +- { +- char buffer[128]; +- char buffer_fps[128]; +- +- buffer[0] = buffer_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buffer, sizeof(buffer), +- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); +- runloop_msg_queue_push(buffer_fps, 1, 1, false); +- } +- + /* If at this point the dimension parameters are still zero, setup some * + * fake blit parameters so that menu and font rendering work properly. */ + if (vid->width == 0 || vid->height == 0) +diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c +index 05f9e0050..b0aecc292 100644 +--- a/gfx/drivers/gdi_gfx.c ++++ b/gfx/drivers/gdi_gfx.c +@@ -146,7 +146,7 @@ error: + + static bool gdi_gfx_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + gfx_ctx_mode_t mode; + RECT rect; +diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c +index 5c42dcce3..09c0bd7dc 100644 +--- a/gfx/drivers/gl.c ++++ b/gfx/drivers/gl.c +@@ -299,11 +299,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, + + video_driver_build_info(&video_info); + +- gl_set_viewport(data, video_info, ++ gl_set_viewport(data, &video_info, + viewport_width, viewport_height, force_full, allow_rotate); + } + +-void gl_set_viewport(void *data, video_frame_info_t video_info, ++void gl_set_viewport(void *data, video_frame_info_t *video_info, + unsigned viewport_width, + unsigned viewport_height, + bool force_full, bool allow_rotate) +@@ -324,7 +324,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, + + video_context_driver_translate_aspect(&aspect_data); + +- if (video_info.scale_integer && !force_full) ++ if (video_info->scale_integer && !force_full) + { + video_viewport_get_scaled_integer(&gl->vp, + viewport_width, viewport_height, +@@ -337,7 +337,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, + float desired_aspect = video_driver_get_aspect_ratio(); + + #if defined(HAVE_MENU) +- if (video_info.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) ++ if (video_info->aspect_ratio_idx == ASPECT_RATIO_CUSTOM) + { + const struct video_viewport *custom = video_viewport_get_custom(); + +@@ -1090,7 +1090,7 @@ static bool gl_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, + uint64_t frame_count, + unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + video_shader_ctx_mvp_t mvp; + video_shader_ctx_coords_t coords; +@@ -1339,7 +1339,7 @@ static bool gl_frame(void *data, const void *frame, + /* Disable BFI during fast forward, slow-motion, + * and pause to prevent flicker. */ + if ( +- video_info.black_frame_insertion ++ video_info->black_frame_insertion + && !input_driver_is_nonblock_state() + && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) + && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) +@@ -1351,7 +1351,7 @@ static bool gl_frame(void *data, const void *frame, + video_context_driver_swap_buffers(video_info); + + #ifdef HAVE_GL_SYNC +- if (video_info.hard_sync && gl->have_sync) ++ if (video_info->hard_sync && gl->have_sync) + { + static struct retro_perf_counter gl_fence = {0}; + +@@ -1361,7 +1361,7 @@ static bool gl_frame(void *data, const void *frame, + gl->fences[gl->fence_count++] = + glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + +- while (gl->fence_count > video_info.hard_sync_frames) ++ while (gl->fence_count > video_info->hard_sync_frames) + { + glClientWaitSync(gl->fences[0], + GL_SYNC_FLUSH_COMMANDS_BIT, 1000000000); +diff --git a/gfx/drivers/gl_renderchains/render_chain_gl.h b/gfx/drivers/gl_renderchains/render_chain_gl.h +index 24886dec0..c329b83fb 100644 +--- a/gfx/drivers/gl_renderchains/render_chain_gl.h ++++ b/gfx/drivers/gl_renderchains/render_chain_gl.h +@@ -49,14 +49,14 @@ void gl_load_texture_data( + const void *frame, unsigned base_size); + + void gl_renderchain_render(gl_t *gl, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + uint64_t frame_count, + const struct video_tex_info *tex_info, + const struct video_tex_info *feedback_info); + + void gl_renderchain_init(gl_t *gl, unsigned fbo_width, unsigned fbo_height); + +-void gl_set_viewport(void *data, video_frame_info_t video_info, ++void gl_set_viewport(void *data, video_frame_info_t *video_info, + unsigned viewport_width, + unsigned viewport_height, bool force_full, bool allow_rotate); + +@@ -70,7 +70,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, + unsigned width, unsigned height, + unsigned vp_width, unsigned vp_height); + +-void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info); ++void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info); + + void gl_check_fbo_dimensions(gl_t *gl); + +diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +index 55d687d81..8cc168118 100644 +--- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c ++++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +@@ -239,7 +239,7 @@ void gl_check_fbo_dimensions(gl_t *gl) + } + } + void gl_renderchain_render(gl_t *gl, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + uint64_t frame_count, + const struct video_tex_info *tex_info, + const struct video_tex_info *feedback_info) +@@ -667,7 +667,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, + } + } + +-void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info) ++void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info) + { + glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); + glBindFramebuffer(RARCH_GL_FRAMEBUFFER, gl->fbo[0]); +diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c +index d2ed4cb64..9b9439cf5 100644 +--- a/gfx/drivers/gx_gfx.c ++++ b/gfx/drivers/gx_gfx.c +@@ -1438,7 +1438,7 @@ static bool gx_frame(void *data, const void *frame, + unsigned width, unsigned height, + uint64_t frame_count, unsigned pitch, + const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + char fps_txt[128]; + char fps_text_buf[128]; +@@ -1538,10 +1538,7 @@ static bool gx_frame(void *data, const void *frame, + + GX_DrawDone(); + +- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), +- fps_text_buf, sizeof(fps_text_buf)); +- +- if (video_info.fps_show) ++ if (video_info->fps_show) + { + char mem1_txt[128]; + char mem2_txt[128]; +diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c +index 2a9adebf5..30708f4df 100644 +--- a/gfx/drivers/nullgfx.c ++++ b/gfx/drivers/nullgfx.c +@@ -32,7 +32,7 @@ static void *null_gfx_init(const video_info_t *video, + + static bool null_gfx_frame(void *data, const void *frame, + unsigned width, unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + (void)data; + (void)frame; +diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c +index af46ff768..1344865ea 100644 +--- a/gfx/drivers/omap_gfx.c ++++ b/gfx/drivers/omap_gfx.c +@@ -985,7 +985,7 @@ fail: + + static bool omap_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + omap_video_t *vid = (omap_video_t*)data; + +diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c +index 47887c0d0..2fbd141fc 100644 +--- a/gfx/drivers/psp1_gfx.c ++++ b/gfx/drivers/psp1_gfx.c +@@ -467,7 +467,7 @@ static void *psp_init(const video_info_t *video, + + static bool psp_frame(void *data, const void *frame, + unsigned width, unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + #ifdef DISPLAY_FPS + uint32_t diff; +@@ -476,8 +476,6 @@ static bool psp_frame(void *data, const void *frame, + static float fps = 0.0; + #endif + static struct retro_perf_counter psp_frame_run = {0}; +- static char fps_txt[128] = {0}; +- static char fps_text_buf[128] = {0}; + psp1_video_t *psp = (psp1_video_t*)data; + + if (!width || !height) +@@ -495,14 +493,10 @@ static bool psp_frame(void *data, const void *frame, + + pspDebugScreenSetXY(0,0); + +- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), +- video_info.fps_show ? fps_text_buf : NULL, +- video_info.fps_show ? sizeof(fps_text_buf) : 0); +- +- if (video_info.fps_show) ++ if (video_info->fps_show) + { +- pspDebugScreenSetXY(68 - strlen(fps_text_buf) - 1,0); +- pspDebugScreenPuts(fps_text_buf); ++ pspDebugScreenSetXY(68 - strlen(video_info->fps_text) - 1,0); ++ pspDebugScreenPuts(video_info->fps_text); + pspDebugScreenSetXY(0,1); + } + +diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c +index 6d216d898..438abdeb4 100644 +--- a/gfx/drivers/sdl2_gfx.c ++++ b/gfx/drivers/sdl2_gfx.c +@@ -498,13 +498,10 @@ static void check_window(sdl2_video_t *vid) + + static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { +- char buf[128]; + sdl2_video_t *vid = (sdl2_video_t*)data; + +- buf[0] = '\0'; +- + if (vid->should_resize) + sdl_refresh_viewport(vid); + +@@ -536,8 +533,8 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, + + SDL_RenderPresent(vid->renderer); + +- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) +- SDL_SetWindowTitle(vid->window, buf); ++ if (video_info->monitor_fps_enable) ++ SDL_SetWindowTitle(vid->window, video_info->window_text); + + return true; + } +diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c +index 45bdf8f1d..787c8d8c5 100644 +--- a/gfx/drivers/sdl_gfx.c ++++ b/gfx/drivers/sdl_gfx.c +@@ -331,17 +331,14 @@ static void sdl_gfx_check_window(sdl_video_t *vid) + + static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { +- char buf[128]; + static struct retro_perf_counter sdl_scale = {0}; + sdl_video_t *vid = (sdl_video_t*)data; + + if (!frame) + return true; + +- buf[0] = '\0'; +- + if (SDL_MUSTLOCK(vid->screen)) + SDL_LockSurface(vid->screen); + +@@ -370,8 +367,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, + if (SDL_MUSTLOCK(vid->screen)) + SDL_UnlockSurface(vid->screen); + +- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) +- SDL_WM_SetCaption(buf, NULL); ++ if (video_info->monitor_fps_enable) ++ SDL_WM_SetCaption(video_info->window_text, NULL); + + SDL_Flip(vid->screen); + +diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c +index da03c2333..c01cb7919 100644 +--- a/gfx/drivers/sunxi_gfx.c ++++ b/gfx/drivers/sunxi_gfx.c +@@ -763,7 +763,7 @@ static void sunxi_setup_scale (void *data, + + static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + struct sunxi_video *_dispvars = (struct sunxi_video*)data; + +@@ -781,11 +781,6 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, + + if (_dispvars->menu_active) + { +- char buf[128]; +- +- buf[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); + ioctl(_dispvars->sunxi_disp->fd_fb, FBIO_WAITFORVSYNC, 0); + return true; + } +diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c +index 91451518d..7791b9b5e 100644 +--- a/gfx/drivers/vg.c ++++ b/gfx/drivers/vg.c +@@ -378,7 +378,7 @@ static void vg_copy_frame(void *data, const void *frame, + static bool vg_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, + uint64_t frame_count, unsigned pitch, const char *msg, +- video_frame_info_t video_info) ++ video_frame_info_t *video_info) + { + unsigned width, height; + vg_t *vg = (vg_t*)data; +diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c +index 6d01afac3..bf784591e 100644 +--- a/gfx/drivers/vita2d_gfx.c ++++ b/gfx/drivers/vita2d_gfx.c +@@ -133,54 +133,55 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita); + + static bool vita2d_gfx_frame(void *data, const void *frame, + unsigned width, unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + void *tex_p; + vita_video_t *vita = (vita_video_t *)data; +- ++ + if (frame) + { +- if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)){ +- unsigned i; +- unsigned int stride; +- +- if ((width != vita->width || height != vita->height) && vita->texture) +- { +- vita2d_free_texture(vita->texture); +- vita->texture = NULL; +- } +- +- if (!vita->texture) +- { +- RARCH_LOG("Creating texture: %ix%i\n", width, height); +- vita->width = width; +- vita->height = height; +- vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); +- vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); +- } +- tex_p = vita2d_texture_get_datap(vita->texture); +- stride = vita2d_texture_get_stride(vita->texture); +- +- if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) +- { +- stride /= 4; +- pitch /= 4; +- uint32_t *tex32 = tex_p; +- const uint32_t *frame32 = frame; +- +- for (i = 0; i < height; i++) +- memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); +- } +- else +- { +- stride /= 2; +- pitch /= 2; +- uint16_t *tex16 = tex_p; +- const uint16_t *frame16 = frame; +- +- for (i = 0; i < height; i++) +- memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); +- } ++ if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)) ++ { ++ unsigned i; ++ unsigned int stride; ++ ++ if ((width != vita->width || height != vita->height) && vita->texture) ++ { ++ vita2d_free_texture(vita->texture); ++ vita->texture = NULL; ++ } ++ ++ if (!vita->texture) ++ { ++ RARCH_LOG("Creating texture: %ix%i\n", width, height); ++ vita->width = width; ++ vita->height = height; ++ vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); ++ vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); ++ } ++ tex_p = vita2d_texture_get_datap(vita->texture); ++ stride = vita2d_texture_get_stride(vita->texture); ++ ++ if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) ++ { ++ stride /= 4; ++ pitch /= 4; ++ uint32_t *tex32 = tex_p; ++ const uint32_t *frame32 = frame; ++ ++ for (i = 0; i < height; i++) ++ memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); ++ } ++ else ++ { ++ stride /= 2; ++ pitch /= 2; ++ uint16_t *tex16 = tex_p; ++ const uint16_t *frame16 = frame; ++ ++ for (i = 0; i < height; i++) ++ memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); ++ } + } + } + +@@ -188,9 +189,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, + vita2d_gfx_update_viewport(vita); + + vita2d_start_drawing(); +- ++ + vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,vita2d_get_clear_color()); +- ++ + if (vita->texture) + { + if (vita->fullscreen) +@@ -205,21 +206,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, + float scalex = vita->vp.width / (float)vita->width; + float scaley = vita->vp.height / (float)vita->height; + vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x, +- vita->vp.y, scalex, scaley, rad); ++ vita->vp.y, scalex, scaley, rad); + } + } +- +- if (video_info.fps_show) +- { +- char buffer[128]; +- char buffer_fps[128]; +- +- buffer[0] = buffer_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buffer, sizeof(buffer), +- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); +- runloop_msg_queue_push(buffer_fps, 1, 1, false); +- } + + #ifdef HAVE_OVERLAY + if (vita->overlay_enable) +@@ -228,43 +217,39 @@ static bool vita2d_gfx_frame(void *data, const void *frame, + + if (vita->menu.active) + { +- menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); +- +- if(vita->menu.texture){ +- if (vita->fullscreen) +- vita2d_draw_texture_scale(vita->menu.texture, +- 0, 0, +- PSP_FB_WIDTH / (float)vita->menu.width, +- PSP_FB_HEIGHT / (float)vita->menu.height); +- else +- { +- if (vita->menu.width > vita->menu.height) +- { +- float scale = PSP_FB_HEIGHT / (float)vita->menu.height; +- float w = vita->menu.width * scale; +- vita2d_draw_texture_scale(vita->menu.texture, +- PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, +- scale, scale); +- } +- else +- { +- float scale = PSP_FB_WIDTH / (float)vita->menu.width; +- float h = vita->menu.height * scale; +- vita2d_draw_texture_scale(vita->menu.texture, +- 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, +- scale, scale); +- } +- } +- } +- +- +- ++ menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); ++ ++ if(vita->menu.texture){ ++ if (vita->fullscreen) ++ vita2d_draw_texture_scale(vita->menu.texture, ++ 0, 0, ++ PSP_FB_WIDTH / (float)vita->menu.width, ++ PSP_FB_HEIGHT / (float)vita->menu.height); ++ else ++ { ++ if (vita->menu.width > vita->menu.height) ++ { ++ float scale = PSP_FB_HEIGHT / (float)vita->menu.height; ++ float w = vita->menu.width * scale; ++ vita2d_draw_texture_scale(vita->menu.texture, ++ PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, ++ scale, scale); ++ } ++ else ++ { ++ float scale = PSP_FB_WIDTH / (float)vita->menu.width; ++ float h = vita->menu.height * scale; ++ vita2d_draw_texture_scale(vita->menu.texture, ++ 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, ++ scale, scale); ++ } ++ } ++ } + } +- +- ++ + if(!string_is_empty(msg)) +- font_driver_render_msg(NULL, msg, NULL); +- ++ font_driver_render_msg(NULL, msg, NULL); ++ + vita2d_end_drawing(); + vita2d_swap_buffers(); + +diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c +index 4f5cfd04c..a9c2e958a 100644 +--- a/gfx/drivers/vulkan.c ++++ b/gfx/drivers/vulkan.c +@@ -1463,7 +1463,7 @@ static void vulkan_readback(vk_t *vk) + VK_PIPELINE_STAGE_HOST_BIT); + } + +-static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) ++static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info) + { + VkCommandBufferBeginInfo begin_info = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; +@@ -1520,7 +1520,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) + static bool vulkan_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, + uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + struct vk_per_frame *chain; + unsigned width, height; +@@ -1931,7 +1931,7 @@ static bool vulkan_frame(void *data, const void *frame, + /* Disable BFI during fast forward, slow-motion, + * and pause to prevent flicker. */ + if ( +- video_info.black_frame_insertion ++ video_info->black_frame_insertion + && !input_driver_is_nonblock_state() + && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) + && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) +diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c +index 2055b2d7f..928993e1e 100644 +--- a/gfx/drivers/wiiu_gfx.c ++++ b/gfx/drivers/wiiu_gfx.c +@@ -550,7 +550,7 @@ static void wiiu_gfx_free(void* data) + + static bool wiiu_gfx_frame(void* data, const void* frame, + unsigned width, unsigned height, uint64_t frame_count, +- unsigned pitch, const char* msg, video_frame_info_t video_info) ++ unsigned pitch, const char* msg, video_frame_info_t *video_info) + { + (void)msg; + int i; +diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c +index eeb99f5c1..97efef122 100644 +--- a/gfx/drivers/xenon360_gfx.c ++++ b/gfx/drivers/xenon360_gfx.c +@@ -192,7 +192,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * + } + + static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, +- uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t video_info) ++ uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + gl_t *vid = data; + +diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c +index 8bb8ec947..1a5704aee 100644 +--- a/gfx/drivers/xshm_gfx.c ++++ b/gfx/drivers/xshm_gfx.c +@@ -94,7 +94,7 @@ static void *xshm_gfx_init(const video_info_t *video, + + static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + xshm_t* xshm = (xshm_t*)data; + int y; +diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c +index d8fce331b..782771bda 100644 +--- a/gfx/drivers/xvideo.c ++++ b/gfx/drivers/xvideo.c +@@ -530,8 +530,8 @@ static void *xv_init(const video_info_t *video, + + video_driver_build_info(&video_info); + +- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) +- XStoreName(g_x11_dpy, g_x11_win, buf); ++ if (video_info.monitor_fps_enable) ++ XStoreName(g_x11_dpy, g_x11_win, video_info.window_text); + + x11_set_window_attr(g_x11_dpy, g_x11_win); + +@@ -784,7 +784,7 @@ static void xv_render_msg(xv_t *xv, const char *msg, + + static bool xv_frame(void *data, const void *frame, unsigned width, + unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + XWindowAttributes target; + xv_t *xv = (xv_t*)data; +@@ -811,7 +811,7 @@ static bool xv_frame(void *data, const void *frame, unsigned width, + true); + XSync(g_x11_dpy, False); + +- x11_update_window_title(NULL, video_info); ++ x11_update_title(NULL, video_info); + + return true; + } +diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c +index ee672c8b9..805849557 100644 +--- a/gfx/drivers_context/android_ctx.c ++++ b/gfx/drivers_context/android_ctx.c +@@ -314,21 +314,12 @@ static bool android_gfx_ctx_set_resize(void *data, + return false; + } + +-static void android_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) ++static void android_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool android_gfx_ctx_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -493,7 +484,7 @@ dpi_fallback: + return true; + } + +-static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) ++static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) + { + android_ctx_data_t *and = (android_ctx_data_t*)data; + +@@ -618,7 +609,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { + NULL, /* get_video_output_next */ + android_gfx_ctx_get_metrics, + NULL, +- android_gfx_ctx_update_window_title, ++ android_gfx_ctx_update_title, + android_gfx_ctx_check_window, + android_gfx_ctx_set_resize, + android_gfx_ctx_has_focus, +diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c +index b5412a189..6403d6ed3 100644 +--- a/gfx/drivers_context/cgl_ctx.c ++++ b/gfx/drivers_context/cgl_ctx.c +@@ -95,7 +95,7 @@ static void gfx_ctx_cgl_check_window(void *data, bool *quit, + } + } + +-static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t *video_info) + { + gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)data; + +@@ -110,22 +110,12 @@ static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) + return false; + } + +-static void gfx_ctx_cgl_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_cgl_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + +- + static bool gfx_ctx_cgl_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m +index 566869809..487638385 100644 +--- a/gfx/drivers_context/cocoa_gl_ctx.m ++++ b/gfx/drivers_context/cocoa_gl_ctx.m +@@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) + } + + static bool cocoagl_gfx_ctx_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, bool fullscreen) + { + #if defined(HAVE_COCOA) +@@ -416,27 +416,17 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned + *height = CGRectGetHeight(size) * screenscale; + } + +-static void cocoagl_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) ++static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) + { + #if defined(HAVE_COCOA) + ui_window_cocoa_t view; +- const ui_window_t *window = NULL; +-#endif +- static char buf_fps[128] = {0}; +- static char buf[128] = {0}; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- +-#if defined(HAVE_COCOA) +- window = ui_companion_driver_get_window_ptr(); ++ const ui_window_t *window = ui_companion_driver_get_window_ptr(); ++ + view.data = (CocoaView*)nsview_get_ptr(); + +- if (window && *buf) +- window->set_title(&view, buf); ++ if (window && video_info->monitor_fps_enable) ++ window->set_title(&view, video_info->window_text); + #endif +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, +@@ -537,7 +527,7 @@ static bool cocoagl_gfx_ctx_has_windowed(void *data) + #endif + } + +-static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) ++static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) + { + if (!(--g_fast_forward_skips < 0)) + return; +diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp +index f5d4233bb..9c6acaaaf 100644 +--- a/gfx/drivers_context/d3d_ctx.cpp ++++ b/gfx/drivers_context/d3d_ctx.cpp +@@ -76,7 +76,7 @@ static bool gfx_ctx_d3d_set_resize(void *data, unsigned new_width, unsigned new_ + return true; + } + +-static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t *video_info) + { + d3d_video_t *d3d = (d3d_video_t*)data; + LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; +@@ -84,25 +84,11 @@ static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) + d3d_swap(d3d, d3dr); + } + +-static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buffer_fps[128]; +- const ui_window_t *window = ui_companion_driver_get_window_ptr(); +- +- buf[0] = buffer_fps[0] = '\0'; +- +- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), +- buffer_fps, sizeof(buffer_fps))) +- { +-#ifndef _XBOX +- window->set_title(&main_window, buf); +-#endif +- } +- +- if (video_info.fps_show) +- { + #ifdef _XBOX ++ if (video_info->fps_show) ++ { + MEMORYSTATUS stat; + char mem[128]; + +@@ -111,10 +97,15 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) + GlobalMemoryStatus(&stat); + snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", + stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); +- strlcat(buffer_fps, mem, sizeof(buffer_fps)); +-#endif +- runloop_msg_queue_push(buffer_fps, 1, 1, false); ++ strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); + } ++#else ++ const ui_window_t *window = ui_companion_driver_get_window_ptr(); ++ ++ if (window && video_info->monitor_fps_enable) ++ window->set_title(&main_window, video_info->window_text); ++#endif ++ + } + + static void gfx_ctx_d3d_show_mouse(void *data, bool state) +@@ -197,7 +188,7 @@ static void gfx_ctx_d3d_input_driver(void *data, + } + + static bool gfx_ctx_d3d_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c +index b8738d316..2956e4762 100644 +--- a/gfx/drivers_context/drm_ctx.c ++++ b/gfx/drivers_context/drm_ctx.c +@@ -225,7 +225,7 @@ static bool gfx_ctx_drm_queue_flip(void) + return false; + } + +-static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t *video_info) + { + gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; + +@@ -253,7 +253,7 @@ static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) + waiting_for_flip = gfx_ctx_drm_queue_flip(); + + /* Triple-buffered page flips */ +- if (video_info.max_swapchain_images >= 3 && ++ if (video_info->max_swapchain_images >= 3 && + gbm_surface_has_free_buffers(g_gbm_surface)) + return; + +@@ -270,18 +270,8 @@ static bool gfx_ctx_drm_set_resize(void *data, + return false; + } + +-static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- +- if (video_info.fps_show) +- runloop_msg_queue_push( buf_fps, 1, 1, false); + } + + static void gfx_ctx_drm_get_video_size(void *data, +@@ -617,7 +607,7 @@ error: + #endif + + static bool gfx_ctx_drm_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -634,7 +624,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, + /* If we use black frame insertion, + * we fake a 60 Hz monitor for 120 Hz one, + * etc, so try to match that. */ +- refresh_mod = video_info.black_frame_insertion ++ refresh_mod = video_info->black_frame_insertion + ? 0.5f : 1.0f; + + /* Find desired video mode, and use that. +@@ -660,7 +650,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, + continue; + + diff = fabsf(refresh_mod * g_drm_connector->modes[i].vrefresh +- - video_info.refresh_rate); ++ - video_info->refresh_rate); + + if (!g_drm_mode || diff < minimum_fps_diff) + { +diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c +index 1b750a368..6e5c5eb85 100644 +--- a/gfx/drivers_context/emscriptenegl_ctx.c ++++ b/gfx/drivers_context/emscriptenegl_ctx.c +@@ -75,7 +75,7 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, + *quit = false; + } + +-static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t *video_info) + { + (void)data; + /* no-op in emscripten, no way to force swap/wait for VSync in browsers */ +@@ -90,17 +90,8 @@ static bool gfx_ctx_emscripten_set_resize(void *data, + return false; + } + +-static void gfx_ctx_emscripten_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_emscripten_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static void gfx_ctx_emscripten_get_video_size(void *data, +@@ -189,7 +180,7 @@ error: + } + + static bool gfx_ctx_emscripten_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -330,7 +321,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { + NULL, /* get_video_output_next */ + NULL, /* get_metrics */ + gfx_ctx_emscripten_translate_aspect, +- gfx_ctx_emscripten_update_window_title, ++ gfx_ctx_emscripten_update_title, + gfx_ctx_emscripten_check_window, + gfx_ctx_emscripten_set_resize, + gfx_ctx_emscripten_has_focus, +diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp +index 7f35a5a99..1c3d30cef 100644 +--- a/gfx/drivers_context/gdi_ctx.cpp ++++ b/gfx/drivers_context/gdi_ctx.cpp +@@ -87,19 +87,12 @@ static bool gfx_ctx_gdi_set_resize(void *data, + return false; + } + +-static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_gdi_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + +- buf[0] = buf_fps[0] = '\0'; +- +- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps))) +- window->set_title(&main_window, buf); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); ++ if (window && video_info->monitor_fps_enable) ++ window->set_title(&main_window, video_info->window_text); + } + + static void gfx_ctx_gdi_get_video_size(void *data, +@@ -190,7 +183,7 @@ static void gfx_ctx_gdi_destroy(void *data) + } + + static bool gfx_ctx_gdi_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -287,7 +280,7 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) + return flags; + } + +-static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t *video_info) + { + (void)data; + +diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c +index f4cf4f63d..90b1cb2de 100644 +--- a/gfx/drivers_context/gfx_null_ctx.c ++++ b/gfx/drivers_context/gfx_null_ctx.c +@@ -35,7 +35,7 @@ static void gfx_ctx_null_check_window(void *data, bool *quit, + (void)resize; + } + +-static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t *video_info) + { + (void)data; + } +@@ -48,10 +48,8 @@ static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) + return false; + } + +-static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t *video_info) + { +- (void)data; +- (void)video_info; + } + + static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) +@@ -62,7 +60,7 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h + } + + static bool gfx_ctx_null_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c +index 80276bae1..c6fcd07e2 100644 +--- a/gfx/drivers_context/khr_display_ctx.c ++++ b/gfx/drivers_context/khr_display_ctx.c +@@ -110,21 +110,12 @@ static bool gfx_ctx_khr_display_set_resize(void *data, + return false; + } + +-static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool gfx_ctx_khr_display_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -201,7 +192,7 @@ static void gfx_ctx_khr_display_set_swap_interval(void *data, unsigned swap_inte + } + } + +-static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t *video_info) + { + khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; + vulkan_present(&khr->vk, khr->vk.context.current_swapchain_index); +diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c +index de76f06ae..977919627 100644 +--- a/gfx/drivers_context/mali_fbdev_ctx.c ++++ b/gfx/drivers_context/mali_fbdev_ctx.c +@@ -158,21 +158,12 @@ static bool gfx_ctx_mali_fbdev_set_resize(void *data, + return false; + } + +-static void gfx_ctx_mali_fbdev_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_mali_fbdev_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -269,7 +260,7 @@ static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, unsigned swap_inter + #endif + } + +-static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t *video_info) + { + mali_ctx_data_t *mali = (mali_ctx_data_t*)data; + +@@ -319,7 +310,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { + NULL, /* get_video_output_next */ + NULL, /* get_metrics */ + NULL, +- gfx_ctx_mali_fbdev_update_window_title, ++ gfx_ctx_mali_fbdev_update_title, + gfx_ctx_mali_fbdev_check_window, + gfx_ctx_mali_fbdev_set_resize, + gfx_ctx_mali_fbdev_has_focus, +diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c +index bab164cad..d613c18a8 100644 +--- a/gfx/drivers_context/opendingux_fbdev_ctx.c ++++ b/gfx/drivers_context/opendingux_fbdev_ctx.c +@@ -141,21 +141,12 @@ static bool gfx_ctx_opendingux_set_resize(void *data, + return false; + } + +-static void gfx_ctx_opendingux_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_opendingux_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool gfx_ctx_opendingux_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -232,7 +223,7 @@ static bool gfx_ctx_opendingux_has_windowed(void *data) + return false; + } + +-static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t *video_info) + { + opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; + +diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c +index f6899ece1..829d6c38b 100644 +--- a/gfx/drivers_context/osmesa_ctx.c ++++ b/gfx/drivers_context/osmesa_ctx.c +@@ -238,7 +238,7 @@ static void osmesa_ctx_swap_interval(void *data, unsigned interval) + } + + static bool osmesa_ctx_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -306,20 +306,8 @@ static void osmesa_ctx_get_video_size(void *data, + *height = osmesa->height; + } + +-static void osmesa_ctx_update_window_title(void *data, video_frame_info_t video_info) ++static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) + { +- static char buf[128] = {0}; +- static char buf_fps[128] = {0}; +- gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; +- +- if (!osmesa) +- return; +- +- video_monitor_get_fps(video_info, buf, +- sizeof(buf), buf_fps, sizeof(buf_fps)); +- +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, +@@ -361,7 +349,7 @@ static bool osmesa_ctx_has_windowed(void *data) + return true; + } + +-static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t video_info) ++static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t *video_info) + { + gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; + osmesa_fifo_accept(osmesa); +@@ -417,7 +405,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = + NULL, /* get_video_output_next */ + NULL, /* get_metrics */ + NULL, /* translate_aspect */ +- osmesa_ctx_update_window_title, ++ osmesa_ctx_update_title, + osmesa_ctx_check_window, + osmesa_ctx_set_resize, + osmesa_ctx_has_focus, +diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c +index fa34420ec..4a26e0b4c 100644 +--- a/gfx/drivers_context/ps3_ctx.c ++++ b/gfx/drivers_context/ps3_ctx.c +@@ -179,7 +179,7 @@ static bool gfx_ctx_ps3_has_windowed(void *data) + return false; + } + +-static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) + { + (void)data; + #ifdef HAVE_LIBDBGFONT +@@ -199,19 +199,8 @@ static bool gfx_ctx_ps3_set_resize(void *data, + return false; + } + +-static void gfx_ctx_ps3_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_ps3_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- (void)data; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static void gfx_ctx_ps3_get_video_size(void *data, +@@ -302,15 +291,10 @@ static void *gfx_ctx_ps3_init(video_frame_info_t video_info, void *video_driver) + } + + static bool gfx_ctx_ps3_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +- global_t *global = global_get_ptr(); +- +- if (!global) +- return false; +- + return true; + } + +@@ -438,7 +422,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { + gfx_ctx_ps3_get_video_output_next, + NULL, /* get_metrics */ + NULL, +- gfx_ctx_ps3_update_window_title, ++ gfx_ctx_ps3_update_title, + gfx_ctx_ps3_check_window, + gfx_ctx_ps3_set_resize, + gfx_ctx_ps3_has_focus, +diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c +index 31ffdbda4..8308f60fc 100644 +--- a/gfx/drivers_context/qnx_ctx.c ++++ b/gfx/drivers_context/qnx_ctx.c +@@ -319,21 +319,12 @@ static bool gfx_ctx_qnx_set_resize(void *data, + return false; + } + +-static void gfx_ctx_qnx_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_qnx_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool gfx_ctx_qnx_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -444,7 +435,7 @@ static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned swap_interval) + #endif + } + +-static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t *video_info) + { + qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; + +@@ -493,7 +484,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { + NULL, /* get_video_output_next */ + gfx_ctx_qnx__get_metrics, + NULL, +- gfx_ctx_qnx_update_window_title, ++ gfx_ctx_qnx_update_title, + gfx_ctx_qnx_check_window, + gfx_ctx_qnx_set_resize, + gfx_ctx_qnx_has_focus, +diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c +index 50dd0c33a..e4c34a819 100644 +--- a/gfx/drivers_context/sdl_gl_ctx.c ++++ b/gfx/drivers_context/sdl_gl_ctx.c +@@ -163,7 +163,7 @@ static void sdl_ctx_swap_interval(void *data, unsigned interval) + } + + static bool sdl_ctx_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -177,7 +177,7 @@ static bool sdl_ctx_set_video_mode(void *data, + + if (fullscreen) + { +- if (video_info.windowed_fullscreen) ++ if (video_info->windowed_fullscreen) + fsflag = SDL_WINDOW_FULLSCREEN_DESKTOP; + else + fsflag = SDL_WINDOW_FULLSCREEN; +@@ -192,7 +192,7 @@ static bool sdl_ctx_set_video_mode(void *data, + } + else + { +- unsigned display = video_info.monitor_index; ++ unsigned display = video_info->monitor_index; + + sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), + SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), +@@ -268,27 +268,18 @@ static void sdl_ctx_get_video_size(void *data, + } + } + +-static void sdl_ctx_update_window_title(void *data, video_frame_info_t video_info) ++static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- if (video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps))) ++ if (video_info->monitor_fps_enable) + { + #ifdef HAVE_SDL2 + gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; + if (sdl) +- SDL_SetWindowTitle(sdl->g_win, buf); ++ SDL_SetWindowTitle(sdl->g_win, video_info->window_text); + #else +- SDL_WM_SetCaption(buf, NULL); ++ SDL_WM_SetCaption(video_info->window_text, NULL); + #endif + } +- +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, +@@ -379,7 +370,7 @@ static bool sdl_ctx_has_windowed(void *data) + return true; + } + +-static void sdl_ctx_swap_buffers(void *data, video_frame_info_t video_info) ++static void sdl_ctx_swap_buffers(void *data, video_frame_info_t *video_info) + { + #ifdef HAVE_SDL2 + gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; +@@ -435,7 +426,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = + NULL, /* get_video_output_next */ + NULL, /* get_metrics */ + NULL, /* translate_aspect */ +- sdl_ctx_update_window_title, ++ sdl_ctx_update_title, + sdl_ctx_check_window, + sdl_ctx_set_resize, + sdl_ctx_has_focus, +diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c +index 959b0571e..090c507ec 100644 +--- a/gfx/drivers_context/vc_egl_ctx.c ++++ b/gfx/drivers_context/vc_egl_ctx.c +@@ -105,17 +105,8 @@ static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) + return false; + } + +-static void gfx_ctx_vc_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_vc_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static void gfx_ctx_vc_get_video_size(void *data, +@@ -319,7 +310,7 @@ static void gfx_ctx_vc_set_swap_interval(void *data, unsigned swap_interval) + } + + static bool gfx_ctx_vc_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -608,7 +599,7 @@ error: + return false; + } + +-static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t *video_info) + { + vc_ctx_data_t *vc = (vc_ctx_data_t*)data; + +@@ -659,7 +650,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { + NULL, /* get_video_output_next */ + NULL, /* get_metrics */ + gfx_ctx_vc_translate_aspect, +- gfx_ctx_vc_update_window_title, ++ gfx_ctx_vc_update_title, + gfx_ctx_vc_check_window, + gfx_ctx_vc_set_resize, + gfx_ctx_vc_has_focus, +diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c +index ac12fc7af..ea10357d0 100644 +--- a/gfx/drivers_context/vivante_fbdev_ctx.c ++++ b/gfx/drivers_context/vivante_fbdev_ctx.c +@@ -145,21 +145,12 @@ static bool gfx_ctx_vivante_set_resize(void *data, + return false; + } + +-static void gfx_ctx_vivante_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_vivante_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; +- +- buf[0] = buf_fps[0] = '\0'; +- +- video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps)); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); + } + + static bool gfx_ctx_vivante_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -246,7 +237,7 @@ static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned swap_interval + #endif + } + +-static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t *video_info) + { + vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; + +@@ -297,7 +288,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { + NULL, /* get_video_output_next */ + NULL, /* get_metrics */ + NULL, +- gfx_ctx_vivante_update_window_title, ++ gfx_ctx_vivante_update_title, + gfx_ctx_vivante_check_window, + gfx_ctx_vivante_set_resize, + gfx_ctx_vivante_has_focus, +diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c +index a59e99f91..13a9990e9 100644 +--- a/gfx/drivers_context/wayland_ctx.c ++++ b/gfx/drivers_context/wayland_ctx.c +@@ -719,20 +719,12 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) + return true; + } + +-static void gfx_ctx_wl_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + +- buf[0] = buf_fps[0] = '\0'; +- +- if (video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps))) +- wl_shell_surface_set_title(wl->shell_surf, buf); +- +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); ++ if (wl && video_info->monitor_fps_enable) ++ wl_shell_surface_set_title(wl->shell_surf, video_info->window_text); + } + + +@@ -1075,7 +1067,7 @@ static void gfx_ctx_wl_set_swap_interval(void *data, unsigned swap_interval) + } + + static bool gfx_ctx_wl_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -1557,7 +1549,7 @@ static void *gfx_ctx_wl_get_context_data(void *data) + } + #endif + +-static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t *video_info) + { + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + +@@ -1676,7 +1668,7 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { + NULL, /* get_video_output_next */ + gfx_ctx_wl_get_metrics, + NULL, +- gfx_ctx_wl_update_window_title, ++ gfx_ctx_wl_update_title, + gfx_ctx_wl_check_window, + gfx_ctx_wl_set_resize, + gfx_ctx_wl_has_focus, +diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp +index fba99cf99..57c38441d 100644 +--- a/gfx/drivers_context/wgl_ctx.cpp ++++ b/gfx/drivers_context/wgl_ctx.cpp +@@ -331,7 +331,7 @@ static void gfx_ctx_wgl_check_window(void *data, bool *quit, + } + } + +-static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t *video_info) + { + (void)data; + +@@ -386,19 +386,12 @@ static bool gfx_ctx_wgl_set_resize(void *data, + return false; + } + +-static void gfx_ctx_wgl_update_window_title(void *data, video_frame_info_t video_info) ++static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) + { +- char buf[128]; +- char buf_fps[128]; + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + +- buf[0] = buf_fps[0] = '\0'; +- +- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), +- buf_fps, sizeof(buf_fps))) +- window->set_title(&main_window, buf); +- if (video_info.fps_show) +- runloop_msg_queue_push(buf_fps, 1, 1, false); ++ if (window && video_info->monitor_fps_enable) ++ window->set_title(&main_window, video_info->window_text); + } + + static void gfx_ctx_wgl_get_video_size(void *data, +@@ -525,7 +518,7 @@ static void gfx_ctx_wgl_destroy(void *data) + } + + static bool gfx_ctx_wgl_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -687,7 +680,7 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { + NULL, /* get_video_output_next */ + gfx_ctx_wgl_get_metrics, + NULL, +- gfx_ctx_wgl_update_window_title, ++ gfx_ctx_wgl_update_title, + gfx_ctx_wgl_check_window, + gfx_ctx_wgl_set_resize, + gfx_ctx_wgl_has_focus, +diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c +index 50a504abc..cb5cac058 100644 +--- a/gfx/drivers_context/x_ctx.c ++++ b/gfx/drivers_context/x_ctx.c +@@ -302,7 +302,7 @@ static void gfx_ctx_x_swap_interval(void *data, unsigned interval) + } + } + +-static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) + { + gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; + +@@ -545,7 +545,7 @@ error: + } + + static bool gfx_ctx_x_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -565,7 +565,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, + if (!x) + return false; + +- windowed_full = video_info.windowed_fullscreen; ++ windowed_full = video_info->windowed_fullscreen; + true_full = false; + + switch (x_api) +@@ -613,8 +613,8 @@ static bool gfx_ctx_x_set_video_mode(void *data, + RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n"); + } + +- if (video_info.monitor_index) +- g_x11_screen = video_info.monitor_index - 1; ++ if (video_info->monitor_index) ++ g_x11_screen = video_info->monitor_index - 1; + + #ifdef HAVE_XINERAMA + if (fullscreen || g_x11_screen != 0) +@@ -662,7 +662,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, + + + x11_set_window_attr(g_x11_dpy, g_x11_win); +- x11_update_window_title(NULL, video_info); ++ x11_update_title(NULL, video_info); + + if (fullscreen) + x11_show_mouse(g_x11_dpy, g_x11_win, false); +@@ -1081,7 +1081,7 @@ const gfx_ctx_driver_t gfx_ctx_x = { + NULL, /* get_video_output_next */ + x11_get_metrics, + NULL, +- x11_update_window_title, ++ x11_update_title, + gfx_ctx_x_check_window, + gfx_ctx_x_set_resize, + x11_has_focus, +diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c +index 133736d84..c375a6861 100644 +--- a/gfx/drivers_context/xegl_ctx.c ++++ b/gfx/drivers_context/xegl_ctx.c +@@ -257,7 +257,7 @@ static EGLint *xegl_fill_attribs(xegl_ctx_data_t *xegl, EGLint *attr) + static void gfx_ctx_xegl_set_swap_interval(void *data, unsigned swap_interval); + + static bool gfx_ctx_xegl_set_video_mode(void *data, +- video_frame_info_t video_info, ++ video_frame_info_t *video_info, + unsigned width, unsigned height, + bool fullscreen) + { +@@ -298,7 +298,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, + ButtonPressMask | ButtonReleaseMask | KeyReleaseMask; + swa.override_redirect = fullscreen ? True : False; + +- if (fullscreen && !video_info.windowed_fullscreen) ++ if (fullscreen && !video_info->windowed_fullscreen) + { + if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height, &xegl->desktop_mode)) + { +@@ -309,8 +309,8 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, + RARCH_ERR("[X/EGL]: Entering true fullscreen failed. Will attempt windowed mode.\n"); + } + +- if (video_info.monitor_index) +- g_x11_screen = video_info.monitor_index - 1; ++ if (video_info->monitor_index) ++ g_x11_screen = video_info->monitor_index - 1; + + #ifdef HAVE_XINERAMA + if (fullscreen || g_x11_screen != 0) +@@ -352,7 +352,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, + goto error; + + x11_set_window_attr(g_x11_dpy, g_x11_win); +- x11_update_window_title(NULL, video_info); ++ x11_update_title(NULL, video_info); + + if (fullscreen) + x11_show_mouse(g_x11_dpy, g_x11_win, false); +@@ -490,7 +490,7 @@ static void gfx_ctx_xegl_show_mouse(void *data, bool state) + x11_show_mouse(g_x11_dpy, g_x11_win, state); + } + +-static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t video_info) ++static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t *video_info) + { + xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; + +@@ -591,7 +591,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = + NULL, /* get_video_output_next */ + x11_get_metrics, + NULL, +- x11_update_window_title, ++ x11_update_title, + x11_check_window, + gfx_ctx_xegl_set_resize, + x11_has_focus, +diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c +index 9bf06e725..254961f58 100644 +--- a/gfx/video_context_driver.c ++++ b/gfx/video_context_driver.c +@@ -456,7 +456,7 @@ bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) + video_driver_build_info(&video_info); + + if (!current_video_context->set_video_mode( +- video_context_data, video_info, mode_info->width, ++ video_context_data, &video_info, mode_info->width, + mode_info->height, mode_info->fullscreen)) + return false; + return true; +diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h +index 55a150c17..9b85f6d31 100644 +--- a/gfx/video_context_driver.h ++++ b/gfx/video_context_driver.h +@@ -78,7 +78,7 @@ typedef struct gfx_ctx_driver + void (*swap_interval)(void *data, unsigned); + + /* Sets video mode. Creates a window, etc. */ +- bool (*set_video_mode)(void*, video_frame_info_t video_info, unsigned, unsigned, bool); ++ bool (*set_video_mode)(void*, video_frame_info_t *video_info, unsigned, unsigned, bool); + + /* Gets current window size. + * If not initialized yet, it returns current screen size. */ +@@ -101,7 +101,7 @@ typedef struct gfx_ctx_driver + float (*translate_aspect)(void*, unsigned, unsigned); + + /* Asks driver to update window title (FPS, etc). */ +- void (*update_window_title)(void*, video_frame_info_t video_info); ++ void (*update_window_title)(void*, video_frame_info_t *video_info); + + /* Queries for resize and quit events. + * Also processes events. */ +@@ -123,7 +123,7 @@ typedef struct gfx_ctx_driver + + /* Swaps buffers. VBlank sync depends on + * earlier calls to swap_interval. */ +- void (*swap_buffers)(void*, video_frame_info_t video_info); ++ void (*swap_buffers)(void*, video_frame_info_t *video_info); + + /* Most video backends will want to use a certain input driver. + * Checks for it here. */ +diff --git a/gfx/video_driver.c b/gfx/video_driver.c +index 9ad62c93b..7146ed805 100644 +--- a/gfx/video_driver.c ++++ b/gfx/video_driver.c +@@ -1057,89 +1057,6 @@ bool video_monitor_fps_statistics(double *refresh_rate, + } + + +-/** +- * video_monitor_get_fps: +- * @buf : string suitable for Window title +- * @size : size of buffer. +- * @buf_fps : string of raw FPS only (optional). +- * @size_fps : size of raw FPS buffer. +- * +- * Get the amount of frames per seconds. +- * +- * Returns: true if framerate per seconds could be obtained, +- * otherwise false. +- * +- **/ +-bool video_monitor_get_fps( +- video_frame_info_t video_info, +- char *buf, size_t size, +- char *buf_fps, size_t size_fps) +-{ +- static retro_time_t curr_time; +- static retro_time_t fps_time; +- retro_time_t new_time = cpu_features_get_time_usec(); +- uint64_t frame_count = 0; +- +- video_driver_threaded_lock(); +- frame_count = video_driver_frame_count; +- video_driver_threaded_unlock(); +- +- *buf = '\0'; +- +- if (frame_count) +- { +- static float last_fps; +- bool ret = false; +- unsigned write_index = video_driver_frame_time_count++ & +- (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); +- +- video_driver_frame_time_samples[write_index] = new_time - fps_time; +- fps_time = new_time; +- +- if ((frame_count % FPS_UPDATE_INTERVAL) == 0) +- { +- char frames_text[64]; +- +- last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); +- curr_time = new_time; +- +- fill_pathname_noext(buf, +- video_driver_title_buf, +- " || ", +- size); +- +- if (video_info.fps_show) +- { +- char fps_text[64]; +- snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); +- strlcat(buf, fps_text, size); +- } +- +- strlcat(buf, "Frames: ", size); +- +- snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, +- (unsigned long long)frame_count); +- +- strlcat(buf, frames_text, size); +- ret = true; +- } +- +- if (buf_fps && video_info.fps_show) +- snprintf(buf_fps, size_fps, "FPS: %6.1f || %s: " STRING_REP_UINT64, +- last_fps, +- msg_hash_to_str(MSG_FRAMES), +- (unsigned long long)frame_count); +- +- return ret; +- } +- +- curr_time = fps_time = new_time; +- strlcpy(buf, video_driver_title_buf, size); +- if (buf_fps) +- strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); +- +- return true; +-} + + float video_driver_get_aspect_ratio(void) + { +@@ -2087,6 +2004,93 @@ unsigned video_pixel_get_alignment(unsigned pitch) + } + + /** ++ * video_monitor_get_fps: ++ * ++ * Get the amount of frames per seconds. ++ * ++ * Returns: true if framerate per seconds could be obtained, ++ * otherwise false. ++ * ++ **/ ++static bool video_monitor_get_fps(video_frame_info_t *video_info) ++{ ++ static retro_time_t curr_time; ++ static retro_time_t fps_time; ++ retro_time_t new_time = cpu_features_get_time_usec(); ++ ++ if (video_info->frame_count) ++ { ++ static float last_fps; ++ bool ret = false; ++ unsigned write_index = video_driver_frame_time_count++ & ++ (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); ++ ++ video_driver_frame_time_samples[write_index] = new_time - fps_time; ++ fps_time = new_time; ++ ++ if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) ++ { ++ char frames_text[64]; ++ ++ last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); ++ curr_time = new_time; ++ ++ fill_pathname_noext(video_info->window_text, ++ video_driver_title_buf, ++ " || ", ++ sizeof(video_info->window_text)); ++ ++ if (video_info->fps_show) ++ { ++ char fps_text[64]; ++ snprintf(video_info->fps_text, ++ sizeof(video_info->fps_text), ++ " FPS: %6.1f || ", last_fps); ++ strlcat(video_info->window_text, ++ fps_text, ++ sizeof(video_info->window_text)); ++ } ++ ++ strlcat(video_info->window_text, ++ "Frames: ", ++ sizeof(video_info->window_text)); ++ ++ snprintf(frames_text, ++ sizeof(frames_text), ++ STRING_REP_UINT64, ++ (unsigned long long)video_info->frame_count); ++ ++ strlcat(video_info->window_text, ++ frames_text, ++ sizeof(video_info->window_text)); ++ ret = true; ++ } ++ ++ if (video_info->fps_text && video_info->fps_show) ++ snprintf( ++ video_info->fps_text, ++ sizeof(video_info->fps_text), ++ "FPS: %6.1f || %s: " STRING_REP_UINT64, ++ last_fps, ++ msg_hash_to_str(MSG_FRAMES), ++ (unsigned long long)video_info->frame_count); ++ ++ return ret; ++ } ++ ++ curr_time = fps_time = new_time; ++ strlcpy(video_info->window_text, ++ video_driver_title_buf, ++ sizeof(video_info->window_text)); ++ if (video_info->fps_text) ++ strlcpy(video_info->fps_text, ++ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), ++ sizeof(video_info->fps_text)); ++ ++ return true; ++} ++ ++/** + * video_driver_frame: + * @data : pointer to data of the video frame. + * @width : width of the video frame. +@@ -2131,6 +2135,13 @@ void video_driver_frame(const void *data, unsigned width, + + video_driver_build_info(&video_info); + ++ video_driver_threaded_lock(); ++ video_info.frame_count = video_driver_frame_count; ++ video_driver_frame_count++; ++ video_driver_threaded_unlock(); ++ ++ video_info.monitor_fps_enable = video_monitor_get_fps(&video_info); ++ + /* Slightly messy code, + * but we really need to do processing before blocking on VSync + * for best possible scheduling. +@@ -2161,16 +2172,14 @@ void video_driver_frame(const void *data, unsigned width, + && video_info.font_enable && msg) + strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); + +- video_driver_threaded_lock(); +- frame_count = video_driver_frame_count; +- video_driver_frame_count++; +- video_driver_threaded_unlock(); +- + if (!current_video || !current_video->frame( + video_driver_data, data, width, height, + frame_count, +- pitch, video_driver_msg, video_info)) ++ pitch, video_driver_msg, &video_info)) + video_driver_active = false; ++ ++ if (video_info.fps_show) ++ runloop_msg_queue_push(video_info.fps_text, 1, 1, false); + } + + void video_driver_display_type_set(enum rarch_display_type type) +@@ -2245,6 +2254,10 @@ void video_driver_build_info(video_frame_info_t *video_info) + video_info->monitor_index = settings->video.monitor_index; + video_info->shared_context = settings->video.shared_context; + video_info->font_enable = settings->video.font_enable; ++ ++ video_info->frame_count = 0; ++ video_info->window_text[0] = '\0'; ++ video_info->fps_text[0] = '\0'; + } + + /** +diff --git a/gfx/video_driver.h b/gfx/video_driver.h +index 768b89660..906deea80 100644 +--- a/gfx/video_driver.h ++++ b/gfx/video_driver.h +@@ -101,6 +101,10 @@ typedef struct video_frame_info + bool fullscreen; + unsigned monitor_index; + bool font_enable; ++ bool monitor_fps_enable; ++ char window_text[128]; ++ char fps_text[128]; ++ uint64_t frame_count; + } video_frame_info_t; + + /* Optionally implemented interface to poke more +@@ -163,7 +167,7 @@ typedef struct video_viewport + typedef bool (*video_driver_frame_t)(void *data, + const void *frame, unsigned width, + unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info); ++ unsigned pitch, const char *msg, video_frame_info_t *video_info); + + typedef struct video_driver + { +@@ -462,25 +466,6 @@ void video_monitor_set_refresh_rate(float hz); + bool video_monitor_fps_statistics(double *refresh_rate, + double *deviation, unsigned *sample_points); + +-/** +- * video_monitor_get_fps: +- * @video_info : information about the video frame +- * @buf : string suitable for Window title +- * @size : size of buffer. +- * @buf_fps : string of raw FPS only (optional). +- * @size_fps : size of raw FPS buffer. +- * +- * Get the amount of frames per seconds. +- * +- * Returns: true if framerate per seconds could be obtained, +- * otherwise false. +- * +- **/ +-bool video_monitor_get_fps( +- video_frame_info_t video_info, +- char *buf, size_t size, +- char *buf_fps, size_t size_fps); +- + unsigned video_pixel_get_alignment(unsigned pitch); + + const video_poke_interface_t *video_driver_get_poke(void); +diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c +index ed868fb1d..0e1bb2c6f 100644 +--- a/gfx/video_thread_wrapper.c ++++ b/gfx/video_thread_wrapper.c +@@ -619,7 +619,7 @@ static void video_thread_loop(void *data) + thr->frame.buffer, thr->frame.width, thr->frame.height, + thr->frame.count, + thr->frame.pitch, *thr->frame.msg ? thr->frame.msg : NULL, +- video_info); ++ &video_info); + } + + slock_unlock(thr->frame.lock); +@@ -706,7 +706,7 @@ static bool video_thread_has_windowed(void *data) + + static bool video_thread_frame(void *data, const void *frame_, + unsigned width, unsigned height, uint64_t frame_count, +- unsigned pitch, const char *msg, video_frame_info_t video_info) ++ unsigned pitch, const char *msg, video_frame_info_t *video_info) + { + unsigned copy_stride; + static struct retro_perf_counter thr_frame = {0}; +@@ -741,7 +741,7 @@ static bool video_thread_frame(void *data, const void *frame_, + { + + retro_time_t target_frame_time = (retro_time_t) +- roundf(1000000 / video_info.refresh_rate); ++ roundf(1000000 / video_info->refresh_rate); + retro_time_t target = thr->last_time + target_frame_time; + + /* Ideally, use absolute time, but that is only a good idea on POSIX. */ From 6f95f48edec867d667c52a8b94f487edef042278 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 13:50:21 +0100 Subject: [PATCH 177/427] Update diff2.diff --- diff2.diff | 2380 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 2379 insertions(+), 1 deletion(-) diff --git a/diff2.diff b/diff2.diff index 14d68a640b..991ecf9bc4 100644 --- a/diff2.diff +++ b/diff2.diff @@ -1,3 +1,2372 @@ +diff --git a/diff2.diff b/diff2.diff +index 14d68a640..e69de29bb 100644 +--- a/diff2.diff ++++ b/diff2.diff +@@ -1,2364 +0,0 @@ +-diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c +-index fb5e5d25b..a79c6037f 100644 +---- a/gfx/common/x11_common.c +-+++ b/gfx/common/x11_common.c +-@@ -323,7 +323,7 @@ void x11_suspend_screensaver(Window wnd, bool enable) +- x11_suspend_screensaver_xdg_screensaver(wnd, enable); +- } +- +--static bool get_video_mode(video_frame_info_t video_info, +-+static bool get_video_mode(video_frame_info_t *video_info, +- Display *dpy, unsigned width, unsigned height, +- XF86VidModeModeInfo *mode, XF86VidModeModeInfo *desktop_mode) +- { +-@@ -345,7 +345,7 @@ static bool get_video_mode(video_frame_info_t video_info, +- +- /* If we use black frame insertion, we fake a 60 Hz monitor +- * for 120 Hz one, etc, so try to match that. */ +-- refresh_mod = video_info.black_frame_insertion ? 0.5f : 1.0f; +-+ refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; +- +- for (i = 0; i < num_modes; i++) +- { +-@@ -361,7 +361,7 @@ static bool get_video_mode(video_frame_info_t video_info, +- continue; +- +- refresh = refresh_mod * m->dotclock * 1000.0f / (m->htotal * m->vtotal); +-- diff = fabsf(refresh - video_info.refresh_rate); +-+ diff = fabsf(refresh - video_info->refresh_rate); +- +- if (!ret || diff < minimum_fps_diff) +- { +-@@ -375,7 +375,7 @@ static bool get_video_mode(video_frame_info_t video_info, +- return ret; +- } +- +--bool x11_enter_fullscreen(video_frame_info_t video_info, +-+bool x11_enter_fullscreen(video_frame_info_t *video_info, +- Display *dpy, unsigned width, +- unsigned height, XF86VidModeModeInfo *desktop_mode) +- { +-@@ -715,18 +715,10 @@ bool x11_connect(void) +- return true; +- } +- +--void x11_update_window_title(void *data, video_frame_info_t video_info) +-+void x11_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- if (video_monitor_get_fps(video_info, +-- buf, sizeof(buf), buf_fps, sizeof(buf_fps))) +-- XStoreName(g_x11_dpy, g_x11_win, buf); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +-+ if (video_info->monitor_fps_enable) +-+ XStoreName(g_x11_dpy, g_x11_win, video_info->window_text); +- } +- +- bool x11_input_ctx_new(bool true_full) +-diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h +-index b08db07e0..c4ffec01d 100644 +---- a/gfx/common/x11_common.h +-+++ b/gfx/common/x11_common.h +-@@ -45,7 +45,7 @@ void x11_save_last_used_monitor(Window win); +- void x11_show_mouse(Display *dpy, Window win, bool state); +- void x11_windowed_fullscreen(Display *dpy, Window win); +- void x11_suspend_screensaver(Window win, bool enable); +--bool x11_enter_fullscreen(video_frame_info_t video_info, +-+bool x11_enter_fullscreen(video_frame_info_t *video_info, +- Display *dpy, unsigned width, +- unsigned height, XF86VidModeModeInfo *desktop_mode); +- +-@@ -84,7 +84,7 @@ bool x11_alive(void *data); +- +- bool x11_connect(void); +- +--void x11_update_window_title(void *data, video_frame_info_t video_info); +-+void x11_update_title(void *data, video_frame_info_t *video_info); +- +- bool x11_input_ctx_new(bool true_full); +- +-diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c +-index c56ca64b5..b55eb5bd4 100644 +---- a/gfx/drivers/caca_gfx.c +-+++ b/gfx/drivers/caca_gfx.c +-@@ -94,7 +94,7 @@ static void *caca_gfx_init(const video_info_t *video, +- +- static bool caca_gfx_frame(void *data, const void *frame, +- unsigned frame_width, unsigned frame_height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- size_t len = 0; +- void *buffer = NULL; +-diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c +-index 44f36f98f..67afa4e36 100644 +---- a/gfx/drivers/ctr_gfx.c +-+++ b/gfx/drivers/ctr_gfx.c +-@@ -446,7 +446,7 @@ static void* ctr_init(const video_info_t* video, +- static bool ctr_frame(void* data, const void* frame, +- unsigned width, unsigned height, +- uint64_t frame_count, +-- unsigned pitch, const char* msg, video_frame_info_t info) +-+ unsigned pitch, const char* msg, video_frame_info_t *video_info) +- { +- uint32_t diff; +- static uint64_t currentTick,lastTick; +-diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp +-index 46e706e67..abf51ba80 100644 +---- a/gfx/drivers/d3d.cpp +-+++ b/gfx/drivers/d3d.cpp +-@@ -1368,7 +1368,7 @@ static void d3d_get_overlay_interface(void *data, +- static bool d3d_frame(void *data, const void *frame, +- unsigned frame_width, unsigned frame_height, +- uint64_t frame_count, unsigned pitch, +-- const char *msg, video_frame_info_t video_info) +-+ const char *msg, video_frame_info_t *video_info) +- { +- unsigned width, height; +- static struct retro_perf_counter d3d_frame = {0}; +-@@ -1412,18 +1412,18 @@ static bool d3d_frame(void *data, const void *frame, +- /* render_chain() only clears out viewport, +- * clear out everything. */ +- D3DVIEWPORT screen_vp; +-- screen_vp.X = 0; +-- screen_vp.Y = 0; +-- screen_vp.MinZ = 0; +-- screen_vp.MaxZ = 1; +-- screen_vp.Width = width; +-+ screen_vp.X = 0; +-+ screen_vp.Y = 0; +-+ screen_vp.MinZ = 0; +-+ screen_vp.MaxZ = 1; +-+ screen_vp.Width = width; +- screen_vp.Height = height; +- d3d_set_viewports(d3d->dev, &screen_vp); +- d3d_clear(d3d->dev, 0, 0, D3DCLEAR_TARGET, 0, 1, 0); +- +- /* Insert black frame first, so we +- * can screenshot, etc. */ +-- if (video_info.black_frame_insertion) +-+ if (video_info->black_frame_insertion) +- { +- if (!d3d_swap(d3d, d3d->dev) || d3d->needs_restore) +- return true; +-diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c +-index 873eced47..1c27cd26f 100644 +---- a/gfx/drivers/dispmanx_gfx.c +-+++ b/gfx/drivers/dispmanx_gfx.c +-@@ -430,7 +430,7 @@ static void *dispmanx_gfx_init(const video_info_t *video, +- +- static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- struct dispmanx_video *_dispvars = data; +- float aspect = video_driver_get_aspect_ratio(); +-@@ -438,7 +438,9 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, +- if (!frame) +- return true; +- +-- if (width != _dispvars->core_width || height != _dispvars->core_height || _dispvars->aspect_ratio != aspect) +-+ if ( (width != _dispvars->core_width) || +-+ (height != _dispvars->core_height) || +-+ (_dispvars->aspect_ratio != aspect)) +- { +- /* Sanity check. */ +- if (width == 0 || height == 0) +-@@ -467,18 +469,11 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, +- settings->video.max_swapchain_images, +- 0, +- &_dispvars->main_surface); +-- +-+ +- /* We need to recreate the menu surface too, if it exists already, so we +- * free it and let dispmanx_set_texture_frame() recreate it as it detects it's NULL.*/ +-- if (_dispvars->menu_active && _dispvars->menu_surface) { +-+ if (_dispvars->menu_active && _dispvars->menu_surface) +- dispmanx_surface_free(_dispvars, &_dispvars->menu_surface); +-- } +-- } +-- +-- if (video_info.fps_show) +-- { +-- char buf[128]; +-- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); +- } +- +- /* Update main surface: locate free page, blit and flip. */ +-diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c +-index 9e2146313..62c22f8b5 100644 +---- a/gfx/drivers/drm_gfx.c +-+++ b/gfx/drivers/drm_gfx.c +-@@ -744,11 +744,12 @@ static void *drm_gfx_init(const video_info_t *video, +- +- static bool drm_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- struct drm_video *_drmvars = data; +- +-- if (width != _drmvars->core_width || height != _drmvars->core_height) +-+ if ( ( width != _drmvars->core_width) || +-+ (height != _drmvars->core_height)) +- { +- /* Sanity check. */ +- if (width == 0 || height == 0) +-@@ -778,14 +779,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, +- drm_plane_setup(_drmvars->main_surface); +- } +- +-- if (_drmvars->menu_active) +-- { +-- char buf[128]; +-- buf[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); +-- } +-- +- /* Update main surface: locate free page, blit and flip. */ +- drm_surface_update(_drmvars, frame, _drmvars->main_surface); +- return true; +-diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c +-index 68f5132eb..00f0fae39 100644 +---- a/gfx/drivers/exynos_gfx.c +-+++ b/gfx/drivers/exynos_gfx.c +-@@ -1159,7 +1159,6 @@ static int exynos_render_msg(struct exynos_video *vid, +- return exynos_blend_font(pdata); +- } +- +-- +- static void *exynos_gfx_init(const video_info_t *video, +- const input_driver_t **input, void **input_data) +- { +-@@ -1273,7 +1272,7 @@ static void exynos_gfx_free(void *data) +- +- static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- struct exynos_video *vid = data; +- struct exynos_page *page = NULL; +-@@ -1304,18 +1303,6 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, +- goto fail; +- } +- +-- if (video_info.fps_show) +-- { +-- char buffer[128]; +-- char buffer_fps[128]; +-- +-- buffer[0] = buffer_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buffer, sizeof(buffer), +-- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); +-- runloop_msg_queue_push(buffer_fps, 1, 1, false); +-- } +-- +- /* If at this point the dimension parameters are still zero, setup some * +- * fake blit parameters so that menu and font rendering work properly. */ +- if (vid->width == 0 || vid->height == 0) +-diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c +-index 05f9e0050..b0aecc292 100644 +---- a/gfx/drivers/gdi_gfx.c +-+++ b/gfx/drivers/gdi_gfx.c +-@@ -146,7 +146,7 @@ error: +- +- static bool gdi_gfx_frame(void *data, const void *frame, +- unsigned frame_width, unsigned frame_height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- gfx_ctx_mode_t mode; +- RECT rect; +-diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c +-index 5c42dcce3..09c0bd7dc 100644 +---- a/gfx/drivers/gl.c +-+++ b/gfx/drivers/gl.c +-@@ -299,11 +299,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, +- +- video_driver_build_info(&video_info); +- +-- gl_set_viewport(data, video_info, +-+ gl_set_viewport(data, &video_info, +- viewport_width, viewport_height, force_full, allow_rotate); +- } +- +--void gl_set_viewport(void *data, video_frame_info_t video_info, +-+void gl_set_viewport(void *data, video_frame_info_t *video_info, +- unsigned viewport_width, +- unsigned viewport_height, +- bool force_full, bool allow_rotate) +-@@ -324,7 +324,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, +- +- video_context_driver_translate_aspect(&aspect_data); +- +-- if (video_info.scale_integer && !force_full) +-+ if (video_info->scale_integer && !force_full) +- { +- video_viewport_get_scaled_integer(&gl->vp, +- viewport_width, viewport_height, +-@@ -337,7 +337,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, +- float desired_aspect = video_driver_get_aspect_ratio(); +- +- #if defined(HAVE_MENU) +-- if (video_info.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) +-+ if (video_info->aspect_ratio_idx == ASPECT_RATIO_CUSTOM) +- { +- const struct video_viewport *custom = video_viewport_get_custom(); +- +-@@ -1090,7 +1090,7 @@ static bool gl_frame(void *data, const void *frame, +- unsigned frame_width, unsigned frame_height, +- uint64_t frame_count, +- unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- video_shader_ctx_mvp_t mvp; +- video_shader_ctx_coords_t coords; +-@@ -1339,7 +1339,7 @@ static bool gl_frame(void *data, const void *frame, +- /* Disable BFI during fast forward, slow-motion, +- * and pause to prevent flicker. */ +- if ( +-- video_info.black_frame_insertion +-+ video_info->black_frame_insertion +- && !input_driver_is_nonblock_state() +- && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) +- && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) +-@@ -1351,7 +1351,7 @@ static bool gl_frame(void *data, const void *frame, +- video_context_driver_swap_buffers(video_info); +- +- #ifdef HAVE_GL_SYNC +-- if (video_info.hard_sync && gl->have_sync) +-+ if (video_info->hard_sync && gl->have_sync) +- { +- static struct retro_perf_counter gl_fence = {0}; +- +-@@ -1361,7 +1361,7 @@ static bool gl_frame(void *data, const void *frame, +- gl->fences[gl->fence_count++] = +- glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); +- +-- while (gl->fence_count > video_info.hard_sync_frames) +-+ while (gl->fence_count > video_info->hard_sync_frames) +- { +- glClientWaitSync(gl->fences[0], +- GL_SYNC_FLUSH_COMMANDS_BIT, 1000000000); +-diff --git a/gfx/drivers/gl_renderchains/render_chain_gl.h b/gfx/drivers/gl_renderchains/render_chain_gl.h +-index 24886dec0..c329b83fb 100644 +---- a/gfx/drivers/gl_renderchains/render_chain_gl.h +-+++ b/gfx/drivers/gl_renderchains/render_chain_gl.h +-@@ -49,14 +49,14 @@ void gl_load_texture_data( +- const void *frame, unsigned base_size); +- +- void gl_renderchain_render(gl_t *gl, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- uint64_t frame_count, +- const struct video_tex_info *tex_info, +- const struct video_tex_info *feedback_info); +- +- void gl_renderchain_init(gl_t *gl, unsigned fbo_width, unsigned fbo_height); +- +--void gl_set_viewport(void *data, video_frame_info_t video_info, +-+void gl_set_viewport(void *data, video_frame_info_t *video_info, +- unsigned viewport_width, +- unsigned viewport_height, bool force_full, bool allow_rotate); +- +-@@ -70,7 +70,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, +- unsigned width, unsigned height, +- unsigned vp_width, unsigned vp_height); +- +--void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info); +-+void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info); +- +- void gl_check_fbo_dimensions(gl_t *gl); +- +-diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +-index 55d687d81..8cc168118 100644 +---- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +-+++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +-@@ -239,7 +239,7 @@ void gl_check_fbo_dimensions(gl_t *gl) +- } +- } +- void gl_renderchain_render(gl_t *gl, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- uint64_t frame_count, +- const struct video_tex_info *tex_info, +- const struct video_tex_info *feedback_info) +-@@ -667,7 +667,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, +- } +- } +- +--void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info) +-+void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info) +- { +- glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); +- glBindFramebuffer(RARCH_GL_FRAMEBUFFER, gl->fbo[0]); +-diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c +-index d2ed4cb64..9b9439cf5 100644 +---- a/gfx/drivers/gx_gfx.c +-+++ b/gfx/drivers/gx_gfx.c +-@@ -1438,7 +1438,7 @@ static bool gx_frame(void *data, const void *frame, +- unsigned width, unsigned height, +- uint64_t frame_count, unsigned pitch, +- const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- char fps_txt[128]; +- char fps_text_buf[128]; +-@@ -1538,10 +1538,7 @@ static bool gx_frame(void *data, const void *frame, +- +- GX_DrawDone(); +- +-- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), +-- fps_text_buf, sizeof(fps_text_buf)); +-- +-- if (video_info.fps_show) +-+ if (video_info->fps_show) +- { +- char mem1_txt[128]; +- char mem2_txt[128]; +-diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c +-index 2a9adebf5..30708f4df 100644 +---- a/gfx/drivers/nullgfx.c +-+++ b/gfx/drivers/nullgfx.c +-@@ -32,7 +32,7 @@ static void *null_gfx_init(const video_info_t *video, +- +- static bool null_gfx_frame(void *data, const void *frame, +- unsigned width, unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- (void)data; +- (void)frame; +-diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c +-index af46ff768..1344865ea 100644 +---- a/gfx/drivers/omap_gfx.c +-+++ b/gfx/drivers/omap_gfx.c +-@@ -985,7 +985,7 @@ fail: +- +- static bool omap_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- omap_video_t *vid = (omap_video_t*)data; +- +-diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c +-index 47887c0d0..2fbd141fc 100644 +---- a/gfx/drivers/psp1_gfx.c +-+++ b/gfx/drivers/psp1_gfx.c +-@@ -467,7 +467,7 @@ static void *psp_init(const video_info_t *video, +- +- static bool psp_frame(void *data, const void *frame, +- unsigned width, unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- #ifdef DISPLAY_FPS +- uint32_t diff; +-@@ -476,8 +476,6 @@ static bool psp_frame(void *data, const void *frame, +- static float fps = 0.0; +- #endif +- static struct retro_perf_counter psp_frame_run = {0}; +-- static char fps_txt[128] = {0}; +-- static char fps_text_buf[128] = {0}; +- psp1_video_t *psp = (psp1_video_t*)data; +- +- if (!width || !height) +-@@ -495,14 +493,10 @@ static bool psp_frame(void *data, const void *frame, +- +- pspDebugScreenSetXY(0,0); +- +-- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), +-- video_info.fps_show ? fps_text_buf : NULL, +-- video_info.fps_show ? sizeof(fps_text_buf) : 0); +-- +-- if (video_info.fps_show) +-+ if (video_info->fps_show) +- { +-- pspDebugScreenSetXY(68 - strlen(fps_text_buf) - 1,0); +-- pspDebugScreenPuts(fps_text_buf); +-+ pspDebugScreenSetXY(68 - strlen(video_info->fps_text) - 1,0); +-+ pspDebugScreenPuts(video_info->fps_text); +- pspDebugScreenSetXY(0,1); +- } +- +-diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c +-index 6d216d898..438abdeb4 100644 +---- a/gfx/drivers/sdl2_gfx.c +-+++ b/gfx/drivers/sdl2_gfx.c +-@@ -498,13 +498,10 @@ static void check_window(sdl2_video_t *vid) +- +- static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +-- char buf[128]; +- sdl2_video_t *vid = (sdl2_video_t*)data; +- +-- buf[0] = '\0'; +-- +- if (vid->should_resize) +- sdl_refresh_viewport(vid); +- +-@@ -536,8 +533,8 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, +- +- SDL_RenderPresent(vid->renderer); +- +-- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) +-- SDL_SetWindowTitle(vid->window, buf); +-+ if (video_info->monitor_fps_enable) +-+ SDL_SetWindowTitle(vid->window, video_info->window_text); +- +- return true; +- } +-diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c +-index 45bdf8f1d..787c8d8c5 100644 +---- a/gfx/drivers/sdl_gfx.c +-+++ b/gfx/drivers/sdl_gfx.c +-@@ -331,17 +331,14 @@ static void sdl_gfx_check_window(sdl_video_t *vid) +- +- static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +-- char buf[128]; +- static struct retro_perf_counter sdl_scale = {0}; +- sdl_video_t *vid = (sdl_video_t*)data; +- +- if (!frame) +- return true; +- +-- buf[0] = '\0'; +-- +- if (SDL_MUSTLOCK(vid->screen)) +- SDL_LockSurface(vid->screen); +- +-@@ -370,8 +367,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, +- if (SDL_MUSTLOCK(vid->screen)) +- SDL_UnlockSurface(vid->screen); +- +-- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) +-- SDL_WM_SetCaption(buf, NULL); +-+ if (video_info->monitor_fps_enable) +-+ SDL_WM_SetCaption(video_info->window_text, NULL); +- +- SDL_Flip(vid->screen); +- +-diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c +-index da03c2333..c01cb7919 100644 +---- a/gfx/drivers/sunxi_gfx.c +-+++ b/gfx/drivers/sunxi_gfx.c +-@@ -763,7 +763,7 @@ static void sunxi_setup_scale (void *data, +- +- static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- struct sunxi_video *_dispvars = (struct sunxi_video*)data; +- +-@@ -781,11 +781,6 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, +- +- if (_dispvars->menu_active) +- { +-- char buf[128]; +-- +-- buf[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); +- ioctl(_dispvars->sunxi_disp->fd_fb, FBIO_WAITFORVSYNC, 0); +- return true; +- } +-diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c +-index 91451518d..7791b9b5e 100644 +---- a/gfx/drivers/vg.c +-+++ b/gfx/drivers/vg.c +-@@ -378,7 +378,7 @@ static void vg_copy_frame(void *data, const void *frame, +- static bool vg_frame(void *data, const void *frame, +- unsigned frame_width, unsigned frame_height, +- uint64_t frame_count, unsigned pitch, const char *msg, +-- video_frame_info_t video_info) +-+ video_frame_info_t *video_info) +- { +- unsigned width, height; +- vg_t *vg = (vg_t*)data; +-diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c +-index 6d01afac3..bf784591e 100644 +---- a/gfx/drivers/vita2d_gfx.c +-+++ b/gfx/drivers/vita2d_gfx.c +-@@ -133,54 +133,55 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita); +- +- static bool vita2d_gfx_frame(void *data, const void *frame, +- unsigned width, unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- void *tex_p; +- vita_video_t *vita = (vita_video_t *)data; +-- +-+ +- if (frame) +- { +-- if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)){ +-- unsigned i; +-- unsigned int stride; +-- +-- if ((width != vita->width || height != vita->height) && vita->texture) +-- { +-- vita2d_free_texture(vita->texture); +-- vita->texture = NULL; +-- } +-- +-- if (!vita->texture) +-- { +-- RARCH_LOG("Creating texture: %ix%i\n", width, height); +-- vita->width = width; +-- vita->height = height; +-- vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); +-- vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); +-- } +-- tex_p = vita2d_texture_get_datap(vita->texture); +-- stride = vita2d_texture_get_stride(vita->texture); +-- +-- if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) +-- { +-- stride /= 4; +-- pitch /= 4; +-- uint32_t *tex32 = tex_p; +-- const uint32_t *frame32 = frame; +-- +-- for (i = 0; i < height; i++) +-- memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); +-- } +-- else +-- { +-- stride /= 2; +-- pitch /= 2; +-- uint16_t *tex16 = tex_p; +-- const uint16_t *frame16 = frame; +-- +-- for (i = 0; i < height; i++) +-- memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); +-- } +-+ if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)) +-+ { +-+ unsigned i; +-+ unsigned int stride; +-+ +-+ if ((width != vita->width || height != vita->height) && vita->texture) +-+ { +-+ vita2d_free_texture(vita->texture); +-+ vita->texture = NULL; +-+ } +-+ +-+ if (!vita->texture) +-+ { +-+ RARCH_LOG("Creating texture: %ix%i\n", width, height); +-+ vita->width = width; +-+ vita->height = height; +-+ vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); +-+ vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); +-+ } +-+ tex_p = vita2d_texture_get_datap(vita->texture); +-+ stride = vita2d_texture_get_stride(vita->texture); +-+ +-+ if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) +-+ { +-+ stride /= 4; +-+ pitch /= 4; +-+ uint32_t *tex32 = tex_p; +-+ const uint32_t *frame32 = frame; +-+ +-+ for (i = 0; i < height; i++) +-+ memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); +-+ } +-+ else +-+ { +-+ stride /= 2; +-+ pitch /= 2; +-+ uint16_t *tex16 = tex_p; +-+ const uint16_t *frame16 = frame; +-+ +-+ for (i = 0; i < height; i++) +-+ memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); +-+ } +- } +- } +- +-@@ -188,9 +189,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, +- vita2d_gfx_update_viewport(vita); +- +- vita2d_start_drawing(); +-- +-+ +- vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,vita2d_get_clear_color()); +-- +-+ +- if (vita->texture) +- { +- if (vita->fullscreen) +-@@ -205,21 +206,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, +- float scalex = vita->vp.width / (float)vita->width; +- float scaley = vita->vp.height / (float)vita->height; +- vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x, +-- vita->vp.y, scalex, scaley, rad); +-+ vita->vp.y, scalex, scaley, rad); +- } +- } +-- +-- if (video_info.fps_show) +-- { +-- char buffer[128]; +-- char buffer_fps[128]; +-- +-- buffer[0] = buffer_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buffer, sizeof(buffer), +-- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); +-- runloop_msg_queue_push(buffer_fps, 1, 1, false); +-- } +- +- #ifdef HAVE_OVERLAY +- if (vita->overlay_enable) +-@@ -228,43 +217,39 @@ static bool vita2d_gfx_frame(void *data, const void *frame, +- +- if (vita->menu.active) +- { +-- menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); +-- +-- if(vita->menu.texture){ +-- if (vita->fullscreen) +-- vita2d_draw_texture_scale(vita->menu.texture, +-- 0, 0, +-- PSP_FB_WIDTH / (float)vita->menu.width, +-- PSP_FB_HEIGHT / (float)vita->menu.height); +-- else +-- { +-- if (vita->menu.width > vita->menu.height) +-- { +-- float scale = PSP_FB_HEIGHT / (float)vita->menu.height; +-- float w = vita->menu.width * scale; +-- vita2d_draw_texture_scale(vita->menu.texture, +-- PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, +-- scale, scale); +-- } +-- else +-- { +-- float scale = PSP_FB_WIDTH / (float)vita->menu.width; +-- float h = vita->menu.height * scale; +-- vita2d_draw_texture_scale(vita->menu.texture, +-- 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, +-- scale, scale); +-- } +-- } +-- } +-- +-- +-- +-+ menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); +-+ +-+ if(vita->menu.texture){ +-+ if (vita->fullscreen) +-+ vita2d_draw_texture_scale(vita->menu.texture, +-+ 0, 0, +-+ PSP_FB_WIDTH / (float)vita->menu.width, +-+ PSP_FB_HEIGHT / (float)vita->menu.height); +-+ else +-+ { +-+ if (vita->menu.width > vita->menu.height) +-+ { +-+ float scale = PSP_FB_HEIGHT / (float)vita->menu.height; +-+ float w = vita->menu.width * scale; +-+ vita2d_draw_texture_scale(vita->menu.texture, +-+ PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, +-+ scale, scale); +-+ } +-+ else +-+ { +-+ float scale = PSP_FB_WIDTH / (float)vita->menu.width; +-+ float h = vita->menu.height * scale; +-+ vita2d_draw_texture_scale(vita->menu.texture, +-+ 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, +-+ scale, scale); +-+ } +-+ } +-+ } +- } +-- +-- +-+ +- if(!string_is_empty(msg)) +-- font_driver_render_msg(NULL, msg, NULL); +-- +-+ font_driver_render_msg(NULL, msg, NULL); +-+ +- vita2d_end_drawing(); +- vita2d_swap_buffers(); +- +-diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c +-index 4f5cfd04c..a9c2e958a 100644 +---- a/gfx/drivers/vulkan.c +-+++ b/gfx/drivers/vulkan.c +-@@ -1463,7 +1463,7 @@ static void vulkan_readback(vk_t *vk) +- VK_PIPELINE_STAGE_HOST_BIT); +- } +- +--static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) +-+static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info) +- { +- VkCommandBufferBeginInfo begin_info = { +- VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; +-@@ -1520,7 +1520,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) +- static bool vulkan_frame(void *data, const void *frame, +- unsigned frame_width, unsigned frame_height, +- uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- struct vk_per_frame *chain; +- unsigned width, height; +-@@ -1931,7 +1931,7 @@ static bool vulkan_frame(void *data, const void *frame, +- /* Disable BFI during fast forward, slow-motion, +- * and pause to prevent flicker. */ +- if ( +-- video_info.black_frame_insertion +-+ video_info->black_frame_insertion +- && !input_driver_is_nonblock_state() +- && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) +- && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) +-diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c +-index 2055b2d7f..928993e1e 100644 +---- a/gfx/drivers/wiiu_gfx.c +-+++ b/gfx/drivers/wiiu_gfx.c +-@@ -550,7 +550,7 @@ static void wiiu_gfx_free(void* data) +- +- static bool wiiu_gfx_frame(void* data, const void* frame, +- unsigned width, unsigned height, uint64_t frame_count, +-- unsigned pitch, const char* msg, video_frame_info_t video_info) +-+ unsigned pitch, const char* msg, video_frame_info_t *video_info) +- { +- (void)msg; +- int i; +-diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c +-index eeb99f5c1..97efef122 100644 +---- a/gfx/drivers/xenon360_gfx.c +-+++ b/gfx/drivers/xenon360_gfx.c +-@@ -192,7 +192,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * +- } +- +- static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, +-- uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- gl_t *vid = data; +- +-diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c +-index 8bb8ec947..1a5704aee 100644 +---- a/gfx/drivers/xshm_gfx.c +-+++ b/gfx/drivers/xshm_gfx.c +-@@ -94,7 +94,7 @@ static void *xshm_gfx_init(const video_info_t *video, +- +- static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- xshm_t* xshm = (xshm_t*)data; +- int y; +-diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c +-index d8fce331b..782771bda 100644 +---- a/gfx/drivers/xvideo.c +-+++ b/gfx/drivers/xvideo.c +-@@ -530,8 +530,8 @@ static void *xv_init(const video_info_t *video, +- +- video_driver_build_info(&video_info); +- +-- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) +-- XStoreName(g_x11_dpy, g_x11_win, buf); +-+ if (video_info.monitor_fps_enable) +-+ XStoreName(g_x11_dpy, g_x11_win, video_info.window_text); +- +- x11_set_window_attr(g_x11_dpy, g_x11_win); +- +-@@ -784,7 +784,7 @@ static void xv_render_msg(xv_t *xv, const char *msg, +- +- static bool xv_frame(void *data, const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- XWindowAttributes target; +- xv_t *xv = (xv_t*)data; +-@@ -811,7 +811,7 @@ static bool xv_frame(void *data, const void *frame, unsigned width, +- true); +- XSync(g_x11_dpy, False); +- +-- x11_update_window_title(NULL, video_info); +-+ x11_update_title(NULL, video_info); +- +- return true; +- } +-diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c +-index ee672c8b9..805849557 100644 +---- a/gfx/drivers_context/android_ctx.c +-+++ b/gfx/drivers_context/android_ctx.c +-@@ -314,21 +314,12 @@ static bool android_gfx_ctx_set_resize(void *data, +- return false; +- } +- +--static void android_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) +-+static void android_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool android_gfx_ctx_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -493,7 +484,7 @@ dpi_fallback: +- return true; +- } +- +--static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) +-+static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- android_ctx_data_t *and = (android_ctx_data_t*)data; +- +-@@ -618,7 +609,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { +- NULL, /* get_video_output_next */ +- android_gfx_ctx_get_metrics, +- NULL, +-- android_gfx_ctx_update_window_title, +-+ android_gfx_ctx_update_title, +- android_gfx_ctx_check_window, +- android_gfx_ctx_set_resize, +- android_gfx_ctx_has_focus, +-diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c +-index b5412a189..6403d6ed3 100644 +---- a/gfx/drivers_context/cgl_ctx.c +-+++ b/gfx/drivers_context/cgl_ctx.c +-@@ -95,7 +95,7 @@ static void gfx_ctx_cgl_check_window(void *data, bool *quit, +- } +- } +- +--static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)data; +- +-@@ -110,22 +110,12 @@ static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) +- return false; +- } +- +--static void gfx_ctx_cgl_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_cgl_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +-- +- static bool gfx_ctx_cgl_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m +-index 566869809..487638385 100644 +---- a/gfx/drivers_context/cocoa_gl_ctx.m +-+++ b/gfx/drivers_context/cocoa_gl_ctx.m +-@@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) +- } +- +- static bool cocoagl_gfx_ctx_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, bool fullscreen) +- { +- #if defined(HAVE_COCOA) +-@@ -416,27 +416,17 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned +- *height = CGRectGetHeight(size) * screenscale; +- } +- +--static void cocoagl_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) +-+static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) +- { +- #if defined(HAVE_COCOA) +- ui_window_cocoa_t view; +-- const ui_window_t *window = NULL; +--#endif +-- static char buf_fps[128] = {0}; +-- static char buf[128] = {0}; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- +--#if defined(HAVE_COCOA) +-- window = ui_companion_driver_get_window_ptr(); +-+ const ui_window_t *window = ui_companion_driver_get_window_ptr(); +-+ +- view.data = (CocoaView*)nsview_get_ptr(); +- +-- if (window && *buf) +-- window->set_title(&view, buf); +-+ if (window && video_info->monitor_fps_enable) +-+ window->set_title(&view, video_info->window_text); +- #endif +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, +-@@ -537,7 +527,7 @@ static bool cocoagl_gfx_ctx_has_windowed(void *data) +- #endif +- } +- +--static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) +-+static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- if (!(--g_fast_forward_skips < 0)) +- return; +-diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp +-index f5d4233bb..9c6acaaaf 100644 +---- a/gfx/drivers_context/d3d_ctx.cpp +-+++ b/gfx/drivers_context/d3d_ctx.cpp +-@@ -76,7 +76,7 @@ static bool gfx_ctx_d3d_set_resize(void *data, unsigned new_width, unsigned new_ +- return true; +- } +- +--static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- d3d_video_t *d3d = (d3d_video_t*)data; +- LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; +-@@ -84,25 +84,11 @@ static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) +- d3d_swap(d3d, d3dr); +- } +- +--static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buffer_fps[128]; +-- const ui_window_t *window = ui_companion_driver_get_window_ptr(); +-- +-- buf[0] = buffer_fps[0] = '\0'; +-- +-- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buffer_fps, sizeof(buffer_fps))) +-- { +--#ifndef _XBOX +-- window->set_title(&main_window, buf); +--#endif +-- } +-- +-- if (video_info.fps_show) +-- { +- #ifdef _XBOX +-+ if (video_info->fps_show) +-+ { +- MEMORYSTATUS stat; +- char mem[128]; +- +-@@ -111,10 +97,15 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) +- GlobalMemoryStatus(&stat); +- snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", +- stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); +-- strlcat(buffer_fps, mem, sizeof(buffer_fps)); +--#endif +-- runloop_msg_queue_push(buffer_fps, 1, 1, false); +-+ strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); +- } +-+#else +-+ const ui_window_t *window = ui_companion_driver_get_window_ptr(); +-+ +-+ if (window && video_info->monitor_fps_enable) +-+ window->set_title(&main_window, video_info->window_text); +-+#endif +-+ +- } +- +- static void gfx_ctx_d3d_show_mouse(void *data, bool state) +-@@ -197,7 +188,7 @@ static void gfx_ctx_d3d_input_driver(void *data, +- } +- +- static bool gfx_ctx_d3d_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c +-index b8738d316..2956e4762 100644 +---- a/gfx/drivers_context/drm_ctx.c +-+++ b/gfx/drivers_context/drm_ctx.c +-@@ -225,7 +225,7 @@ static bool gfx_ctx_drm_queue_flip(void) +- return false; +- } +- +--static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; +- +-@@ -253,7 +253,7 @@ static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) +- waiting_for_flip = gfx_ctx_drm_queue_flip(); +- +- /* Triple-buffered page flips */ +-- if (video_info.max_swapchain_images >= 3 && +-+ if (video_info->max_swapchain_images >= 3 && +- gbm_surface_has_free_buffers(g_gbm_surface)) +- return; +- +-@@ -270,18 +270,8 @@ static bool gfx_ctx_drm_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- +-- if (video_info.fps_show) +-- runloop_msg_queue_push( buf_fps, 1, 1, false); +- } +- +- static void gfx_ctx_drm_get_video_size(void *data, +-@@ -617,7 +607,7 @@ error: +- #endif +- +- static bool gfx_ctx_drm_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -634,7 +624,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, +- /* If we use black frame insertion, +- * we fake a 60 Hz monitor for 120 Hz one, +- * etc, so try to match that. */ +-- refresh_mod = video_info.black_frame_insertion +-+ refresh_mod = video_info->black_frame_insertion +- ? 0.5f : 1.0f; +- +- /* Find desired video mode, and use that. +-@@ -660,7 +650,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, +- continue; +- +- diff = fabsf(refresh_mod * g_drm_connector->modes[i].vrefresh +-- - video_info.refresh_rate); +-+ - video_info->refresh_rate); +- +- if (!g_drm_mode || diff < minimum_fps_diff) +- { +-diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c +-index 1b750a368..6e5c5eb85 100644 +---- a/gfx/drivers_context/emscriptenegl_ctx.c +-+++ b/gfx/drivers_context/emscriptenegl_ctx.c +-@@ -75,7 +75,7 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, +- *quit = false; +- } +- +--static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- (void)data; +- /* no-op in emscripten, no way to force swap/wait for VSync in browsers */ +-@@ -90,17 +90,8 @@ static bool gfx_ctx_emscripten_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_emscripten_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_emscripten_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static void gfx_ctx_emscripten_get_video_size(void *data, +-@@ -189,7 +180,7 @@ error: +- } +- +- static bool gfx_ctx_emscripten_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -330,7 +321,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { +- NULL, /* get_video_output_next */ +- NULL, /* get_metrics */ +- gfx_ctx_emscripten_translate_aspect, +-- gfx_ctx_emscripten_update_window_title, +-+ gfx_ctx_emscripten_update_title, +- gfx_ctx_emscripten_check_window, +- gfx_ctx_emscripten_set_resize, +- gfx_ctx_emscripten_has_focus, +-diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp +-index 7f35a5a99..1c3d30cef 100644 +---- a/gfx/drivers_context/gdi_ctx.cpp +-+++ b/gfx/drivers_context/gdi_ctx.cpp +-@@ -87,19 +87,12 @@ static bool gfx_ctx_gdi_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_gdi_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +- const ui_window_t *window = ui_companion_driver_get_window_ptr(); +- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps))) +-- window->set_title(&main_window, buf); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +-+ if (window && video_info->monitor_fps_enable) +-+ window->set_title(&main_window, video_info->window_text); +- } +- +- static void gfx_ctx_gdi_get_video_size(void *data, +-@@ -190,7 +183,7 @@ static void gfx_ctx_gdi_destroy(void *data) +- } +- +- static bool gfx_ctx_gdi_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -287,7 +280,7 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) +- return flags; +- } +- +--static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- (void)data; +- +-diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c +-index f4cf4f63d..90b1cb2de 100644 +---- a/gfx/drivers_context/gfx_null_ctx.c +-+++ b/gfx/drivers_context/gfx_null_ctx.c +-@@ -35,7 +35,7 @@ static void gfx_ctx_null_check_window(void *data, bool *quit, +- (void)resize; +- } +- +--static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- (void)data; +- } +-@@ -48,10 +48,8 @@ static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) +- return false; +- } +- +--static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t *video_info) +- { +-- (void)data; +-- (void)video_info; +- } +- +- static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) +-@@ -62,7 +60,7 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h +- } +- +- static bool gfx_ctx_null_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c +-index 80276bae1..c6fcd07e2 100644 +---- a/gfx/drivers_context/khr_display_ctx.c +-+++ b/gfx/drivers_context/khr_display_ctx.c +-@@ -110,21 +110,12 @@ static bool gfx_ctx_khr_display_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool gfx_ctx_khr_display_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -201,7 +192,7 @@ static void gfx_ctx_khr_display_set_swap_interval(void *data, unsigned swap_inte +- } +- } +- +--static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; +- vulkan_present(&khr->vk, khr->vk.context.current_swapchain_index); +-diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c +-index de76f06ae..977919627 100644 +---- a/gfx/drivers_context/mali_fbdev_ctx.c +-+++ b/gfx/drivers_context/mali_fbdev_ctx.c +-@@ -158,21 +158,12 @@ static bool gfx_ctx_mali_fbdev_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_mali_fbdev_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_mali_fbdev_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -269,7 +260,7 @@ static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, unsigned swap_inter +- #endif +- } +- +--static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- mali_ctx_data_t *mali = (mali_ctx_data_t*)data; +- +-@@ -319,7 +310,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { +- NULL, /* get_video_output_next */ +- NULL, /* get_metrics */ +- NULL, +-- gfx_ctx_mali_fbdev_update_window_title, +-+ gfx_ctx_mali_fbdev_update_title, +- gfx_ctx_mali_fbdev_check_window, +- gfx_ctx_mali_fbdev_set_resize, +- gfx_ctx_mali_fbdev_has_focus, +-diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c +-index bab164cad..d613c18a8 100644 +---- a/gfx/drivers_context/opendingux_fbdev_ctx.c +-+++ b/gfx/drivers_context/opendingux_fbdev_ctx.c +-@@ -141,21 +141,12 @@ static bool gfx_ctx_opendingux_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_opendingux_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_opendingux_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool gfx_ctx_opendingux_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -232,7 +223,7 @@ static bool gfx_ctx_opendingux_has_windowed(void *data) +- return false; +- } +- +--static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; +- +-diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c +-index f6899ece1..829d6c38b 100644 +---- a/gfx/drivers_context/osmesa_ctx.c +-+++ b/gfx/drivers_context/osmesa_ctx.c +-@@ -238,7 +238,7 @@ static void osmesa_ctx_swap_interval(void *data, unsigned interval) +- } +- +- static bool osmesa_ctx_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -306,20 +306,8 @@ static void osmesa_ctx_get_video_size(void *data, +- *height = osmesa->height; +- } +- +--static void osmesa_ctx_update_window_title(void *data, video_frame_info_t video_info) +-+static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) +- { +-- static char buf[128] = {0}; +-- static char buf_fps[128] = {0}; +-- gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; +-- +-- if (!osmesa) +-- return; +-- +-- video_monitor_get_fps(video_info, buf, +-- sizeof(buf), buf_fps, sizeof(buf_fps)); +-- +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, +-@@ -361,7 +349,7 @@ static bool osmesa_ctx_has_windowed(void *data) +- return true; +- } +- +--static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t video_info) +-+static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; +- osmesa_fifo_accept(osmesa); +-@@ -417,7 +405,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = +- NULL, /* get_video_output_next */ +- NULL, /* get_metrics */ +- NULL, /* translate_aspect */ +-- osmesa_ctx_update_window_title, +-+ osmesa_ctx_update_title, +- osmesa_ctx_check_window, +- osmesa_ctx_set_resize, +- osmesa_ctx_has_focus, +-diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c +-index fa34420ec..4a26e0b4c 100644 +---- a/gfx/drivers_context/ps3_ctx.c +-+++ b/gfx/drivers_context/ps3_ctx.c +-@@ -179,7 +179,7 @@ static bool gfx_ctx_ps3_has_windowed(void *data) +- return false; +- } +- +--static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- (void)data; +- #ifdef HAVE_LIBDBGFONT +-@@ -199,19 +199,8 @@ static bool gfx_ctx_ps3_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_ps3_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_ps3_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- (void)data; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static void gfx_ctx_ps3_get_video_size(void *data, +-@@ -302,15 +291,10 @@ static void *gfx_ctx_ps3_init(video_frame_info_t video_info, void *video_driver) +- } +- +- static bool gfx_ctx_ps3_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-- global_t *global = global_get_ptr(); +-- +-- if (!global) +-- return false; +-- +- return true; +- } +- +-@@ -438,7 +422,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { +- gfx_ctx_ps3_get_video_output_next, +- NULL, /* get_metrics */ +- NULL, +-- gfx_ctx_ps3_update_window_title, +-+ gfx_ctx_ps3_update_title, +- gfx_ctx_ps3_check_window, +- gfx_ctx_ps3_set_resize, +- gfx_ctx_ps3_has_focus, +-diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c +-index 31ffdbda4..8308f60fc 100644 +---- a/gfx/drivers_context/qnx_ctx.c +-+++ b/gfx/drivers_context/qnx_ctx.c +-@@ -319,21 +319,12 @@ static bool gfx_ctx_qnx_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_qnx_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_qnx_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool gfx_ctx_qnx_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -444,7 +435,7 @@ static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned swap_interval) +- #endif +- } +- +--static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; +- +-@@ -493,7 +484,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { +- NULL, /* get_video_output_next */ +- gfx_ctx_qnx__get_metrics, +- NULL, +-- gfx_ctx_qnx_update_window_title, +-+ gfx_ctx_qnx_update_title, +- gfx_ctx_qnx_check_window, +- gfx_ctx_qnx_set_resize, +- gfx_ctx_qnx_has_focus, +-diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c +-index 50dd0c33a..e4c34a819 100644 +---- a/gfx/drivers_context/sdl_gl_ctx.c +-+++ b/gfx/drivers_context/sdl_gl_ctx.c +-@@ -163,7 +163,7 @@ static void sdl_ctx_swap_interval(void *data, unsigned interval) +- } +- +- static bool sdl_ctx_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -177,7 +177,7 @@ static bool sdl_ctx_set_video_mode(void *data, +- +- if (fullscreen) +- { +-- if (video_info.windowed_fullscreen) +-+ if (video_info->windowed_fullscreen) +- fsflag = SDL_WINDOW_FULLSCREEN_DESKTOP; +- else +- fsflag = SDL_WINDOW_FULLSCREEN; +-@@ -192,7 +192,7 @@ static bool sdl_ctx_set_video_mode(void *data, +- } +- else +- { +-- unsigned display = video_info.monitor_index; +-+ unsigned display = video_info->monitor_index; +- +- sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), +- SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), +-@@ -268,27 +268,18 @@ static void sdl_ctx_get_video_size(void *data, +- } +- } +- +--static void sdl_ctx_update_window_title(void *data, video_frame_info_t video_info) +-+static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- if (video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps))) +-+ if (video_info->monitor_fps_enable) +- { +- #ifdef HAVE_SDL2 +- gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; +- if (sdl) +-- SDL_SetWindowTitle(sdl->g_win, buf); +-+ SDL_SetWindowTitle(sdl->g_win, video_info->window_text); +- #else +-- SDL_WM_SetCaption(buf, NULL); +-+ SDL_WM_SetCaption(video_info->window_text, NULL); +- #endif +- } +-- +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, +-@@ -379,7 +370,7 @@ static bool sdl_ctx_has_windowed(void *data) +- return true; +- } +- +--static void sdl_ctx_swap_buffers(void *data, video_frame_info_t video_info) +-+static void sdl_ctx_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- #ifdef HAVE_SDL2 +- gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; +-@@ -435,7 +426,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = +- NULL, /* get_video_output_next */ +- NULL, /* get_metrics */ +- NULL, /* translate_aspect */ +-- sdl_ctx_update_window_title, +-+ sdl_ctx_update_title, +- sdl_ctx_check_window, +- sdl_ctx_set_resize, +- sdl_ctx_has_focus, +-diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c +-index 959b0571e..090c507ec 100644 +---- a/gfx/drivers_context/vc_egl_ctx.c +-+++ b/gfx/drivers_context/vc_egl_ctx.c +-@@ -105,17 +105,8 @@ static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) +- return false; +- } +- +--static void gfx_ctx_vc_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_vc_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static void gfx_ctx_vc_get_video_size(void *data, +-@@ -319,7 +310,7 @@ static void gfx_ctx_vc_set_swap_interval(void *data, unsigned swap_interval) +- } +- +- static bool gfx_ctx_vc_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -608,7 +599,7 @@ error: +- return false; +- } +- +--static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- vc_ctx_data_t *vc = (vc_ctx_data_t*)data; +- +-@@ -659,7 +650,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { +- NULL, /* get_video_output_next */ +- NULL, /* get_metrics */ +- gfx_ctx_vc_translate_aspect, +-- gfx_ctx_vc_update_window_title, +-+ gfx_ctx_vc_update_title, +- gfx_ctx_vc_check_window, +- gfx_ctx_vc_set_resize, +- gfx_ctx_vc_has_focus, +-diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c +-index ac12fc7af..ea10357d0 100644 +---- a/gfx/drivers_context/vivante_fbdev_ctx.c +-+++ b/gfx/drivers_context/vivante_fbdev_ctx.c +-@@ -145,21 +145,12 @@ static bool gfx_ctx_vivante_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_vivante_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_vivante_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +-- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps)); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +- } +- +- static bool gfx_ctx_vivante_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -246,7 +237,7 @@ static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned swap_interval +- #endif +- } +- +--static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; +- +-@@ -297,7 +288,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { +- NULL, /* get_video_output_next */ +- NULL, /* get_metrics */ +- NULL, +-- gfx_ctx_vivante_update_window_title, +-+ gfx_ctx_vivante_update_title, +- gfx_ctx_vivante_check_window, +- gfx_ctx_vivante_set_resize, +- gfx_ctx_vivante_has_focus, +-diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c +-index a59e99f91..13a9990e9 100644 +---- a/gfx/drivers_context/wayland_ctx.c +-+++ b/gfx/drivers_context/wayland_ctx.c +-@@ -719,20 +719,12 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) +- return true; +- } +- +--static void gfx_ctx_wl_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +- gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; +- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- if (video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps))) +-- wl_shell_surface_set_title(wl->shell_surf, buf); +-- +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +-+ if (wl && video_info->monitor_fps_enable) +-+ wl_shell_surface_set_title(wl->shell_surf, video_info->window_text); +- } +- +- +-@@ -1075,7 +1067,7 @@ static void gfx_ctx_wl_set_swap_interval(void *data, unsigned swap_interval) +- } +- +- static bool gfx_ctx_wl_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -1557,7 +1549,7 @@ static void *gfx_ctx_wl_get_context_data(void *data) +- } +- #endif +- +--static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; +- +-@@ -1676,7 +1668,7 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { +- NULL, /* get_video_output_next */ +- gfx_ctx_wl_get_metrics, +- NULL, +-- gfx_ctx_wl_update_window_title, +-+ gfx_ctx_wl_update_title, +- gfx_ctx_wl_check_window, +- gfx_ctx_wl_set_resize, +- gfx_ctx_wl_has_focus, +-diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp +-index fba99cf99..57c38441d 100644 +---- a/gfx/drivers_context/wgl_ctx.cpp +-+++ b/gfx/drivers_context/wgl_ctx.cpp +-@@ -331,7 +331,7 @@ static void gfx_ctx_wgl_check_window(void *data, bool *quit, +- } +- } +- +--static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- (void)data; +- +-@@ -386,19 +386,12 @@ static bool gfx_ctx_wgl_set_resize(void *data, +- return false; +- } +- +--static void gfx_ctx_wgl_update_window_title(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) +- { +-- char buf[128]; +-- char buf_fps[128]; +- const ui_window_t *window = ui_companion_driver_get_window_ptr(); +- +-- buf[0] = buf_fps[0] = '\0'; +-- +-- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), +-- buf_fps, sizeof(buf_fps))) +-- window->set_title(&main_window, buf); +-- if (video_info.fps_show) +-- runloop_msg_queue_push(buf_fps, 1, 1, false); +-+ if (window && video_info->monitor_fps_enable) +-+ window->set_title(&main_window, video_info->window_text); +- } +- +- static void gfx_ctx_wgl_get_video_size(void *data, +-@@ -525,7 +518,7 @@ static void gfx_ctx_wgl_destroy(void *data) +- } +- +- static bool gfx_ctx_wgl_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -687,7 +680,7 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { +- NULL, /* get_video_output_next */ +- gfx_ctx_wgl_get_metrics, +- NULL, +-- gfx_ctx_wgl_update_window_title, +-+ gfx_ctx_wgl_update_title, +- gfx_ctx_wgl_check_window, +- gfx_ctx_wgl_set_resize, +- gfx_ctx_wgl_has_focus, +-diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c +-index 50a504abc..cb5cac058 100644 +---- a/gfx/drivers_context/x_ctx.c +-+++ b/gfx/drivers_context/x_ctx.c +-@@ -302,7 +302,7 @@ static void gfx_ctx_x_swap_interval(void *data, unsigned interval) +- } +- } +- +--static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; +- +-@@ -545,7 +545,7 @@ error: +- } +- +- static bool gfx_ctx_x_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -565,7 +565,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, +- if (!x) +- return false; +- +-- windowed_full = video_info.windowed_fullscreen; +-+ windowed_full = video_info->windowed_fullscreen; +- true_full = false; +- +- switch (x_api) +-@@ -613,8 +613,8 @@ static bool gfx_ctx_x_set_video_mode(void *data, +- RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n"); +- } +- +-- if (video_info.monitor_index) +-- g_x11_screen = video_info.monitor_index - 1; +-+ if (video_info->monitor_index) +-+ g_x11_screen = video_info->monitor_index - 1; +- +- #ifdef HAVE_XINERAMA +- if (fullscreen || g_x11_screen != 0) +-@@ -662,7 +662,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, +- +- +- x11_set_window_attr(g_x11_dpy, g_x11_win); +-- x11_update_window_title(NULL, video_info); +-+ x11_update_title(NULL, video_info); +- +- if (fullscreen) +- x11_show_mouse(g_x11_dpy, g_x11_win, false); +-@@ -1081,7 +1081,7 @@ const gfx_ctx_driver_t gfx_ctx_x = { +- NULL, /* get_video_output_next */ +- x11_get_metrics, +- NULL, +-- x11_update_window_title, +-+ x11_update_title, +- gfx_ctx_x_check_window, +- gfx_ctx_x_set_resize, +- x11_has_focus, +-diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c +-index 133736d84..c375a6861 100644 +---- a/gfx/drivers_context/xegl_ctx.c +-+++ b/gfx/drivers_context/xegl_ctx.c +-@@ -257,7 +257,7 @@ static EGLint *xegl_fill_attribs(xegl_ctx_data_t *xegl, EGLint *attr) +- static void gfx_ctx_xegl_set_swap_interval(void *data, unsigned swap_interval); +- +- static bool gfx_ctx_xegl_set_video_mode(void *data, +-- video_frame_info_t video_info, +-+ video_frame_info_t *video_info, +- unsigned width, unsigned height, +- bool fullscreen) +- { +-@@ -298,7 +298,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, +- ButtonPressMask | ButtonReleaseMask | KeyReleaseMask; +- swa.override_redirect = fullscreen ? True : False; +- +-- if (fullscreen && !video_info.windowed_fullscreen) +-+ if (fullscreen && !video_info->windowed_fullscreen) +- { +- if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height, &xegl->desktop_mode)) +- { +-@@ -309,8 +309,8 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, +- RARCH_ERR("[X/EGL]: Entering true fullscreen failed. Will attempt windowed mode.\n"); +- } +- +-- if (video_info.monitor_index) +-- g_x11_screen = video_info.monitor_index - 1; +-+ if (video_info->monitor_index) +-+ g_x11_screen = video_info->monitor_index - 1; +- +- #ifdef HAVE_XINERAMA +- if (fullscreen || g_x11_screen != 0) +-@@ -352,7 +352,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, +- goto error; +- +- x11_set_window_attr(g_x11_dpy, g_x11_win); +-- x11_update_window_title(NULL, video_info); +-+ x11_update_title(NULL, video_info); +- +- if (fullscreen) +- x11_show_mouse(g_x11_dpy, g_x11_win, false); +-@@ -490,7 +490,7 @@ static void gfx_ctx_xegl_show_mouse(void *data, bool state) +- x11_show_mouse(g_x11_dpy, g_x11_win, state); +- } +- +--static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t video_info) +-+static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t *video_info) +- { +- xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; +- +-@@ -591,7 +591,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = +- NULL, /* get_video_output_next */ +- x11_get_metrics, +- NULL, +-- x11_update_window_title, +-+ x11_update_title, +- x11_check_window, +- gfx_ctx_xegl_set_resize, +- x11_has_focus, +-diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c +-index 9bf06e725..254961f58 100644 +---- a/gfx/video_context_driver.c +-+++ b/gfx/video_context_driver.c +-@@ -456,7 +456,7 @@ bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) +- video_driver_build_info(&video_info); +- +- if (!current_video_context->set_video_mode( +-- video_context_data, video_info, mode_info->width, +-+ video_context_data, &video_info, mode_info->width, +- mode_info->height, mode_info->fullscreen)) +- return false; +- return true; +-diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h +-index 55a150c17..9b85f6d31 100644 +---- a/gfx/video_context_driver.h +-+++ b/gfx/video_context_driver.h +-@@ -78,7 +78,7 @@ typedef struct gfx_ctx_driver +- void (*swap_interval)(void *data, unsigned); +- +- /* Sets video mode. Creates a window, etc. */ +-- bool (*set_video_mode)(void*, video_frame_info_t video_info, unsigned, unsigned, bool); +-+ bool (*set_video_mode)(void*, video_frame_info_t *video_info, unsigned, unsigned, bool); +- +- /* Gets current window size. +- * If not initialized yet, it returns current screen size. */ +-@@ -101,7 +101,7 @@ typedef struct gfx_ctx_driver +- float (*translate_aspect)(void*, unsigned, unsigned); +- +- /* Asks driver to update window title (FPS, etc). */ +-- void (*update_window_title)(void*, video_frame_info_t video_info); +-+ void (*update_window_title)(void*, video_frame_info_t *video_info); +- +- /* Queries for resize and quit events. +- * Also processes events. */ +-@@ -123,7 +123,7 @@ typedef struct gfx_ctx_driver +- +- /* Swaps buffers. VBlank sync depends on +- * earlier calls to swap_interval. */ +-- void (*swap_buffers)(void*, video_frame_info_t video_info); +-+ void (*swap_buffers)(void*, video_frame_info_t *video_info); +- +- /* Most video backends will want to use a certain input driver. +- * Checks for it here. */ +-diff --git a/gfx/video_driver.c b/gfx/video_driver.c +-index 9ad62c93b..7146ed805 100644 +---- a/gfx/video_driver.c +-+++ b/gfx/video_driver.c +-@@ -1057,89 +1057,6 @@ bool video_monitor_fps_statistics(double *refresh_rate, +- } +- +- +--/** +-- * video_monitor_get_fps: +-- * @buf : string suitable for Window title +-- * @size : size of buffer. +-- * @buf_fps : string of raw FPS only (optional). +-- * @size_fps : size of raw FPS buffer. +-- * +-- * Get the amount of frames per seconds. +-- * +-- * Returns: true if framerate per seconds could be obtained, +-- * otherwise false. +-- * +-- **/ +--bool video_monitor_get_fps( +-- video_frame_info_t video_info, +-- char *buf, size_t size, +-- char *buf_fps, size_t size_fps) +--{ +-- static retro_time_t curr_time; +-- static retro_time_t fps_time; +-- retro_time_t new_time = cpu_features_get_time_usec(); +-- uint64_t frame_count = 0; +-- +-- video_driver_threaded_lock(); +-- frame_count = video_driver_frame_count; +-- video_driver_threaded_unlock(); +-- +-- *buf = '\0'; +-- +-- if (frame_count) +-- { +-- static float last_fps; +-- bool ret = false; +-- unsigned write_index = video_driver_frame_time_count++ & +-- (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); +-- +-- video_driver_frame_time_samples[write_index] = new_time - fps_time; +-- fps_time = new_time; +-- +-- if ((frame_count % FPS_UPDATE_INTERVAL) == 0) +-- { +-- char frames_text[64]; +-- +-- last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); +-- curr_time = new_time; +-- +-- fill_pathname_noext(buf, +-- video_driver_title_buf, +-- " || ", +-- size); +-- +-- if (video_info.fps_show) +-- { +-- char fps_text[64]; +-- snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); +-- strlcat(buf, fps_text, size); +-- } +-- +-- strlcat(buf, "Frames: ", size); +-- +-- snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, +-- (unsigned long long)frame_count); +-- +-- strlcat(buf, frames_text, size); +-- ret = true; +-- } +-- +-- if (buf_fps && video_info.fps_show) +-- snprintf(buf_fps, size_fps, "FPS: %6.1f || %s: " STRING_REP_UINT64, +-- last_fps, +-- msg_hash_to_str(MSG_FRAMES), +-- (unsigned long long)frame_count); +-- +-- return ret; +-- } +-- +-- curr_time = fps_time = new_time; +-- strlcpy(buf, video_driver_title_buf, size); +-- if (buf_fps) +-- strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); +-- +-- return true; +--} +- +- float video_driver_get_aspect_ratio(void) +- { +-@@ -2087,6 +2004,93 @@ unsigned video_pixel_get_alignment(unsigned pitch) +- } +- +- /** +-+ * video_monitor_get_fps: +-+ * +-+ * Get the amount of frames per seconds. +-+ * +-+ * Returns: true if framerate per seconds could be obtained, +-+ * otherwise false. +-+ * +-+ **/ +-+static bool video_monitor_get_fps(video_frame_info_t *video_info) +-+{ +-+ static retro_time_t curr_time; +-+ static retro_time_t fps_time; +-+ retro_time_t new_time = cpu_features_get_time_usec(); +-+ +-+ if (video_info->frame_count) +-+ { +-+ static float last_fps; +-+ bool ret = false; +-+ unsigned write_index = video_driver_frame_time_count++ & +-+ (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); +-+ +-+ video_driver_frame_time_samples[write_index] = new_time - fps_time; +-+ fps_time = new_time; +-+ +-+ if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) +-+ { +-+ char frames_text[64]; +-+ +-+ last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); +-+ curr_time = new_time; +-+ +-+ fill_pathname_noext(video_info->window_text, +-+ video_driver_title_buf, +-+ " || ", +-+ sizeof(video_info->window_text)); +-+ +-+ if (video_info->fps_show) +-+ { +-+ char fps_text[64]; +-+ snprintf(video_info->fps_text, +-+ sizeof(video_info->fps_text), +-+ " FPS: %6.1f || ", last_fps); +-+ strlcat(video_info->window_text, +-+ fps_text, +-+ sizeof(video_info->window_text)); +-+ } +-+ +-+ strlcat(video_info->window_text, +-+ "Frames: ", +-+ sizeof(video_info->window_text)); +-+ +-+ snprintf(frames_text, +-+ sizeof(frames_text), +-+ STRING_REP_UINT64, +-+ (unsigned long long)video_info->frame_count); +-+ +-+ strlcat(video_info->window_text, +-+ frames_text, +-+ sizeof(video_info->window_text)); +-+ ret = true; +-+ } +-+ +-+ if (video_info->fps_text && video_info->fps_show) +-+ snprintf( +-+ video_info->fps_text, +-+ sizeof(video_info->fps_text), +-+ "FPS: %6.1f || %s: " STRING_REP_UINT64, +-+ last_fps, +-+ msg_hash_to_str(MSG_FRAMES), +-+ (unsigned long long)video_info->frame_count); +-+ +-+ return ret; +-+ } +-+ +-+ curr_time = fps_time = new_time; +-+ strlcpy(video_info->window_text, +-+ video_driver_title_buf, +-+ sizeof(video_info->window_text)); +-+ if (video_info->fps_text) +-+ strlcpy(video_info->fps_text, +-+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), +-+ sizeof(video_info->fps_text)); +-+ +-+ return true; +-+} +-+ +-+/** +- * video_driver_frame: +- * @data : pointer to data of the video frame. +- * @width : width of the video frame. +-@@ -2131,6 +2135,13 @@ void video_driver_frame(const void *data, unsigned width, +- +- video_driver_build_info(&video_info); +- +-+ video_driver_threaded_lock(); +-+ video_info.frame_count = video_driver_frame_count; +-+ video_driver_frame_count++; +-+ video_driver_threaded_unlock(); +-+ +-+ video_info.monitor_fps_enable = video_monitor_get_fps(&video_info); +-+ +- /* Slightly messy code, +- * but we really need to do processing before blocking on VSync +- * for best possible scheduling. +-@@ -2161,16 +2172,14 @@ void video_driver_frame(const void *data, unsigned width, +- && video_info.font_enable && msg) +- strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); +- +-- video_driver_threaded_lock(); +-- frame_count = video_driver_frame_count; +-- video_driver_frame_count++; +-- video_driver_threaded_unlock(); +-- +- if (!current_video || !current_video->frame( +- video_driver_data, data, width, height, +- frame_count, +-- pitch, video_driver_msg, video_info)) +-+ pitch, video_driver_msg, &video_info)) +- video_driver_active = false; +-+ +-+ if (video_info.fps_show) +-+ runloop_msg_queue_push(video_info.fps_text, 1, 1, false); +- } +- +- void video_driver_display_type_set(enum rarch_display_type type) +-@@ -2245,6 +2254,10 @@ void video_driver_build_info(video_frame_info_t *video_info) +- video_info->monitor_index = settings->video.monitor_index; +- video_info->shared_context = settings->video.shared_context; +- video_info->font_enable = settings->video.font_enable; +-+ +-+ video_info->frame_count = 0; +-+ video_info->window_text[0] = '\0'; +-+ video_info->fps_text[0] = '\0'; +- } +- +- /** +-diff --git a/gfx/video_driver.h b/gfx/video_driver.h +-index 768b89660..906deea80 100644 +---- a/gfx/video_driver.h +-+++ b/gfx/video_driver.h +-@@ -101,6 +101,10 @@ typedef struct video_frame_info +- bool fullscreen; +- unsigned monitor_index; +- bool font_enable; +-+ bool monitor_fps_enable; +-+ char window_text[128]; +-+ char fps_text[128]; +-+ uint64_t frame_count; +- } video_frame_info_t; +- +- /* Optionally implemented interface to poke more +-@@ -163,7 +167,7 @@ typedef struct video_viewport +- typedef bool (*video_driver_frame_t)(void *data, +- const void *frame, unsigned width, +- unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info); +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info); +- +- typedef struct video_driver +- { +-@@ -462,25 +466,6 @@ void video_monitor_set_refresh_rate(float hz); +- bool video_monitor_fps_statistics(double *refresh_rate, +- double *deviation, unsigned *sample_points); +- +--/** +-- * video_monitor_get_fps: +-- * @video_info : information about the video frame +-- * @buf : string suitable for Window title +-- * @size : size of buffer. +-- * @buf_fps : string of raw FPS only (optional). +-- * @size_fps : size of raw FPS buffer. +-- * +-- * Get the amount of frames per seconds. +-- * +-- * Returns: true if framerate per seconds could be obtained, +-- * otherwise false. +-- * +-- **/ +--bool video_monitor_get_fps( +-- video_frame_info_t video_info, +-- char *buf, size_t size, +-- char *buf_fps, size_t size_fps); +-- +- unsigned video_pixel_get_alignment(unsigned pitch); +- +- const video_poke_interface_t *video_driver_get_poke(void); +-diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c +-index ed868fb1d..0e1bb2c6f 100644 +---- a/gfx/video_thread_wrapper.c +-+++ b/gfx/video_thread_wrapper.c +-@@ -619,7 +619,7 @@ static void video_thread_loop(void *data) +- thr->frame.buffer, thr->frame.width, thr->frame.height, +- thr->frame.count, +- thr->frame.pitch, *thr->frame.msg ? thr->frame.msg : NULL, +-- video_info); +-+ &video_info); +- } +- +- slock_unlock(thr->frame.lock); +-@@ -706,7 +706,7 @@ static bool video_thread_has_windowed(void *data) +- +- static bool video_thread_frame(void *data, const void *frame_, +- unsigned width, unsigned height, uint64_t frame_count, +-- unsigned pitch, const char *msg, video_frame_info_t video_info) +-+ unsigned pitch, const char *msg, video_frame_info_t *video_info) +- { +- unsigned copy_stride; +- static struct retro_perf_counter thr_frame = {0}; +-@@ -741,7 +741,7 @@ static bool video_thread_frame(void *data, const void *frame_, +- { +- +- retro_time_t target_frame_time = (retro_time_t) +-- roundf(1000000 / video_info.refresh_rate); +-+ roundf(1000000 / video_info->refresh_rate); +- retro_time_t target = thr->last_time + target_frame_time; +- +- /* Ideally, use absolute time, but that is only a good idea on POSIX. */ diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index fb5e5d25b..a79c6037f 100644 --- a/gfx/common/x11_common.c @@ -996,7 +3365,7 @@ index b5412a189..6403d6ed3 100644 bool fullscreen) { diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m -index 566869809..487638385 100644 +index 566869809..62b9c0a47 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) @@ -1050,6 +3419,15 @@ index 566869809..487638385 100644 { if (!(--g_fast_forward_skips < 0)) return; +@@ -631,7 +621,7 @@ const gfx_ctx_driver_t gfx_ctx_cocoagl = { + NULL, /* get_video_output_next */ + cocoagl_gfx_ctx_get_metrics, + NULL, +- cocoagl_gfx_ctx_update_window_title, ++ cocoagl_gfx_ctx_update_title, + cocoagl_gfx_ctx_check_window, + cocoagl_gfx_ctx_set_resize, + cocoagl_gfx_ctx_has_focus, diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index f5d4233bb..9c6acaaaf 100644 --- a/gfx/drivers_context/d3d_ctx.cpp From 7ad717cb5cb355e8e84a8bd83120ddc324d62c92 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 13:53:29 +0100 Subject: [PATCH 178/427] Revert "Update diff2.diff" This reverts commit 6f95f48edec867d667c52a8b94f487edef042278. --- diff2.diff | 2380 +--------------------------------------------------- 1 file changed, 1 insertion(+), 2379 deletions(-) diff --git a/diff2.diff b/diff2.diff index 991ecf9bc4..14d68a640b 100644 --- a/diff2.diff +++ b/diff2.diff @@ -1,2372 +1,3 @@ -diff --git a/diff2.diff b/diff2.diff -index 14d68a640..e69de29bb 100644 ---- a/diff2.diff -+++ b/diff2.diff -@@ -1,2364 +0,0 @@ --diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c --index fb5e5d25b..a79c6037f 100644 ----- a/gfx/common/x11_common.c --+++ b/gfx/common/x11_common.c --@@ -323,7 +323,7 @@ void x11_suspend_screensaver(Window wnd, bool enable) -- x11_suspend_screensaver_xdg_screensaver(wnd, enable); -- } -- ---static bool get_video_mode(video_frame_info_t video_info, --+static bool get_video_mode(video_frame_info_t *video_info, -- Display *dpy, unsigned width, unsigned height, -- XF86VidModeModeInfo *mode, XF86VidModeModeInfo *desktop_mode) -- { --@@ -345,7 +345,7 @@ static bool get_video_mode(video_frame_info_t video_info, -- -- /* If we use black frame insertion, we fake a 60 Hz monitor -- * for 120 Hz one, etc, so try to match that. */ --- refresh_mod = video_info.black_frame_insertion ? 0.5f : 1.0f; --+ refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; -- -- for (i = 0; i < num_modes; i++) -- { --@@ -361,7 +361,7 @@ static bool get_video_mode(video_frame_info_t video_info, -- continue; -- -- refresh = refresh_mod * m->dotclock * 1000.0f / (m->htotal * m->vtotal); --- diff = fabsf(refresh - video_info.refresh_rate); --+ diff = fabsf(refresh - video_info->refresh_rate); -- -- if (!ret || diff < minimum_fps_diff) -- { --@@ -375,7 +375,7 @@ static bool get_video_mode(video_frame_info_t video_info, -- return ret; -- } -- ---bool x11_enter_fullscreen(video_frame_info_t video_info, --+bool x11_enter_fullscreen(video_frame_info_t *video_info, -- Display *dpy, unsigned width, -- unsigned height, XF86VidModeModeInfo *desktop_mode) -- { --@@ -715,18 +715,10 @@ bool x11_connect(void) -- return true; -- } -- ---void x11_update_window_title(void *data, video_frame_info_t video_info) --+void x11_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- if (video_monitor_get_fps(video_info, --- buf, sizeof(buf), buf_fps, sizeof(buf_fps))) --- XStoreName(g_x11_dpy, g_x11_win, buf); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); --+ if (video_info->monitor_fps_enable) --+ XStoreName(g_x11_dpy, g_x11_win, video_info->window_text); -- } -- -- bool x11_input_ctx_new(bool true_full) --diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h --index b08db07e0..c4ffec01d 100644 ----- a/gfx/common/x11_common.h --+++ b/gfx/common/x11_common.h --@@ -45,7 +45,7 @@ void x11_save_last_used_monitor(Window win); -- void x11_show_mouse(Display *dpy, Window win, bool state); -- void x11_windowed_fullscreen(Display *dpy, Window win); -- void x11_suspend_screensaver(Window win, bool enable); ---bool x11_enter_fullscreen(video_frame_info_t video_info, --+bool x11_enter_fullscreen(video_frame_info_t *video_info, -- Display *dpy, unsigned width, -- unsigned height, XF86VidModeModeInfo *desktop_mode); -- --@@ -84,7 +84,7 @@ bool x11_alive(void *data); -- -- bool x11_connect(void); -- ---void x11_update_window_title(void *data, video_frame_info_t video_info); --+void x11_update_title(void *data, video_frame_info_t *video_info); -- -- bool x11_input_ctx_new(bool true_full); -- --diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c --index c56ca64b5..b55eb5bd4 100644 ----- a/gfx/drivers/caca_gfx.c --+++ b/gfx/drivers/caca_gfx.c --@@ -94,7 +94,7 @@ static void *caca_gfx_init(const video_info_t *video, -- -- static bool caca_gfx_frame(void *data, const void *frame, -- unsigned frame_width, unsigned frame_height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- size_t len = 0; -- void *buffer = NULL; --diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c --index 44f36f98f..67afa4e36 100644 ----- a/gfx/drivers/ctr_gfx.c --+++ b/gfx/drivers/ctr_gfx.c --@@ -446,7 +446,7 @@ static void* ctr_init(const video_info_t* video, -- static bool ctr_frame(void* data, const void* frame, -- unsigned width, unsigned height, -- uint64_t frame_count, --- unsigned pitch, const char* msg, video_frame_info_t info) --+ unsigned pitch, const char* msg, video_frame_info_t *video_info) -- { -- uint32_t diff; -- static uint64_t currentTick,lastTick; --diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp --index 46e706e67..abf51ba80 100644 ----- a/gfx/drivers/d3d.cpp --+++ b/gfx/drivers/d3d.cpp --@@ -1368,7 +1368,7 @@ static void d3d_get_overlay_interface(void *data, -- static bool d3d_frame(void *data, const void *frame, -- unsigned frame_width, unsigned frame_height, -- uint64_t frame_count, unsigned pitch, --- const char *msg, video_frame_info_t video_info) --+ const char *msg, video_frame_info_t *video_info) -- { -- unsigned width, height; -- static struct retro_perf_counter d3d_frame = {0}; --@@ -1412,18 +1412,18 @@ static bool d3d_frame(void *data, const void *frame, -- /* render_chain() only clears out viewport, -- * clear out everything. */ -- D3DVIEWPORT screen_vp; --- screen_vp.X = 0; --- screen_vp.Y = 0; --- screen_vp.MinZ = 0; --- screen_vp.MaxZ = 1; --- screen_vp.Width = width; --+ screen_vp.X = 0; --+ screen_vp.Y = 0; --+ screen_vp.MinZ = 0; --+ screen_vp.MaxZ = 1; --+ screen_vp.Width = width; -- screen_vp.Height = height; -- d3d_set_viewports(d3d->dev, &screen_vp); -- d3d_clear(d3d->dev, 0, 0, D3DCLEAR_TARGET, 0, 1, 0); -- -- /* Insert black frame first, so we -- * can screenshot, etc. */ --- if (video_info.black_frame_insertion) --+ if (video_info->black_frame_insertion) -- { -- if (!d3d_swap(d3d, d3d->dev) || d3d->needs_restore) -- return true; --diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c --index 873eced47..1c27cd26f 100644 ----- a/gfx/drivers/dispmanx_gfx.c --+++ b/gfx/drivers/dispmanx_gfx.c --@@ -430,7 +430,7 @@ static void *dispmanx_gfx_init(const video_info_t *video, -- -- static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- struct dispmanx_video *_dispvars = data; -- float aspect = video_driver_get_aspect_ratio(); --@@ -438,7 +438,9 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, -- if (!frame) -- return true; -- --- if (width != _dispvars->core_width || height != _dispvars->core_height || _dispvars->aspect_ratio != aspect) --+ if ( (width != _dispvars->core_width) || --+ (height != _dispvars->core_height) || --+ (_dispvars->aspect_ratio != aspect)) -- { -- /* Sanity check. */ -- if (width == 0 || height == 0) --@@ -467,18 +469,11 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, -- settings->video.max_swapchain_images, -- 0, -- &_dispvars->main_surface); --- --+ -- /* We need to recreate the menu surface too, if it exists already, so we -- * free it and let dispmanx_set_texture_frame() recreate it as it detects it's NULL.*/ --- if (_dispvars->menu_active && _dispvars->menu_surface) { --+ if (_dispvars->menu_active && _dispvars->menu_surface) -- dispmanx_surface_free(_dispvars, &_dispvars->menu_surface); --- } --- } --- --- if (video_info.fps_show) --- { --- char buf[128]; --- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); -- } -- -- /* Update main surface: locate free page, blit and flip. */ --diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c --index 9e2146313..62c22f8b5 100644 ----- a/gfx/drivers/drm_gfx.c --+++ b/gfx/drivers/drm_gfx.c --@@ -744,11 +744,12 @@ static void *drm_gfx_init(const video_info_t *video, -- -- static bool drm_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- struct drm_video *_drmvars = data; -- --- if (width != _drmvars->core_width || height != _drmvars->core_height) --+ if ( ( width != _drmvars->core_width) || --+ (height != _drmvars->core_height)) -- { -- /* Sanity check. */ -- if (width == 0 || height == 0) --@@ -778,14 +779,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, -- drm_plane_setup(_drmvars->main_surface); -- } -- --- if (_drmvars->menu_active) --- { --- char buf[128]; --- buf[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); --- } --- -- /* Update main surface: locate free page, blit and flip. */ -- drm_surface_update(_drmvars, frame, _drmvars->main_surface); -- return true; --diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c --index 68f5132eb..00f0fae39 100644 ----- a/gfx/drivers/exynos_gfx.c --+++ b/gfx/drivers/exynos_gfx.c --@@ -1159,7 +1159,6 @@ static int exynos_render_msg(struct exynos_video *vid, -- return exynos_blend_font(pdata); -- } -- --- -- static void *exynos_gfx_init(const video_info_t *video, -- const input_driver_t **input, void **input_data) -- { --@@ -1273,7 +1272,7 @@ static void exynos_gfx_free(void *data) -- -- static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- struct exynos_video *vid = data; -- struct exynos_page *page = NULL; --@@ -1304,18 +1303,6 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, -- goto fail; -- } -- --- if (video_info.fps_show) --- { --- char buffer[128]; --- char buffer_fps[128]; --- --- buffer[0] = buffer_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buffer, sizeof(buffer), --- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); --- runloop_msg_queue_push(buffer_fps, 1, 1, false); --- } --- -- /* If at this point the dimension parameters are still zero, setup some * -- * fake blit parameters so that menu and font rendering work properly. */ -- if (vid->width == 0 || vid->height == 0) --diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c --index 05f9e0050..b0aecc292 100644 ----- a/gfx/drivers/gdi_gfx.c --+++ b/gfx/drivers/gdi_gfx.c --@@ -146,7 +146,7 @@ error: -- -- static bool gdi_gfx_frame(void *data, const void *frame, -- unsigned frame_width, unsigned frame_height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- gfx_ctx_mode_t mode; -- RECT rect; --diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c --index 5c42dcce3..09c0bd7dc 100644 ----- a/gfx/drivers/gl.c --+++ b/gfx/drivers/gl.c --@@ -299,11 +299,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, -- -- video_driver_build_info(&video_info); -- --- gl_set_viewport(data, video_info, --+ gl_set_viewport(data, &video_info, -- viewport_width, viewport_height, force_full, allow_rotate); -- } -- ---void gl_set_viewport(void *data, video_frame_info_t video_info, --+void gl_set_viewport(void *data, video_frame_info_t *video_info, -- unsigned viewport_width, -- unsigned viewport_height, -- bool force_full, bool allow_rotate) --@@ -324,7 +324,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, -- -- video_context_driver_translate_aspect(&aspect_data); -- --- if (video_info.scale_integer && !force_full) --+ if (video_info->scale_integer && !force_full) -- { -- video_viewport_get_scaled_integer(&gl->vp, -- viewport_width, viewport_height, --@@ -337,7 +337,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, -- float desired_aspect = video_driver_get_aspect_ratio(); -- -- #if defined(HAVE_MENU) --- if (video_info.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) --+ if (video_info->aspect_ratio_idx == ASPECT_RATIO_CUSTOM) -- { -- const struct video_viewport *custom = video_viewport_get_custom(); -- --@@ -1090,7 +1090,7 @@ static bool gl_frame(void *data, const void *frame, -- unsigned frame_width, unsigned frame_height, -- uint64_t frame_count, -- unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- video_shader_ctx_mvp_t mvp; -- video_shader_ctx_coords_t coords; --@@ -1339,7 +1339,7 @@ static bool gl_frame(void *data, const void *frame, -- /* Disable BFI during fast forward, slow-motion, -- * and pause to prevent flicker. */ -- if ( --- video_info.black_frame_insertion --+ video_info->black_frame_insertion -- && !input_driver_is_nonblock_state() -- && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) -- && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) --@@ -1351,7 +1351,7 @@ static bool gl_frame(void *data, const void *frame, -- video_context_driver_swap_buffers(video_info); -- -- #ifdef HAVE_GL_SYNC --- if (video_info.hard_sync && gl->have_sync) --+ if (video_info->hard_sync && gl->have_sync) -- { -- static struct retro_perf_counter gl_fence = {0}; -- --@@ -1361,7 +1361,7 @@ static bool gl_frame(void *data, const void *frame, -- gl->fences[gl->fence_count++] = -- glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); -- --- while (gl->fence_count > video_info.hard_sync_frames) --+ while (gl->fence_count > video_info->hard_sync_frames) -- { -- glClientWaitSync(gl->fences[0], -- GL_SYNC_FLUSH_COMMANDS_BIT, 1000000000); --diff --git a/gfx/drivers/gl_renderchains/render_chain_gl.h b/gfx/drivers/gl_renderchains/render_chain_gl.h --index 24886dec0..c329b83fb 100644 ----- a/gfx/drivers/gl_renderchains/render_chain_gl.h --+++ b/gfx/drivers/gl_renderchains/render_chain_gl.h --@@ -49,14 +49,14 @@ void gl_load_texture_data( -- const void *frame, unsigned base_size); -- -- void gl_renderchain_render(gl_t *gl, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- uint64_t frame_count, -- const struct video_tex_info *tex_info, -- const struct video_tex_info *feedback_info); -- -- void gl_renderchain_init(gl_t *gl, unsigned fbo_width, unsigned fbo_height); -- ---void gl_set_viewport(void *data, video_frame_info_t video_info, --+void gl_set_viewport(void *data, video_frame_info_t *video_info, -- unsigned viewport_width, -- unsigned viewport_height, bool force_full, bool allow_rotate); -- --@@ -70,7 +70,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, -- unsigned width, unsigned height, -- unsigned vp_width, unsigned vp_height); -- ---void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info); --+void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info); -- -- void gl_check_fbo_dimensions(gl_t *gl); -- --diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c --index 55d687d81..8cc168118 100644 ----- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c --+++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c --@@ -239,7 +239,7 @@ void gl_check_fbo_dimensions(gl_t *gl) -- } -- } -- void gl_renderchain_render(gl_t *gl, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- uint64_t frame_count, -- const struct video_tex_info *tex_info, -- const struct video_tex_info *feedback_info) --@@ -667,7 +667,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, -- } -- } -- ---void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info) --+void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info) -- { -- glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); -- glBindFramebuffer(RARCH_GL_FRAMEBUFFER, gl->fbo[0]); --diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c --index d2ed4cb64..9b9439cf5 100644 ----- a/gfx/drivers/gx_gfx.c --+++ b/gfx/drivers/gx_gfx.c --@@ -1438,7 +1438,7 @@ static bool gx_frame(void *data, const void *frame, -- unsigned width, unsigned height, -- uint64_t frame_count, unsigned pitch, -- const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- char fps_txt[128]; -- char fps_text_buf[128]; --@@ -1538,10 +1538,7 @@ static bool gx_frame(void *data, const void *frame, -- -- GX_DrawDone(); -- --- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), --- fps_text_buf, sizeof(fps_text_buf)); --- --- if (video_info.fps_show) --+ if (video_info->fps_show) -- { -- char mem1_txt[128]; -- char mem2_txt[128]; --diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c --index 2a9adebf5..30708f4df 100644 ----- a/gfx/drivers/nullgfx.c --+++ b/gfx/drivers/nullgfx.c --@@ -32,7 +32,7 @@ static void *null_gfx_init(const video_info_t *video, -- -- static bool null_gfx_frame(void *data, const void *frame, -- unsigned width, unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- (void)data; -- (void)frame; --diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c --index af46ff768..1344865ea 100644 ----- a/gfx/drivers/omap_gfx.c --+++ b/gfx/drivers/omap_gfx.c --@@ -985,7 +985,7 @@ fail: -- -- static bool omap_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- omap_video_t *vid = (omap_video_t*)data; -- --diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c --index 47887c0d0..2fbd141fc 100644 ----- a/gfx/drivers/psp1_gfx.c --+++ b/gfx/drivers/psp1_gfx.c --@@ -467,7 +467,7 @@ static void *psp_init(const video_info_t *video, -- -- static bool psp_frame(void *data, const void *frame, -- unsigned width, unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- #ifdef DISPLAY_FPS -- uint32_t diff; --@@ -476,8 +476,6 @@ static bool psp_frame(void *data, const void *frame, -- static float fps = 0.0; -- #endif -- static struct retro_perf_counter psp_frame_run = {0}; --- static char fps_txt[128] = {0}; --- static char fps_text_buf[128] = {0}; -- psp1_video_t *psp = (psp1_video_t*)data; -- -- if (!width || !height) --@@ -495,14 +493,10 @@ static bool psp_frame(void *data, const void *frame, -- -- pspDebugScreenSetXY(0,0); -- --- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), --- video_info.fps_show ? fps_text_buf : NULL, --- video_info.fps_show ? sizeof(fps_text_buf) : 0); --- --- if (video_info.fps_show) --+ if (video_info->fps_show) -- { --- pspDebugScreenSetXY(68 - strlen(fps_text_buf) - 1,0); --- pspDebugScreenPuts(fps_text_buf); --+ pspDebugScreenSetXY(68 - strlen(video_info->fps_text) - 1,0); --+ pspDebugScreenPuts(video_info->fps_text); -- pspDebugScreenSetXY(0,1); -- } -- --diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c --index 6d216d898..438abdeb4 100644 ----- a/gfx/drivers/sdl2_gfx.c --+++ b/gfx/drivers/sdl2_gfx.c --@@ -498,13 +498,10 @@ static void check_window(sdl2_video_t *vid) -- -- static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { --- char buf[128]; -- sdl2_video_t *vid = (sdl2_video_t*)data; -- --- buf[0] = '\0'; --- -- if (vid->should_resize) -- sdl_refresh_viewport(vid); -- --@@ -536,8 +533,8 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, -- -- SDL_RenderPresent(vid->renderer); -- --- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) --- SDL_SetWindowTitle(vid->window, buf); --+ if (video_info->monitor_fps_enable) --+ SDL_SetWindowTitle(vid->window, video_info->window_text); -- -- return true; -- } --diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c --index 45bdf8f1d..787c8d8c5 100644 ----- a/gfx/drivers/sdl_gfx.c --+++ b/gfx/drivers/sdl_gfx.c --@@ -331,17 +331,14 @@ static void sdl_gfx_check_window(sdl_video_t *vid) -- -- static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { --- char buf[128]; -- static struct retro_perf_counter sdl_scale = {0}; -- sdl_video_t *vid = (sdl_video_t*)data; -- -- if (!frame) -- return true; -- --- buf[0] = '\0'; --- -- if (SDL_MUSTLOCK(vid->screen)) -- SDL_LockSurface(vid->screen); -- --@@ -370,8 +367,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, -- if (SDL_MUSTLOCK(vid->screen)) -- SDL_UnlockSurface(vid->screen); -- --- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) --- SDL_WM_SetCaption(buf, NULL); --+ if (video_info->monitor_fps_enable) --+ SDL_WM_SetCaption(video_info->window_text, NULL); -- -- SDL_Flip(vid->screen); -- --diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c --index da03c2333..c01cb7919 100644 ----- a/gfx/drivers/sunxi_gfx.c --+++ b/gfx/drivers/sunxi_gfx.c --@@ -763,7 +763,7 @@ static void sunxi_setup_scale (void *data, -- -- static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- struct sunxi_video *_dispvars = (struct sunxi_video*)data; -- --@@ -781,11 +781,6 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, -- -- if (_dispvars->menu_active) -- { --- char buf[128]; --- --- buf[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); -- ioctl(_dispvars->sunxi_disp->fd_fb, FBIO_WAITFORVSYNC, 0); -- return true; -- } --diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c --index 91451518d..7791b9b5e 100644 ----- a/gfx/drivers/vg.c --+++ b/gfx/drivers/vg.c --@@ -378,7 +378,7 @@ static void vg_copy_frame(void *data, const void *frame, -- static bool vg_frame(void *data, const void *frame, -- unsigned frame_width, unsigned frame_height, -- uint64_t frame_count, unsigned pitch, const char *msg, --- video_frame_info_t video_info) --+ video_frame_info_t *video_info) -- { -- unsigned width, height; -- vg_t *vg = (vg_t*)data; --diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c --index 6d01afac3..bf784591e 100644 ----- a/gfx/drivers/vita2d_gfx.c --+++ b/gfx/drivers/vita2d_gfx.c --@@ -133,54 +133,55 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita); -- -- static bool vita2d_gfx_frame(void *data, const void *frame, -- unsigned width, unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- void *tex_p; -- vita_video_t *vita = (vita_video_t *)data; --- --+ -- if (frame) -- { --- if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)){ --- unsigned i; --- unsigned int stride; --- --- if ((width != vita->width || height != vita->height) && vita->texture) --- { --- vita2d_free_texture(vita->texture); --- vita->texture = NULL; --- } --- --- if (!vita->texture) --- { --- RARCH_LOG("Creating texture: %ix%i\n", width, height); --- vita->width = width; --- vita->height = height; --- vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); --- vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); --- } --- tex_p = vita2d_texture_get_datap(vita->texture); --- stride = vita2d_texture_get_stride(vita->texture); --- --- if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) --- { --- stride /= 4; --- pitch /= 4; --- uint32_t *tex32 = tex_p; --- const uint32_t *frame32 = frame; --- --- for (i = 0; i < height; i++) --- memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); --- } --- else --- { --- stride /= 2; --- pitch /= 2; --- uint16_t *tex16 = tex_p; --- const uint16_t *frame16 = frame; --- --- for (i = 0; i < height; i++) --- memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); --- } --+ if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)) --+ { --+ unsigned i; --+ unsigned int stride; --+ --+ if ((width != vita->width || height != vita->height) && vita->texture) --+ { --+ vita2d_free_texture(vita->texture); --+ vita->texture = NULL; --+ } --+ --+ if (!vita->texture) --+ { --+ RARCH_LOG("Creating texture: %ix%i\n", width, height); --+ vita->width = width; --+ vita->height = height; --+ vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); --+ vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); --+ } --+ tex_p = vita2d_texture_get_datap(vita->texture); --+ stride = vita2d_texture_get_stride(vita->texture); --+ --+ if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) --+ { --+ stride /= 4; --+ pitch /= 4; --+ uint32_t *tex32 = tex_p; --+ const uint32_t *frame32 = frame; --+ --+ for (i = 0; i < height; i++) --+ memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); --+ } --+ else --+ { --+ stride /= 2; --+ pitch /= 2; --+ uint16_t *tex16 = tex_p; --+ const uint16_t *frame16 = frame; --+ --+ for (i = 0; i < height; i++) --+ memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); --+ } -- } -- } -- --@@ -188,9 +189,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, -- vita2d_gfx_update_viewport(vita); -- -- vita2d_start_drawing(); --- --+ -- vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,vita2d_get_clear_color()); --- --+ -- if (vita->texture) -- { -- if (vita->fullscreen) --@@ -205,21 +206,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, -- float scalex = vita->vp.width / (float)vita->width; -- float scaley = vita->vp.height / (float)vita->height; -- vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x, --- vita->vp.y, scalex, scaley, rad); --+ vita->vp.y, scalex, scaley, rad); -- } -- } --- --- if (video_info.fps_show) --- { --- char buffer[128]; --- char buffer_fps[128]; --- --- buffer[0] = buffer_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buffer, sizeof(buffer), --- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); --- runloop_msg_queue_push(buffer_fps, 1, 1, false); --- } -- -- #ifdef HAVE_OVERLAY -- if (vita->overlay_enable) --@@ -228,43 +217,39 @@ static bool vita2d_gfx_frame(void *data, const void *frame, -- -- if (vita->menu.active) -- { --- menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); --- --- if(vita->menu.texture){ --- if (vita->fullscreen) --- vita2d_draw_texture_scale(vita->menu.texture, --- 0, 0, --- PSP_FB_WIDTH / (float)vita->menu.width, --- PSP_FB_HEIGHT / (float)vita->menu.height); --- else --- { --- if (vita->menu.width > vita->menu.height) --- { --- float scale = PSP_FB_HEIGHT / (float)vita->menu.height; --- float w = vita->menu.width * scale; --- vita2d_draw_texture_scale(vita->menu.texture, --- PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, --- scale, scale); --- } --- else --- { --- float scale = PSP_FB_WIDTH / (float)vita->menu.width; --- float h = vita->menu.height * scale; --- vita2d_draw_texture_scale(vita->menu.texture, --- 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, --- scale, scale); --- } --- } --- } --- --- --- --+ menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); --+ --+ if(vita->menu.texture){ --+ if (vita->fullscreen) --+ vita2d_draw_texture_scale(vita->menu.texture, --+ 0, 0, --+ PSP_FB_WIDTH / (float)vita->menu.width, --+ PSP_FB_HEIGHT / (float)vita->menu.height); --+ else --+ { --+ if (vita->menu.width > vita->menu.height) --+ { --+ float scale = PSP_FB_HEIGHT / (float)vita->menu.height; --+ float w = vita->menu.width * scale; --+ vita2d_draw_texture_scale(vita->menu.texture, --+ PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, --+ scale, scale); --+ } --+ else --+ { --+ float scale = PSP_FB_WIDTH / (float)vita->menu.width; --+ float h = vita->menu.height * scale; --+ vita2d_draw_texture_scale(vita->menu.texture, --+ 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, --+ scale, scale); --+ } --+ } --+ } -- } --- --- --+ -- if(!string_is_empty(msg)) --- font_driver_render_msg(NULL, msg, NULL); --- --+ font_driver_render_msg(NULL, msg, NULL); --+ -- vita2d_end_drawing(); -- vita2d_swap_buffers(); -- --diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c --index 4f5cfd04c..a9c2e958a 100644 ----- a/gfx/drivers/vulkan.c --+++ b/gfx/drivers/vulkan.c --@@ -1463,7 +1463,7 @@ static void vulkan_readback(vk_t *vk) -- VK_PIPELINE_STAGE_HOST_BIT); -- } -- ---static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) --+static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info) -- { -- VkCommandBufferBeginInfo begin_info = { -- VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; --@@ -1520,7 +1520,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) -- static bool vulkan_frame(void *data, const void *frame, -- unsigned frame_width, unsigned frame_height, -- uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- struct vk_per_frame *chain; -- unsigned width, height; --@@ -1931,7 +1931,7 @@ static bool vulkan_frame(void *data, const void *frame, -- /* Disable BFI during fast forward, slow-motion, -- * and pause to prevent flicker. */ -- if ( --- video_info.black_frame_insertion --+ video_info->black_frame_insertion -- && !input_driver_is_nonblock_state() -- && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) -- && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) --diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c --index 2055b2d7f..928993e1e 100644 ----- a/gfx/drivers/wiiu_gfx.c --+++ b/gfx/drivers/wiiu_gfx.c --@@ -550,7 +550,7 @@ static void wiiu_gfx_free(void* data) -- -- static bool wiiu_gfx_frame(void* data, const void* frame, -- unsigned width, unsigned height, uint64_t frame_count, --- unsigned pitch, const char* msg, video_frame_info_t video_info) --+ unsigned pitch, const char* msg, video_frame_info_t *video_info) -- { -- (void)msg; -- int i; --diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c --index eeb99f5c1..97efef122 100644 ----- a/gfx/drivers/xenon360_gfx.c --+++ b/gfx/drivers/xenon360_gfx.c --@@ -192,7 +192,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * -- } -- -- static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, --- uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t video_info) --+ uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- gl_t *vid = data; -- --diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c --index 8bb8ec947..1a5704aee 100644 ----- a/gfx/drivers/xshm_gfx.c --+++ b/gfx/drivers/xshm_gfx.c --@@ -94,7 +94,7 @@ static void *xshm_gfx_init(const video_info_t *video, -- -- static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- xshm_t* xshm = (xshm_t*)data; -- int y; --diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c --index d8fce331b..782771bda 100644 ----- a/gfx/drivers/xvideo.c --+++ b/gfx/drivers/xvideo.c --@@ -530,8 +530,8 @@ static void *xv_init(const video_info_t *video, -- -- video_driver_build_info(&video_info); -- --- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) --- XStoreName(g_x11_dpy, g_x11_win, buf); --+ if (video_info.monitor_fps_enable) --+ XStoreName(g_x11_dpy, g_x11_win, video_info.window_text); -- -- x11_set_window_attr(g_x11_dpy, g_x11_win); -- --@@ -784,7 +784,7 @@ static void xv_render_msg(xv_t *xv, const char *msg, -- -- static bool xv_frame(void *data, const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- XWindowAttributes target; -- xv_t *xv = (xv_t*)data; --@@ -811,7 +811,7 @@ static bool xv_frame(void *data, const void *frame, unsigned width, -- true); -- XSync(g_x11_dpy, False); -- --- x11_update_window_title(NULL, video_info); --+ x11_update_title(NULL, video_info); -- -- return true; -- } --diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c --index ee672c8b9..805849557 100644 ----- a/gfx/drivers_context/android_ctx.c --+++ b/gfx/drivers_context/android_ctx.c --@@ -314,21 +314,12 @@ static bool android_gfx_ctx_set_resize(void *data, -- return false; -- } -- ---static void android_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) --+static void android_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool android_gfx_ctx_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -493,7 +484,7 @@ dpi_fallback: -- return true; -- } -- ---static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) --+static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- android_ctx_data_t *and = (android_ctx_data_t*)data; -- --@@ -618,7 +609,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { -- NULL, /* get_video_output_next */ -- android_gfx_ctx_get_metrics, -- NULL, --- android_gfx_ctx_update_window_title, --+ android_gfx_ctx_update_title, -- android_gfx_ctx_check_window, -- android_gfx_ctx_set_resize, -- android_gfx_ctx_has_focus, --diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c --index b5412a189..6403d6ed3 100644 ----- a/gfx/drivers_context/cgl_ctx.c --+++ b/gfx/drivers_context/cgl_ctx.c --@@ -95,7 +95,7 @@ static void gfx_ctx_cgl_check_window(void *data, bool *quit, -- } -- } -- ---static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)data; -- --@@ -110,22 +110,12 @@ static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) -- return false; -- } -- ---static void gfx_ctx_cgl_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_cgl_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- --- -- static bool gfx_ctx_cgl_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m --index 566869809..487638385 100644 ----- a/gfx/drivers_context/cocoa_gl_ctx.m --+++ b/gfx/drivers_context/cocoa_gl_ctx.m --@@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) -- } -- -- static bool cocoagl_gfx_ctx_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, bool fullscreen) -- { -- #if defined(HAVE_COCOA) --@@ -416,27 +416,17 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned -- *height = CGRectGetHeight(size) * screenscale; -- } -- ---static void cocoagl_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) --+static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) -- { -- #if defined(HAVE_COCOA) -- ui_window_cocoa_t view; --- const ui_window_t *window = NULL; ---#endif --- static char buf_fps[128] = {0}; --- static char buf[128] = {0}; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- ---#if defined(HAVE_COCOA) --- window = ui_companion_driver_get_window_ptr(); --+ const ui_window_t *window = ui_companion_driver_get_window_ptr(); --+ -- view.data = (CocoaView*)nsview_get_ptr(); -- --- if (window && *buf) --- window->set_title(&view, buf); --+ if (window && video_info->monitor_fps_enable) --+ window->set_title(&view, video_info->window_text); -- #endif --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, --@@ -537,7 +527,7 @@ static bool cocoagl_gfx_ctx_has_windowed(void *data) -- #endif -- } -- ---static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) --+static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- if (!(--g_fast_forward_skips < 0)) -- return; --diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp --index f5d4233bb..9c6acaaaf 100644 ----- a/gfx/drivers_context/d3d_ctx.cpp --+++ b/gfx/drivers_context/d3d_ctx.cpp --@@ -76,7 +76,7 @@ static bool gfx_ctx_d3d_set_resize(void *data, unsigned new_width, unsigned new_ -- return true; -- } -- ---static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- d3d_video_t *d3d = (d3d_video_t*)data; -- LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; --@@ -84,25 +84,11 @@ static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) -- d3d_swap(d3d, d3dr); -- } -- ---static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buffer_fps[128]; --- const ui_window_t *window = ui_companion_driver_get_window_ptr(); --- --- buf[0] = buffer_fps[0] = '\0'; --- --- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), --- buffer_fps, sizeof(buffer_fps))) --- { ---#ifndef _XBOX --- window->set_title(&main_window, buf); ---#endif --- } --- --- if (video_info.fps_show) --- { -- #ifdef _XBOX --+ if (video_info->fps_show) --+ { -- MEMORYSTATUS stat; -- char mem[128]; -- --@@ -111,10 +97,15 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) -- GlobalMemoryStatus(&stat); -- snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", -- stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); --- strlcat(buffer_fps, mem, sizeof(buffer_fps)); ---#endif --- runloop_msg_queue_push(buffer_fps, 1, 1, false); --+ strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); -- } --+#else --+ const ui_window_t *window = ui_companion_driver_get_window_ptr(); --+ --+ if (window && video_info->monitor_fps_enable) --+ window->set_title(&main_window, video_info->window_text); --+#endif --+ -- } -- -- static void gfx_ctx_d3d_show_mouse(void *data, bool state) --@@ -197,7 +188,7 @@ static void gfx_ctx_d3d_input_driver(void *data, -- } -- -- static bool gfx_ctx_d3d_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c --index b8738d316..2956e4762 100644 ----- a/gfx/drivers_context/drm_ctx.c --+++ b/gfx/drivers_context/drm_ctx.c --@@ -225,7 +225,7 @@ static bool gfx_ctx_drm_queue_flip(void) -- return false; -- } -- ---static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; -- --@@ -253,7 +253,7 @@ static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) -- waiting_for_flip = gfx_ctx_drm_queue_flip(); -- -- /* Triple-buffered page flips */ --- if (video_info.max_swapchain_images >= 3 && --+ if (video_info->max_swapchain_images >= 3 && -- gbm_surface_has_free_buffers(g_gbm_surface)) -- return; -- --@@ -270,18 +270,8 @@ static bool gfx_ctx_drm_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- --- if (video_info.fps_show) --- runloop_msg_queue_push( buf_fps, 1, 1, false); -- } -- -- static void gfx_ctx_drm_get_video_size(void *data, --@@ -617,7 +607,7 @@ error: -- #endif -- -- static bool gfx_ctx_drm_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -634,7 +624,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, -- /* If we use black frame insertion, -- * we fake a 60 Hz monitor for 120 Hz one, -- * etc, so try to match that. */ --- refresh_mod = video_info.black_frame_insertion --+ refresh_mod = video_info->black_frame_insertion -- ? 0.5f : 1.0f; -- -- /* Find desired video mode, and use that. --@@ -660,7 +650,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, -- continue; -- -- diff = fabsf(refresh_mod * g_drm_connector->modes[i].vrefresh --- - video_info.refresh_rate); --+ - video_info->refresh_rate); -- -- if (!g_drm_mode || diff < minimum_fps_diff) -- { --diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c --index 1b750a368..6e5c5eb85 100644 ----- a/gfx/drivers_context/emscriptenegl_ctx.c --+++ b/gfx/drivers_context/emscriptenegl_ctx.c --@@ -75,7 +75,7 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, -- *quit = false; -- } -- ---static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- (void)data; -- /* no-op in emscripten, no way to force swap/wait for VSync in browsers */ --@@ -90,17 +90,8 @@ static bool gfx_ctx_emscripten_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_emscripten_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_emscripten_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static void gfx_ctx_emscripten_get_video_size(void *data, --@@ -189,7 +180,7 @@ error: -- } -- -- static bool gfx_ctx_emscripten_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -330,7 +321,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { -- NULL, /* get_video_output_next */ -- NULL, /* get_metrics */ -- gfx_ctx_emscripten_translate_aspect, --- gfx_ctx_emscripten_update_window_title, --+ gfx_ctx_emscripten_update_title, -- gfx_ctx_emscripten_check_window, -- gfx_ctx_emscripten_set_resize, -- gfx_ctx_emscripten_has_focus, --diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp --index 7f35a5a99..1c3d30cef 100644 ----- a/gfx/drivers_context/gdi_ctx.cpp --+++ b/gfx/drivers_context/gdi_ctx.cpp --@@ -87,19 +87,12 @@ static bool gfx_ctx_gdi_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_gdi_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; -- const ui_window_t *window = ui_companion_driver_get_window_ptr(); -- --- buf[0] = buf_fps[0] = '\0'; --- --- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps))) --- window->set_title(&main_window, buf); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); --+ if (window && video_info->monitor_fps_enable) --+ window->set_title(&main_window, video_info->window_text); -- } -- -- static void gfx_ctx_gdi_get_video_size(void *data, --@@ -190,7 +183,7 @@ static void gfx_ctx_gdi_destroy(void *data) -- } -- -- static bool gfx_ctx_gdi_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -287,7 +280,7 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) -- return flags; -- } -- ---static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- (void)data; -- --diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c --index f4cf4f63d..90b1cb2de 100644 ----- a/gfx/drivers_context/gfx_null_ctx.c --+++ b/gfx/drivers_context/gfx_null_ctx.c --@@ -35,7 +35,7 @@ static void gfx_ctx_null_check_window(void *data, bool *quit, -- (void)resize; -- } -- ---static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- (void)data; -- } --@@ -48,10 +48,8 @@ static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) -- return false; -- } -- ---static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t *video_info) -- { --- (void)data; --- (void)video_info; -- } -- -- static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) --@@ -62,7 +60,7 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h -- } -- -- static bool gfx_ctx_null_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c --index 80276bae1..c6fcd07e2 100644 ----- a/gfx/drivers_context/khr_display_ctx.c --+++ b/gfx/drivers_context/khr_display_ctx.c --@@ -110,21 +110,12 @@ static bool gfx_ctx_khr_display_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool gfx_ctx_khr_display_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -201,7 +192,7 @@ static void gfx_ctx_khr_display_set_swap_interval(void *data, unsigned swap_inte -- } -- } -- ---static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; -- vulkan_present(&khr->vk, khr->vk.context.current_swapchain_index); --diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c --index de76f06ae..977919627 100644 ----- a/gfx/drivers_context/mali_fbdev_ctx.c --+++ b/gfx/drivers_context/mali_fbdev_ctx.c --@@ -158,21 +158,12 @@ static bool gfx_ctx_mali_fbdev_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_mali_fbdev_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_mali_fbdev_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -269,7 +260,7 @@ static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, unsigned swap_inter -- #endif -- } -- ---static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- mali_ctx_data_t *mali = (mali_ctx_data_t*)data; -- --@@ -319,7 +310,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { -- NULL, /* get_video_output_next */ -- NULL, /* get_metrics */ -- NULL, --- gfx_ctx_mali_fbdev_update_window_title, --+ gfx_ctx_mali_fbdev_update_title, -- gfx_ctx_mali_fbdev_check_window, -- gfx_ctx_mali_fbdev_set_resize, -- gfx_ctx_mali_fbdev_has_focus, --diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c --index bab164cad..d613c18a8 100644 ----- a/gfx/drivers_context/opendingux_fbdev_ctx.c --+++ b/gfx/drivers_context/opendingux_fbdev_ctx.c --@@ -141,21 +141,12 @@ static bool gfx_ctx_opendingux_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_opendingux_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_opendingux_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool gfx_ctx_opendingux_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -232,7 +223,7 @@ static bool gfx_ctx_opendingux_has_windowed(void *data) -- return false; -- } -- ---static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; -- --diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c --index f6899ece1..829d6c38b 100644 ----- a/gfx/drivers_context/osmesa_ctx.c --+++ b/gfx/drivers_context/osmesa_ctx.c --@@ -238,7 +238,7 @@ static void osmesa_ctx_swap_interval(void *data, unsigned interval) -- } -- -- static bool osmesa_ctx_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -306,20 +306,8 @@ static void osmesa_ctx_get_video_size(void *data, -- *height = osmesa->height; -- } -- ---static void osmesa_ctx_update_window_title(void *data, video_frame_info_t video_info) --+static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) -- { --- static char buf[128] = {0}; --- static char buf_fps[128] = {0}; --- gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; --- --- if (!osmesa) --- return; --- --- video_monitor_get_fps(video_info, buf, --- sizeof(buf), buf_fps, sizeof(buf_fps)); --- --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, --@@ -361,7 +349,7 @@ static bool osmesa_ctx_has_windowed(void *data) -- return true; -- } -- ---static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t video_info) --+static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; -- osmesa_fifo_accept(osmesa); --@@ -417,7 +405,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = -- NULL, /* get_video_output_next */ -- NULL, /* get_metrics */ -- NULL, /* translate_aspect */ --- osmesa_ctx_update_window_title, --+ osmesa_ctx_update_title, -- osmesa_ctx_check_window, -- osmesa_ctx_set_resize, -- osmesa_ctx_has_focus, --diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c --index fa34420ec..4a26e0b4c 100644 ----- a/gfx/drivers_context/ps3_ctx.c --+++ b/gfx/drivers_context/ps3_ctx.c --@@ -179,7 +179,7 @@ static bool gfx_ctx_ps3_has_windowed(void *data) -- return false; -- } -- ---static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- (void)data; -- #ifdef HAVE_LIBDBGFONT --@@ -199,19 +199,8 @@ static bool gfx_ctx_ps3_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_ps3_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_ps3_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- (void)data; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static void gfx_ctx_ps3_get_video_size(void *data, --@@ -302,15 +291,10 @@ static void *gfx_ctx_ps3_init(video_frame_info_t video_info, void *video_driver) -- } -- -- static bool gfx_ctx_ps3_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --- global_t *global = global_get_ptr(); --- --- if (!global) --- return false; --- -- return true; -- } -- --@@ -438,7 +422,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { -- gfx_ctx_ps3_get_video_output_next, -- NULL, /* get_metrics */ -- NULL, --- gfx_ctx_ps3_update_window_title, --+ gfx_ctx_ps3_update_title, -- gfx_ctx_ps3_check_window, -- gfx_ctx_ps3_set_resize, -- gfx_ctx_ps3_has_focus, --diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c --index 31ffdbda4..8308f60fc 100644 ----- a/gfx/drivers_context/qnx_ctx.c --+++ b/gfx/drivers_context/qnx_ctx.c --@@ -319,21 +319,12 @@ static bool gfx_ctx_qnx_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_qnx_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_qnx_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool gfx_ctx_qnx_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -444,7 +435,7 @@ static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned swap_interval) -- #endif -- } -- ---static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; -- --@@ -493,7 +484,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { -- NULL, /* get_video_output_next */ -- gfx_ctx_qnx__get_metrics, -- NULL, --- gfx_ctx_qnx_update_window_title, --+ gfx_ctx_qnx_update_title, -- gfx_ctx_qnx_check_window, -- gfx_ctx_qnx_set_resize, -- gfx_ctx_qnx_has_focus, --diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c --index 50dd0c33a..e4c34a819 100644 ----- a/gfx/drivers_context/sdl_gl_ctx.c --+++ b/gfx/drivers_context/sdl_gl_ctx.c --@@ -163,7 +163,7 @@ static void sdl_ctx_swap_interval(void *data, unsigned interval) -- } -- -- static bool sdl_ctx_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -177,7 +177,7 @@ static bool sdl_ctx_set_video_mode(void *data, -- -- if (fullscreen) -- { --- if (video_info.windowed_fullscreen) --+ if (video_info->windowed_fullscreen) -- fsflag = SDL_WINDOW_FULLSCREEN_DESKTOP; -- else -- fsflag = SDL_WINDOW_FULLSCREEN; --@@ -192,7 +192,7 @@ static bool sdl_ctx_set_video_mode(void *data, -- } -- else -- { --- unsigned display = video_info.monitor_index; --+ unsigned display = video_info->monitor_index; -- -- sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), -- SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), --@@ -268,27 +268,18 @@ static void sdl_ctx_get_video_size(void *data, -- } -- } -- ---static void sdl_ctx_update_window_title(void *data, video_frame_info_t video_info) --+static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- if (video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps))) --+ if (video_info->monitor_fps_enable) -- { -- #ifdef HAVE_SDL2 -- gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; -- if (sdl) --- SDL_SetWindowTitle(sdl->g_win, buf); --+ SDL_SetWindowTitle(sdl->g_win, video_info->window_text); -- #else --- SDL_WM_SetCaption(buf, NULL); --+ SDL_WM_SetCaption(video_info->window_text, NULL); -- #endif -- } --- --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, --@@ -379,7 +370,7 @@ static bool sdl_ctx_has_windowed(void *data) -- return true; -- } -- ---static void sdl_ctx_swap_buffers(void *data, video_frame_info_t video_info) --+static void sdl_ctx_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- #ifdef HAVE_SDL2 -- gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; --@@ -435,7 +426,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = -- NULL, /* get_video_output_next */ -- NULL, /* get_metrics */ -- NULL, /* translate_aspect */ --- sdl_ctx_update_window_title, --+ sdl_ctx_update_title, -- sdl_ctx_check_window, -- sdl_ctx_set_resize, -- sdl_ctx_has_focus, --diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c --index 959b0571e..090c507ec 100644 ----- a/gfx/drivers_context/vc_egl_ctx.c --+++ b/gfx/drivers_context/vc_egl_ctx.c --@@ -105,17 +105,8 @@ static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) -- return false; -- } -- ---static void gfx_ctx_vc_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_vc_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static void gfx_ctx_vc_get_video_size(void *data, --@@ -319,7 +310,7 @@ static void gfx_ctx_vc_set_swap_interval(void *data, unsigned swap_interval) -- } -- -- static bool gfx_ctx_vc_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -608,7 +599,7 @@ error: -- return false; -- } -- ---static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- vc_ctx_data_t *vc = (vc_ctx_data_t*)data; -- --@@ -659,7 +650,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { -- NULL, /* get_video_output_next */ -- NULL, /* get_metrics */ -- gfx_ctx_vc_translate_aspect, --- gfx_ctx_vc_update_window_title, --+ gfx_ctx_vc_update_title, -- gfx_ctx_vc_check_window, -- gfx_ctx_vc_set_resize, -- gfx_ctx_vc_has_focus, --diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c --index ac12fc7af..ea10357d0 100644 ----- a/gfx/drivers_context/vivante_fbdev_ctx.c --+++ b/gfx/drivers_context/vivante_fbdev_ctx.c --@@ -145,21 +145,12 @@ static bool gfx_ctx_vivante_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_vivante_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_vivante_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; --- --- buf[0] = buf_fps[0] = '\0'; --- --- video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps)); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); -- } -- -- static bool gfx_ctx_vivante_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -246,7 +237,7 @@ static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned swap_interval -- #endif -- } -- ---static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; -- --@@ -297,7 +288,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { -- NULL, /* get_video_output_next */ -- NULL, /* get_metrics */ -- NULL, --- gfx_ctx_vivante_update_window_title, --+ gfx_ctx_vivante_update_title, -- gfx_ctx_vivante_check_window, -- gfx_ctx_vivante_set_resize, -- gfx_ctx_vivante_has_focus, --diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c --index a59e99f91..13a9990e9 100644 ----- a/gfx/drivers_context/wayland_ctx.c --+++ b/gfx/drivers_context/wayland_ctx.c --@@ -719,20 +719,12 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) -- return true; -- } -- ---static void gfx_ctx_wl_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; -- gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; -- --- buf[0] = buf_fps[0] = '\0'; --- --- if (video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps))) --- wl_shell_surface_set_title(wl->shell_surf, buf); --- --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); --+ if (wl && video_info->monitor_fps_enable) --+ wl_shell_surface_set_title(wl->shell_surf, video_info->window_text); -- } -- -- --@@ -1075,7 +1067,7 @@ static void gfx_ctx_wl_set_swap_interval(void *data, unsigned swap_interval) -- } -- -- static bool gfx_ctx_wl_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -1557,7 +1549,7 @@ static void *gfx_ctx_wl_get_context_data(void *data) -- } -- #endif -- ---static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; -- --@@ -1676,7 +1668,7 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { -- NULL, /* get_video_output_next */ -- gfx_ctx_wl_get_metrics, -- NULL, --- gfx_ctx_wl_update_window_title, --+ gfx_ctx_wl_update_title, -- gfx_ctx_wl_check_window, -- gfx_ctx_wl_set_resize, -- gfx_ctx_wl_has_focus, --diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp --index fba99cf99..57c38441d 100644 ----- a/gfx/drivers_context/wgl_ctx.cpp --+++ b/gfx/drivers_context/wgl_ctx.cpp --@@ -331,7 +331,7 @@ static void gfx_ctx_wgl_check_window(void *data, bool *quit, -- } -- } -- ---static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- (void)data; -- --@@ -386,19 +386,12 @@ static bool gfx_ctx_wgl_set_resize(void *data, -- return false; -- } -- ---static void gfx_ctx_wgl_update_window_title(void *data, video_frame_info_t video_info) --+static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) -- { --- char buf[128]; --- char buf_fps[128]; -- const ui_window_t *window = ui_companion_driver_get_window_ptr(); -- --- buf[0] = buf_fps[0] = '\0'; --- --- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), --- buf_fps, sizeof(buf_fps))) --- window->set_title(&main_window, buf); --- if (video_info.fps_show) --- runloop_msg_queue_push(buf_fps, 1, 1, false); --+ if (window && video_info->monitor_fps_enable) --+ window->set_title(&main_window, video_info->window_text); -- } -- -- static void gfx_ctx_wgl_get_video_size(void *data, --@@ -525,7 +518,7 @@ static void gfx_ctx_wgl_destroy(void *data) -- } -- -- static bool gfx_ctx_wgl_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -687,7 +680,7 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { -- NULL, /* get_video_output_next */ -- gfx_ctx_wgl_get_metrics, -- NULL, --- gfx_ctx_wgl_update_window_title, --+ gfx_ctx_wgl_update_title, -- gfx_ctx_wgl_check_window, -- gfx_ctx_wgl_set_resize, -- gfx_ctx_wgl_has_focus, --diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c --index 50a504abc..cb5cac058 100644 ----- a/gfx/drivers_context/x_ctx.c --+++ b/gfx/drivers_context/x_ctx.c --@@ -302,7 +302,7 @@ static void gfx_ctx_x_swap_interval(void *data, unsigned interval) -- } -- } -- ---static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; -- --@@ -545,7 +545,7 @@ error: -- } -- -- static bool gfx_ctx_x_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -565,7 +565,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, -- if (!x) -- return false; -- --- windowed_full = video_info.windowed_fullscreen; --+ windowed_full = video_info->windowed_fullscreen; -- true_full = false; -- -- switch (x_api) --@@ -613,8 +613,8 @@ static bool gfx_ctx_x_set_video_mode(void *data, -- RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n"); -- } -- --- if (video_info.monitor_index) --- g_x11_screen = video_info.monitor_index - 1; --+ if (video_info->monitor_index) --+ g_x11_screen = video_info->monitor_index - 1; -- -- #ifdef HAVE_XINERAMA -- if (fullscreen || g_x11_screen != 0) --@@ -662,7 +662,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, -- -- -- x11_set_window_attr(g_x11_dpy, g_x11_win); --- x11_update_window_title(NULL, video_info); --+ x11_update_title(NULL, video_info); -- -- if (fullscreen) -- x11_show_mouse(g_x11_dpy, g_x11_win, false); --@@ -1081,7 +1081,7 @@ const gfx_ctx_driver_t gfx_ctx_x = { -- NULL, /* get_video_output_next */ -- x11_get_metrics, -- NULL, --- x11_update_window_title, --+ x11_update_title, -- gfx_ctx_x_check_window, -- gfx_ctx_x_set_resize, -- x11_has_focus, --diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c --index 133736d84..c375a6861 100644 ----- a/gfx/drivers_context/xegl_ctx.c --+++ b/gfx/drivers_context/xegl_ctx.c --@@ -257,7 +257,7 @@ static EGLint *xegl_fill_attribs(xegl_ctx_data_t *xegl, EGLint *attr) -- static void gfx_ctx_xegl_set_swap_interval(void *data, unsigned swap_interval); -- -- static bool gfx_ctx_xegl_set_video_mode(void *data, --- video_frame_info_t video_info, --+ video_frame_info_t *video_info, -- unsigned width, unsigned height, -- bool fullscreen) -- { --@@ -298,7 +298,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, -- ButtonPressMask | ButtonReleaseMask | KeyReleaseMask; -- swa.override_redirect = fullscreen ? True : False; -- --- if (fullscreen && !video_info.windowed_fullscreen) --+ if (fullscreen && !video_info->windowed_fullscreen) -- { -- if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height, &xegl->desktop_mode)) -- { --@@ -309,8 +309,8 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, -- RARCH_ERR("[X/EGL]: Entering true fullscreen failed. Will attempt windowed mode.\n"); -- } -- --- if (video_info.monitor_index) --- g_x11_screen = video_info.monitor_index - 1; --+ if (video_info->monitor_index) --+ g_x11_screen = video_info->monitor_index - 1; -- -- #ifdef HAVE_XINERAMA -- if (fullscreen || g_x11_screen != 0) --@@ -352,7 +352,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, -- goto error; -- -- x11_set_window_attr(g_x11_dpy, g_x11_win); --- x11_update_window_title(NULL, video_info); --+ x11_update_title(NULL, video_info); -- -- if (fullscreen) -- x11_show_mouse(g_x11_dpy, g_x11_win, false); --@@ -490,7 +490,7 @@ static void gfx_ctx_xegl_show_mouse(void *data, bool state) -- x11_show_mouse(g_x11_dpy, g_x11_win, state); -- } -- ---static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t video_info) --+static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t *video_info) -- { -- xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; -- --@@ -591,7 +591,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = -- NULL, /* get_video_output_next */ -- x11_get_metrics, -- NULL, --- x11_update_window_title, --+ x11_update_title, -- x11_check_window, -- gfx_ctx_xegl_set_resize, -- x11_has_focus, --diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c --index 9bf06e725..254961f58 100644 ----- a/gfx/video_context_driver.c --+++ b/gfx/video_context_driver.c --@@ -456,7 +456,7 @@ bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) -- video_driver_build_info(&video_info); -- -- if (!current_video_context->set_video_mode( --- video_context_data, video_info, mode_info->width, --+ video_context_data, &video_info, mode_info->width, -- mode_info->height, mode_info->fullscreen)) -- return false; -- return true; --diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h --index 55a150c17..9b85f6d31 100644 ----- a/gfx/video_context_driver.h --+++ b/gfx/video_context_driver.h --@@ -78,7 +78,7 @@ typedef struct gfx_ctx_driver -- void (*swap_interval)(void *data, unsigned); -- -- /* Sets video mode. Creates a window, etc. */ --- bool (*set_video_mode)(void*, video_frame_info_t video_info, unsigned, unsigned, bool); --+ bool (*set_video_mode)(void*, video_frame_info_t *video_info, unsigned, unsigned, bool); -- -- /* Gets current window size. -- * If not initialized yet, it returns current screen size. */ --@@ -101,7 +101,7 @@ typedef struct gfx_ctx_driver -- float (*translate_aspect)(void*, unsigned, unsigned); -- -- /* Asks driver to update window title (FPS, etc). */ --- void (*update_window_title)(void*, video_frame_info_t video_info); --+ void (*update_window_title)(void*, video_frame_info_t *video_info); -- -- /* Queries for resize and quit events. -- * Also processes events. */ --@@ -123,7 +123,7 @@ typedef struct gfx_ctx_driver -- -- /* Swaps buffers. VBlank sync depends on -- * earlier calls to swap_interval. */ --- void (*swap_buffers)(void*, video_frame_info_t video_info); --+ void (*swap_buffers)(void*, video_frame_info_t *video_info); -- -- /* Most video backends will want to use a certain input driver. -- * Checks for it here. */ --diff --git a/gfx/video_driver.c b/gfx/video_driver.c --index 9ad62c93b..7146ed805 100644 ----- a/gfx/video_driver.c --+++ b/gfx/video_driver.c --@@ -1057,89 +1057,6 @@ bool video_monitor_fps_statistics(double *refresh_rate, -- } -- -- ---/** --- * video_monitor_get_fps: --- * @buf : string suitable for Window title --- * @size : size of buffer. --- * @buf_fps : string of raw FPS only (optional). --- * @size_fps : size of raw FPS buffer. --- * --- * Get the amount of frames per seconds. --- * --- * Returns: true if framerate per seconds could be obtained, --- * otherwise false. --- * --- **/ ---bool video_monitor_get_fps( --- video_frame_info_t video_info, --- char *buf, size_t size, --- char *buf_fps, size_t size_fps) ---{ --- static retro_time_t curr_time; --- static retro_time_t fps_time; --- retro_time_t new_time = cpu_features_get_time_usec(); --- uint64_t frame_count = 0; --- --- video_driver_threaded_lock(); --- frame_count = video_driver_frame_count; --- video_driver_threaded_unlock(); --- --- *buf = '\0'; --- --- if (frame_count) --- { --- static float last_fps; --- bool ret = false; --- unsigned write_index = video_driver_frame_time_count++ & --- (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); --- --- video_driver_frame_time_samples[write_index] = new_time - fps_time; --- fps_time = new_time; --- --- if ((frame_count % FPS_UPDATE_INTERVAL) == 0) --- { --- char frames_text[64]; --- --- last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); --- curr_time = new_time; --- --- fill_pathname_noext(buf, --- video_driver_title_buf, --- " || ", --- size); --- --- if (video_info.fps_show) --- { --- char fps_text[64]; --- snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); --- strlcat(buf, fps_text, size); --- } --- --- strlcat(buf, "Frames: ", size); --- --- snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, --- (unsigned long long)frame_count); --- --- strlcat(buf, frames_text, size); --- ret = true; --- } --- --- if (buf_fps && video_info.fps_show) --- snprintf(buf_fps, size_fps, "FPS: %6.1f || %s: " STRING_REP_UINT64, --- last_fps, --- msg_hash_to_str(MSG_FRAMES), --- (unsigned long long)frame_count); --- --- return ret; --- } --- --- curr_time = fps_time = new_time; --- strlcpy(buf, video_driver_title_buf, size); --- if (buf_fps) --- strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); --- --- return true; ---} -- -- float video_driver_get_aspect_ratio(void) -- { --@@ -2087,6 +2004,93 @@ unsigned video_pixel_get_alignment(unsigned pitch) -- } -- -- /** --+ * video_monitor_get_fps: --+ * --+ * Get the amount of frames per seconds. --+ * --+ * Returns: true if framerate per seconds could be obtained, --+ * otherwise false. --+ * --+ **/ --+static bool video_monitor_get_fps(video_frame_info_t *video_info) --+{ --+ static retro_time_t curr_time; --+ static retro_time_t fps_time; --+ retro_time_t new_time = cpu_features_get_time_usec(); --+ --+ if (video_info->frame_count) --+ { --+ static float last_fps; --+ bool ret = false; --+ unsigned write_index = video_driver_frame_time_count++ & --+ (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); --+ --+ video_driver_frame_time_samples[write_index] = new_time - fps_time; --+ fps_time = new_time; --+ --+ if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) --+ { --+ char frames_text[64]; --+ --+ last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); --+ curr_time = new_time; --+ --+ fill_pathname_noext(video_info->window_text, --+ video_driver_title_buf, --+ " || ", --+ sizeof(video_info->window_text)); --+ --+ if (video_info->fps_show) --+ { --+ char fps_text[64]; --+ snprintf(video_info->fps_text, --+ sizeof(video_info->fps_text), --+ " FPS: %6.1f || ", last_fps); --+ strlcat(video_info->window_text, --+ fps_text, --+ sizeof(video_info->window_text)); --+ } --+ --+ strlcat(video_info->window_text, --+ "Frames: ", --+ sizeof(video_info->window_text)); --+ --+ snprintf(frames_text, --+ sizeof(frames_text), --+ STRING_REP_UINT64, --+ (unsigned long long)video_info->frame_count); --+ --+ strlcat(video_info->window_text, --+ frames_text, --+ sizeof(video_info->window_text)); --+ ret = true; --+ } --+ --+ if (video_info->fps_text && video_info->fps_show) --+ snprintf( --+ video_info->fps_text, --+ sizeof(video_info->fps_text), --+ "FPS: %6.1f || %s: " STRING_REP_UINT64, --+ last_fps, --+ msg_hash_to_str(MSG_FRAMES), --+ (unsigned long long)video_info->frame_count); --+ --+ return ret; --+ } --+ --+ curr_time = fps_time = new_time; --+ strlcpy(video_info->window_text, --+ video_driver_title_buf, --+ sizeof(video_info->window_text)); --+ if (video_info->fps_text) --+ strlcpy(video_info->fps_text, --+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), --+ sizeof(video_info->fps_text)); --+ --+ return true; --+} --+ --+/** -- * video_driver_frame: -- * @data : pointer to data of the video frame. -- * @width : width of the video frame. --@@ -2131,6 +2135,13 @@ void video_driver_frame(const void *data, unsigned width, -- -- video_driver_build_info(&video_info); -- --+ video_driver_threaded_lock(); --+ video_info.frame_count = video_driver_frame_count; --+ video_driver_frame_count++; --+ video_driver_threaded_unlock(); --+ --+ video_info.monitor_fps_enable = video_monitor_get_fps(&video_info); --+ -- /* Slightly messy code, -- * but we really need to do processing before blocking on VSync -- * for best possible scheduling. --@@ -2161,16 +2172,14 @@ void video_driver_frame(const void *data, unsigned width, -- && video_info.font_enable && msg) -- strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); -- --- video_driver_threaded_lock(); --- frame_count = video_driver_frame_count; --- video_driver_frame_count++; --- video_driver_threaded_unlock(); --- -- if (!current_video || !current_video->frame( -- video_driver_data, data, width, height, -- frame_count, --- pitch, video_driver_msg, video_info)) --+ pitch, video_driver_msg, &video_info)) -- video_driver_active = false; --+ --+ if (video_info.fps_show) --+ runloop_msg_queue_push(video_info.fps_text, 1, 1, false); -- } -- -- void video_driver_display_type_set(enum rarch_display_type type) --@@ -2245,6 +2254,10 @@ void video_driver_build_info(video_frame_info_t *video_info) -- video_info->monitor_index = settings->video.monitor_index; -- video_info->shared_context = settings->video.shared_context; -- video_info->font_enable = settings->video.font_enable; --+ --+ video_info->frame_count = 0; --+ video_info->window_text[0] = '\0'; --+ video_info->fps_text[0] = '\0'; -- } -- -- /** --diff --git a/gfx/video_driver.h b/gfx/video_driver.h --index 768b89660..906deea80 100644 ----- a/gfx/video_driver.h --+++ b/gfx/video_driver.h --@@ -101,6 +101,10 @@ typedef struct video_frame_info -- bool fullscreen; -- unsigned monitor_index; -- bool font_enable; --+ bool monitor_fps_enable; --+ char window_text[128]; --+ char fps_text[128]; --+ uint64_t frame_count; -- } video_frame_info_t; -- -- /* Optionally implemented interface to poke more --@@ -163,7 +167,7 @@ typedef struct video_viewport -- typedef bool (*video_driver_frame_t)(void *data, -- const void *frame, unsigned width, -- unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info); --+ unsigned pitch, const char *msg, video_frame_info_t *video_info); -- -- typedef struct video_driver -- { --@@ -462,25 +466,6 @@ void video_monitor_set_refresh_rate(float hz); -- bool video_monitor_fps_statistics(double *refresh_rate, -- double *deviation, unsigned *sample_points); -- ---/** --- * video_monitor_get_fps: --- * @video_info : information about the video frame --- * @buf : string suitable for Window title --- * @size : size of buffer. --- * @buf_fps : string of raw FPS only (optional). --- * @size_fps : size of raw FPS buffer. --- * --- * Get the amount of frames per seconds. --- * --- * Returns: true if framerate per seconds could be obtained, --- * otherwise false. --- * --- **/ ---bool video_monitor_get_fps( --- video_frame_info_t video_info, --- char *buf, size_t size, --- char *buf_fps, size_t size_fps); --- -- unsigned video_pixel_get_alignment(unsigned pitch); -- -- const video_poke_interface_t *video_driver_get_poke(void); --diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c --index ed868fb1d..0e1bb2c6f 100644 ----- a/gfx/video_thread_wrapper.c --+++ b/gfx/video_thread_wrapper.c --@@ -619,7 +619,7 @@ static void video_thread_loop(void *data) -- thr->frame.buffer, thr->frame.width, thr->frame.height, -- thr->frame.count, -- thr->frame.pitch, *thr->frame.msg ? thr->frame.msg : NULL, --- video_info); --+ &video_info); -- } -- -- slock_unlock(thr->frame.lock); --@@ -706,7 +706,7 @@ static bool video_thread_has_windowed(void *data) -- -- static bool video_thread_frame(void *data, const void *frame_, -- unsigned width, unsigned height, uint64_t frame_count, --- unsigned pitch, const char *msg, video_frame_info_t video_info) --+ unsigned pitch, const char *msg, video_frame_info_t *video_info) -- { -- unsigned copy_stride; -- static struct retro_perf_counter thr_frame = {0}; --@@ -741,7 +741,7 @@ static bool video_thread_frame(void *data, const void *frame_, -- { -- -- retro_time_t target_frame_time = (retro_time_t) --- roundf(1000000 / video_info.refresh_rate); --+ roundf(1000000 / video_info->refresh_rate); -- retro_time_t target = thr->last_time + target_frame_time; -- -- /* Ideally, use absolute time, but that is only a good idea on POSIX. */ diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index fb5e5d25b..a79c6037f 100644 --- a/gfx/common/x11_common.c @@ -3365,7 +996,7 @@ index b5412a189..6403d6ed3 100644 bool fullscreen) { diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m -index 566869809..62b9c0a47 100644 +index 566869809..487638385 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) @@ -3419,15 +1050,6 @@ index 566869809..62b9c0a47 100644 { if (!(--g_fast_forward_skips < 0)) return; -@@ -631,7 +621,7 @@ const gfx_ctx_driver_t gfx_ctx_cocoagl = { - NULL, /* get_video_output_next */ - cocoagl_gfx_ctx_get_metrics, - NULL, -- cocoagl_gfx_ctx_update_window_title, -+ cocoagl_gfx_ctx_update_title, - cocoagl_gfx_ctx_check_window, - cocoagl_gfx_ctx_set_resize, - cocoagl_gfx_ctx_has_focus, diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index f5d4233bb..9c6acaaaf 100644 --- a/gfx/drivers_context/d3d_ctx.cpp From bf56463b76d1a37e8ba51ce23f488a337ec9d083 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 14:17:09 +0100 Subject: [PATCH 179/427] Silence warnings --- intl/msg_hash_de.c | 3 +-- menu/drivers/materialui.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index ef25be476c..d423532043 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -480,8 +480,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len) msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU) ); - break; - break; + break; case MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC: snprintf(s, len, "Um Inhalte zu suchen, gehe zu '%s' und\n" diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 5841bf9e03..dc3b5bd076 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -832,11 +832,10 @@ static void mui_render_menu_list(mui_handle_t *mui, char rich_label[255]; char entry_value[255]; bool entry_selected = false; - char sublabel_str[255]; - mui_node_t *node = (mui_node_t*) + mui_node_t *node = (mui_node_t*) menu_entries_get_userdata_at_offset(list, i); - rich_label[0] = entry_value[0] = sublabel_str[0] = '\0'; + rich_label[0] = entry_value[0] = '\0'; if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection)) continue; From 6fde55ac9d67685a9c18c33954d41649d9a39cec Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 15:09:47 +0100 Subject: [PATCH 180/427] (record_driver.c) Update --- record/record_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/record/record_driver.c b/record/record_driver.c index 8dbfffb8fa..679b038a12 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -347,7 +347,7 @@ bool recording_init(void) FFEMU_PIX_ARGB8888 : FFEMU_PIX_RGB565; params.config = NULL; - if (*global->record.config) + if (!string_is_empty(global->record.config)) params.config = global->record.config; if (video_driver_supports_recording()) From f0820f6433681778bf580f9d85373d7b05759b09 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 15:23:06 +0100 Subject: [PATCH 181/427] (DRM) Should fix segfault --- gfx/common/drm_common.c | 4 ++-- gfx/common/drm_common.h | 4 +++- gfx/drivers_context/drm_ctx.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gfx/common/drm_common.c b/gfx/common/drm_common.c index 1cdb2c0f50..ed776e91c9 100644 --- a/gfx/common/drm_common.c +++ b/gfx/common/drm_common.c @@ -64,11 +64,11 @@ bool drm_get_resources(int fd) return true; } -bool drm_get_connector(int fd, unsigned video_monitor_index) +bool drm_get_connector(int fd, video_frame_info_t video_info) { unsigned i; unsigned monitor_index = 0; - unsigned monitor = MAX(video_monitor_index, 1); + unsigned monitor = MAX(video_info.monitor_index, 1); /* Enumerate all connectors. */ diff --git a/gfx/common/drm_common.h b/gfx/common/drm_common.h index 4f2842968e..fbe7583184 100644 --- a/gfx/common/drm_common.h +++ b/gfx/common/drm_common.h @@ -27,6 +27,8 @@ #include #include +#include "../video_driver.h" + RETRO_BEGIN_DECLS extern uint32_t g_connector_id; @@ -51,7 +53,7 @@ void drm_setup(int fd); void drm_free(void); -bool drm_get_connector(int fd, unsigned video_monitor_index); +bool drm_get_connector(int fd, video_frame_info_t video_info); static INLINE bool drm_wait_flip(int timeout) { diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index b8738d3165..9452198716 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -393,7 +393,7 @@ nextgpu: if (!drm_get_resources(fd)) goto nextgpu; - if (!drm_get_connector(video_info.monitor_index, fd)) + if (!drm_get_connector(fd, video_info)) goto nextgpu; if (!drm_get_encoder(fd)) From b9104f38b813efc62d42ca96f264f64ca88e81cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Wed, 18 Jan 2017 17:12:26 +0100 Subject: [PATCH 182/427] (GLUI) Align entry values on top to avoid overlaps with sublabels --- menu/drivers/materialui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index dc3b5bd076..056974cde4 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -783,7 +783,7 @@ static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, if (do_draw_text) menu_display_draw_text(mui->font, value_str, width - mui->margin, - y + node->line_height / 2 + mui->font->size / 3, + y + (menu_display_get_dpi() / 5), width, height, color, TEXT_ALIGN_RIGHT, 1.0f, false, 0); if (texture_switch) @@ -791,7 +791,7 @@ static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, mui->icon_size, texture_switch, width - mui->margin - mui->icon_size, - y + node->line_height/2 - mui->icon_size/2, + y + (menu_display_get_dpi() / 6) - mui->icon_size/2, width, height, 0, @@ -1480,7 +1480,7 @@ static void mui_layout(mui_handle_t *mui) if (mui->font2) /* calculate a more realistic ticker_limit */ { unsigned m_width2 = - font_driver_get_message_width(mui->font2, "a", 1, 1); + font_driver_get_message_width(mui->font2, "t", 1, 1); if (m_width2) mui->glyph_width2 = m_width2; From a6a4808e94ed9a427f9558def127dd88934a424f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 17:41:27 +0100 Subject: [PATCH 183/427] Refactor frame monitor code --- gfx/common/x11_common.c | 22 +- gfx/common/x11_common.h | 4 +- gfx/drivers/caca_gfx.c | 2 +- gfx/drivers/ctr_gfx.c | 2 +- gfx/drivers/d3d.cpp | 14 +- gfx/drivers/dispmanx_gfx.c | 17 +- gfx/drivers/drm_gfx.c | 13 +- gfx/drivers/exynos_gfx.c | 15 +- gfx/drivers/gdi_gfx.c | 2 +- gfx/drivers/gl.c | 16 +- gfx/drivers/gl_renderchains/render_chain_gl.h | 6 +- .../gl_renderchains/render_chain_gl_legacy.c | 4 +- gfx/drivers/gx_gfx.c | 7 +- gfx/drivers/nullgfx.c | 2 +- gfx/drivers/omap_gfx.c | 2 +- gfx/drivers/psp1_gfx.c | 14 +- gfx/drivers/sdl2_gfx.c | 9 +- gfx/drivers/sdl_gfx.c | 9 +- gfx/drivers/sunxi_gfx.c | 7 +- gfx/drivers/vg.c | 2 +- gfx/drivers/vita2d_gfx.c | 159 +++++++-------- gfx/drivers/vulkan.c | 6 +- gfx/drivers/wiiu_gfx.c | 2 +- gfx/drivers/xenon360_gfx.c | 2 +- gfx/drivers/xshm_gfx.c | 2 +- gfx/drivers/xvideo.c | 8 +- gfx/drivers_context/android_ctx.c | 17 +- gfx/drivers_context/cgl_ctx.c | 16 +- gfx/drivers_context/cocoa_gl_ctx.m | 24 +-- gfx/drivers_context/d3d_ctx.cpp | 35 ++-- gfx/drivers_context/drm_ctx.c | 22 +- gfx/drivers_context/emscriptenegl_ctx.c | 17 +- gfx/drivers_context/gdi_ctx.cpp | 17 +- gfx/drivers_context/gfx_null_ctx.c | 8 +- gfx/drivers_context/khr_display_ctx.c | 15 +- gfx/drivers_context/mali_fbdev_ctx.c | 17 +- gfx/drivers_context/opendingux_fbdev_ctx.c | 15 +- gfx/drivers_context/osmesa_ctx.c | 20 +- gfx/drivers_context/ps3_ctx.c | 24 +-- gfx/drivers_context/qnx_ctx.c | 17 +- gfx/drivers_context/sdl_gl_ctx.c | 27 +-- gfx/drivers_context/vc_egl_ctx.c | 17 +- gfx/drivers_context/vivante_fbdev_ctx.c | 17 +- gfx/drivers_context/wayland_ctx.c | 20 +- gfx/drivers_context/wgl_ctx.cpp | 19 +- gfx/drivers_context/x_ctx.c | 14 +- gfx/drivers_context/xegl_ctx.c | 14 +- gfx/video_context_driver.c | 2 +- gfx/video_context_driver.h | 6 +- gfx/video_driver.c | 191 ++++++++++-------- gfx/video_driver.h | 25 +-- gfx/video_thread_wrapper.c | 6 +- 52 files changed, 364 insertions(+), 606 deletions(-) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index fb5e5d25b1..a79c6037f7 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -323,7 +323,7 @@ void x11_suspend_screensaver(Window wnd, bool enable) x11_suspend_screensaver_xdg_screensaver(wnd, enable); } -static bool get_video_mode(video_frame_info_t video_info, +static bool get_video_mode(video_frame_info_t *video_info, Display *dpy, unsigned width, unsigned height, XF86VidModeModeInfo *mode, XF86VidModeModeInfo *desktop_mode) { @@ -345,7 +345,7 @@ static bool get_video_mode(video_frame_info_t video_info, /* If we use black frame insertion, we fake a 60 Hz monitor * for 120 Hz one, etc, so try to match that. */ - refresh_mod = video_info.black_frame_insertion ? 0.5f : 1.0f; + refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; for (i = 0; i < num_modes; i++) { @@ -361,7 +361,7 @@ static bool get_video_mode(video_frame_info_t video_info, continue; refresh = refresh_mod * m->dotclock * 1000.0f / (m->htotal * m->vtotal); - diff = fabsf(refresh - video_info.refresh_rate); + diff = fabsf(refresh - video_info->refresh_rate); if (!ret || diff < minimum_fps_diff) { @@ -375,7 +375,7 @@ static bool get_video_mode(video_frame_info_t video_info, return ret; } -bool x11_enter_fullscreen(video_frame_info_t video_info, +bool x11_enter_fullscreen(video_frame_info_t *video_info, Display *dpy, unsigned width, unsigned height, XF86VidModeModeInfo *desktop_mode) { @@ -715,18 +715,10 @@ bool x11_connect(void) return true; } -void x11_update_window_title(void *data, video_frame_info_t video_info) +void x11_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - if (video_monitor_get_fps(video_info, - buf, sizeof(buf), buf_fps, sizeof(buf_fps))) - XStoreName(g_x11_dpy, g_x11_win, buf); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); + if (video_info->monitor_fps_enable) + XStoreName(g_x11_dpy, g_x11_win, video_info->window_text); } bool x11_input_ctx_new(bool true_full) diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index b08db07e0f..c4ffec01d7 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -45,7 +45,7 @@ void x11_save_last_used_monitor(Window win); void x11_show_mouse(Display *dpy, Window win, bool state); void x11_windowed_fullscreen(Display *dpy, Window win); void x11_suspend_screensaver(Window win, bool enable); -bool x11_enter_fullscreen(video_frame_info_t video_info, +bool x11_enter_fullscreen(video_frame_info_t *video_info, Display *dpy, unsigned width, unsigned height, XF86VidModeModeInfo *desktop_mode); @@ -84,7 +84,7 @@ bool x11_alive(void *data); bool x11_connect(void); -void x11_update_window_title(void *data, video_frame_info_t video_info); +void x11_update_title(void *data, video_frame_info_t *video_info); bool x11_input_ctx_new(bool true_full); diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index c56ca64b52..b55eb5bd40 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -94,7 +94,7 @@ static void *caca_gfx_init(const video_info_t *video, static bool caca_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { size_t len = 0; void *buffer = NULL; diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 44f36f98f5..67afa4e360 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -446,7 +446,7 @@ static void* ctr_init(const video_info_t* video, static bool ctr_frame(void* data, const void* frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char* msg, video_frame_info_t info) + unsigned pitch, const char* msg, video_frame_info_t *video_info) { uint32_t diff; static uint64_t currentTick,lastTick; diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 46e706e675..abf51ba807 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -1368,7 +1368,7 @@ static void d3d_get_overlay_interface(void *data, static bool d3d_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, - const char *msg, video_frame_info_t video_info) + const char *msg, video_frame_info_t *video_info) { unsigned width, height; static struct retro_perf_counter d3d_frame = {0}; @@ -1412,18 +1412,18 @@ static bool d3d_frame(void *data, const void *frame, /* render_chain() only clears out viewport, * clear out everything. */ D3DVIEWPORT screen_vp; - screen_vp.X = 0; - screen_vp.Y = 0; - screen_vp.MinZ = 0; - screen_vp.MaxZ = 1; - screen_vp.Width = width; + screen_vp.X = 0; + screen_vp.Y = 0; + screen_vp.MinZ = 0; + screen_vp.MaxZ = 1; + screen_vp.Width = width; screen_vp.Height = height; d3d_set_viewports(d3d->dev, &screen_vp); d3d_clear(d3d->dev, 0, 0, D3DCLEAR_TARGET, 0, 1, 0); /* Insert black frame first, so we * can screenshot, etc. */ - if (video_info.black_frame_insertion) + if (video_info->black_frame_insertion) { if (!d3d_swap(d3d, d3d->dev) || d3d->needs_restore) return true; diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index 873eced47c..1c27cd26f9 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -430,7 +430,7 @@ static void *dispmanx_gfx_init(const video_info_t *video, static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { struct dispmanx_video *_dispvars = data; float aspect = video_driver_get_aspect_ratio(); @@ -438,7 +438,9 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, if (!frame) return true; - if (width != _dispvars->core_width || height != _dispvars->core_height || _dispvars->aspect_ratio != aspect) + if ( (width != _dispvars->core_width) || + (height != _dispvars->core_height) || + (_dispvars->aspect_ratio != aspect)) { /* Sanity check. */ if (width == 0 || height == 0) @@ -467,18 +469,11 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, settings->video.max_swapchain_images, 0, &_dispvars->main_surface); - + /* We need to recreate the menu surface too, if it exists already, so we * free it and let dispmanx_set_texture_frame() recreate it as it detects it's NULL.*/ - if (_dispvars->menu_active && _dispvars->menu_surface) { + if (_dispvars->menu_active && _dispvars->menu_surface) dispmanx_surface_free(_dispvars, &_dispvars->menu_surface); - } - } - - if (video_info.fps_show) - { - char buf[128]; - video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); } /* Update main surface: locate free page, blit and flip. */ diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index 9e21463134..62c22f8b55 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -744,11 +744,12 @@ static void *drm_gfx_init(const video_info_t *video, static bool drm_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { struct drm_video *_drmvars = data; - if (width != _drmvars->core_width || height != _drmvars->core_height) + if ( ( width != _drmvars->core_width) || + (height != _drmvars->core_height)) { /* Sanity check. */ if (width == 0 || height == 0) @@ -778,14 +779,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, drm_plane_setup(_drmvars->main_surface); } - if (_drmvars->menu_active) - { - char buf[128]; - buf[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); - } - /* Update main surface: locate free page, blit and flip. */ drm_surface_update(_drmvars, frame, _drmvars->main_surface); return true; diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 68f5132eba..00f0fae394 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -1159,7 +1159,6 @@ static int exynos_render_msg(struct exynos_video *vid, return exynos_blend_font(pdata); } - static void *exynos_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { @@ -1273,7 +1272,7 @@ static void exynos_gfx_free(void *data) static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { struct exynos_video *vid = data; struct exynos_page *page = NULL; @@ -1304,18 +1303,6 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, goto fail; } - if (video_info.fps_show) - { - char buffer[128]; - char buffer_fps[128]; - - buffer[0] = buffer_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buffer, sizeof(buffer), - video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); - runloop_msg_queue_push(buffer_fps, 1, 1, false); - } - /* If at this point the dimension parameters are still zero, setup some * * fake blit parameters so that menu and font rendering work properly. */ if (vid->width == 0 || vid->height == 0) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 05f9e00509..b0aecc2924 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -146,7 +146,7 @@ error: static bool gdi_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { gfx_ctx_mode_t mode; RECT rect; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 5c42dcce36..09c0bd7dc4 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -299,11 +299,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, video_driver_build_info(&video_info); - gl_set_viewport(data, video_info, + gl_set_viewport(data, &video_info, viewport_width, viewport_height, force_full, allow_rotate); } -void gl_set_viewport(void *data, video_frame_info_t video_info, +void gl_set_viewport(void *data, video_frame_info_t *video_info, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate) @@ -324,7 +324,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, video_context_driver_translate_aspect(&aspect_data); - if (video_info.scale_integer && !force_full) + if (video_info->scale_integer && !force_full) { video_viewport_get_scaled_integer(&gl->vp, viewport_width, viewport_height, @@ -337,7 +337,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, float desired_aspect = video_driver_get_aspect_ratio(); #if defined(HAVE_MENU) - if (video_info.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) + if (video_info->aspect_ratio_idx == ASPECT_RATIO_CUSTOM) { const struct video_viewport *custom = video_viewport_get_custom(); @@ -1090,7 +1090,7 @@ static bool gl_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { video_shader_ctx_mvp_t mvp; video_shader_ctx_coords_t coords; @@ -1339,7 +1339,7 @@ static bool gl_frame(void *data, const void *frame, /* Disable BFI during fast forward, slow-motion, * and pause to prevent flicker. */ if ( - video_info.black_frame_insertion + video_info->black_frame_insertion && !input_driver_is_nonblock_state() && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) @@ -1351,7 +1351,7 @@ static bool gl_frame(void *data, const void *frame, video_context_driver_swap_buffers(video_info); #ifdef HAVE_GL_SYNC - if (video_info.hard_sync && gl->have_sync) + if (video_info->hard_sync && gl->have_sync) { static struct retro_perf_counter gl_fence = {0}; @@ -1361,7 +1361,7 @@ static bool gl_frame(void *data, const void *frame, gl->fences[gl->fence_count++] = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); - while (gl->fence_count > video_info.hard_sync_frames) + while (gl->fence_count > video_info->hard_sync_frames) { glClientWaitSync(gl->fences[0], GL_SYNC_FLUSH_COMMANDS_BIT, 1000000000); diff --git a/gfx/drivers/gl_renderchains/render_chain_gl.h b/gfx/drivers/gl_renderchains/render_chain_gl.h index 24886dec0b..c329b83fb5 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl.h +++ b/gfx/drivers/gl_renderchains/render_chain_gl.h @@ -49,14 +49,14 @@ void gl_load_texture_data( const void *frame, unsigned base_size); void gl_renderchain_render(gl_t *gl, - video_frame_info_t video_info, + video_frame_info_t *video_info, uint64_t frame_count, const struct video_tex_info *tex_info, const struct video_tex_info *feedback_info); void gl_renderchain_init(gl_t *gl, unsigned fbo_width, unsigned fbo_height); -void gl_set_viewport(void *data, video_frame_info_t video_info, +void gl_set_viewport(void *data, video_frame_info_t *video_info, unsigned viewport_width, unsigned viewport_height, bool force_full, bool allow_rotate); @@ -70,7 +70,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, unsigned width, unsigned height, unsigned vp_width, unsigned vp_height); -void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info); +void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info); void gl_check_fbo_dimensions(gl_t *gl); diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c index 55d687d812..8cc1681184 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c @@ -239,7 +239,7 @@ void gl_check_fbo_dimensions(gl_t *gl) } } void gl_renderchain_render(gl_t *gl, - video_frame_info_t video_info, + video_frame_info_t *video_info, uint64_t frame_count, const struct video_tex_info *tex_info, const struct video_tex_info *feedback_info) @@ -667,7 +667,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, } } -void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info) +void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info) { glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); glBindFramebuffer(RARCH_GL_FRAMEBUFFER, gl->fbo[0]); diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index d2ed4cb640..9b9439cf5f 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1438,7 +1438,7 @@ static bool gx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { char fps_txt[128]; char fps_text_buf[128]; @@ -1538,10 +1538,7 @@ static bool gx_frame(void *data, const void *frame, GX_DrawDone(); - video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), - fps_text_buf, sizeof(fps_text_buf)); - - if (video_info.fps_show) + if (video_info->fps_show) { char mem1_txt[128]; char mem2_txt[128]; diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c index 2a9adebf50..30708f4dfd 100644 --- a/gfx/drivers/nullgfx.c +++ b/gfx/drivers/nullgfx.c @@ -32,7 +32,7 @@ static void *null_gfx_init(const video_info_t *video, static bool null_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { (void)data; (void)frame; diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index af46ff7687..1344865ea3 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -985,7 +985,7 @@ fail: static bool omap_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { omap_video_t *vid = (omap_video_t*)data; diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 47887c0d05..2fbd141fcd 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -467,7 +467,7 @@ static void *psp_init(const video_info_t *video, static bool psp_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { #ifdef DISPLAY_FPS uint32_t diff; @@ -476,8 +476,6 @@ static bool psp_frame(void *data, const void *frame, static float fps = 0.0; #endif static struct retro_perf_counter psp_frame_run = {0}; - static char fps_txt[128] = {0}; - static char fps_text_buf[128] = {0}; psp1_video_t *psp = (psp1_video_t*)data; if (!width || !height) @@ -495,14 +493,10 @@ static bool psp_frame(void *data, const void *frame, pspDebugScreenSetXY(0,0); - video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), - video_info.fps_show ? fps_text_buf : NULL, - video_info.fps_show ? sizeof(fps_text_buf) : 0); - - if (video_info.fps_show) + if (video_info->fps_show) { - pspDebugScreenSetXY(68 - strlen(fps_text_buf) - 1,0); - pspDebugScreenPuts(fps_text_buf); + pspDebugScreenSetXY(68 - strlen(video_info->fps_text) - 1,0); + pspDebugScreenPuts(video_info->fps_text); pspDebugScreenSetXY(0,1); } diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 6d216d8986..438abdeb4c 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -498,13 +498,10 @@ static void check_window(sdl2_video_t *vid) static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { - char buf[128]; sdl2_video_t *vid = (sdl2_video_t*)data; - buf[0] = '\0'; - if (vid->should_resize) sdl_refresh_viewport(vid); @@ -536,8 +533,8 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, SDL_RenderPresent(vid->renderer); - if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) - SDL_SetWindowTitle(vid->window, buf); + if (video_info->monitor_fps_enable) + SDL_SetWindowTitle(vid->window, video_info->window_text); return true; } diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 45bdf8f1d6..787c8d8c58 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -331,17 +331,14 @@ static void sdl_gfx_check_window(sdl_video_t *vid) static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { - char buf[128]; static struct retro_perf_counter sdl_scale = {0}; sdl_video_t *vid = (sdl_video_t*)data; if (!frame) return true; - buf[0] = '\0'; - if (SDL_MUSTLOCK(vid->screen)) SDL_LockSurface(vid->screen); @@ -370,8 +367,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, if (SDL_MUSTLOCK(vid->screen)) SDL_UnlockSurface(vid->screen); - if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) - SDL_WM_SetCaption(buf, NULL); + if (video_info->monitor_fps_enable) + SDL_WM_SetCaption(video_info->window_text, NULL); SDL_Flip(vid->screen); diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index da03c23332..c01cb7919b 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -763,7 +763,7 @@ static void sunxi_setup_scale (void *data, static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { struct sunxi_video *_dispvars = (struct sunxi_video*)data; @@ -781,11 +781,6 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, if (_dispvars->menu_active) { - char buf[128]; - - buf[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); ioctl(_dispvars->sunxi_disp->fd_fb, FBIO_WAITFORVSYNC, 0); return true; } diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 91451518d1..7791b9b5e3 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -378,7 +378,7 @@ static void vg_copy_frame(void *data, const void *frame, static bool vg_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, - video_frame_info_t video_info) + video_frame_info_t *video_info) { unsigned width, height; vg_t *vg = (vg_t*)data; diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 6d01afac36..bf784591ea 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -133,54 +133,55 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita); static bool vita2d_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { void *tex_p; vita_video_t *vita = (vita_video_t *)data; - + if (frame) { - if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)){ - unsigned i; - unsigned int stride; + if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)) + { + unsigned i; + unsigned int stride; - if ((width != vita->width || height != vita->height) && vita->texture) - { - vita2d_free_texture(vita->texture); - vita->texture = NULL; - } + if ((width != vita->width || height != vita->height) && vita->texture) + { + vita2d_free_texture(vita->texture); + vita->texture = NULL; + } - if (!vita->texture) - { - RARCH_LOG("Creating texture: %ix%i\n", width, height); - vita->width = width; - vita->height = height; - vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); - vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); - } - tex_p = vita2d_texture_get_datap(vita->texture); - stride = vita2d_texture_get_stride(vita->texture); + if (!vita->texture) + { + RARCH_LOG("Creating texture: %ix%i\n", width, height); + vita->width = width; + vita->height = height; + vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); + vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); + } + tex_p = vita2d_texture_get_datap(vita->texture); + stride = vita2d_texture_get_stride(vita->texture); - if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) - { - stride /= 4; - pitch /= 4; - uint32_t *tex32 = tex_p; - const uint32_t *frame32 = frame; + if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) + { + stride /= 4; + pitch /= 4; + uint32_t *tex32 = tex_p; + const uint32_t *frame32 = frame; - for (i = 0; i < height; i++) - memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); - } - else - { - stride /= 2; - pitch /= 2; - uint16_t *tex16 = tex_p; - const uint16_t *frame16 = frame; + for (i = 0; i < height; i++) + memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); + } + else + { + stride /= 2; + pitch /= 2; + uint16_t *tex16 = tex_p; + const uint16_t *frame16 = frame; - for (i = 0; i < height; i++) - memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); - } + for (i = 0; i < height; i++) + memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); + } } } @@ -188,9 +189,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, vita2d_gfx_update_viewport(vita); vita2d_start_drawing(); - + vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,vita2d_get_clear_color()); - + if (vita->texture) { if (vita->fullscreen) @@ -205,21 +206,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, float scalex = vita->vp.width / (float)vita->width; float scaley = vita->vp.height / (float)vita->height; vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x, - vita->vp.y, scalex, scaley, rad); + vita->vp.y, scalex, scaley, rad); } } - - if (video_info.fps_show) - { - char buffer[128]; - char buffer_fps[128]; - - buffer[0] = buffer_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buffer, sizeof(buffer), - video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); - runloop_msg_queue_push(buffer_fps, 1, 1, false); - } #ifdef HAVE_OVERLAY if (vita->overlay_enable) @@ -228,43 +217,39 @@ static bool vita2d_gfx_frame(void *data, const void *frame, if (vita->menu.active) { - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); - - if(vita->menu.texture){ - if (vita->fullscreen) - vita2d_draw_texture_scale(vita->menu.texture, - 0, 0, - PSP_FB_WIDTH / (float)vita->menu.width, - PSP_FB_HEIGHT / (float)vita->menu.height); - else - { - if (vita->menu.width > vita->menu.height) - { - float scale = PSP_FB_HEIGHT / (float)vita->menu.height; - float w = vita->menu.width * scale; - vita2d_draw_texture_scale(vita->menu.texture, - PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, - scale, scale); - } - else - { - float scale = PSP_FB_WIDTH / (float)vita->menu.width; - float h = vita->menu.height * scale; - vita2d_draw_texture_scale(vita->menu.texture, - 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, - scale, scale); - } - } - } - + menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); - + if(vita->menu.texture){ + if (vita->fullscreen) + vita2d_draw_texture_scale(vita->menu.texture, + 0, 0, + PSP_FB_WIDTH / (float)vita->menu.width, + PSP_FB_HEIGHT / (float)vita->menu.height); + else + { + if (vita->menu.width > vita->menu.height) + { + float scale = PSP_FB_HEIGHT / (float)vita->menu.height; + float w = vita->menu.width * scale; + vita2d_draw_texture_scale(vita->menu.texture, + PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, + scale, scale); + } + else + { + float scale = PSP_FB_WIDTH / (float)vita->menu.width; + float h = vita->menu.height * scale; + vita2d_draw_texture_scale(vita->menu.texture, + 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, + scale, scale); + } + } + } } - - + if(!string_is_empty(msg)) - font_driver_render_msg(NULL, msg, NULL); - + font_driver_render_msg(NULL, msg, NULL); + vita2d_end_drawing(); vita2d_swap_buffers(); diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 4f5cfd04c4..a9c2e958a2 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1463,7 +1463,7 @@ static void vulkan_readback(vk_t *vk) VK_PIPELINE_STAGE_HOST_BIT); } -static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) +static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info) { VkCommandBufferBeginInfo begin_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; @@ -1520,7 +1520,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) static bool vulkan_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { struct vk_per_frame *chain; unsigned width, height; @@ -1931,7 +1931,7 @@ static bool vulkan_frame(void *data, const void *frame, /* Disable BFI during fast forward, slow-motion, * and pause to prevent flicker. */ if ( - video_info.black_frame_insertion + video_info->black_frame_insertion && !input_driver_is_nonblock_state() && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index 2055b2d7ff..928993e1e7 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -550,7 +550,7 @@ static void wiiu_gfx_free(void* data) static bool wiiu_gfx_frame(void* data, const void* frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char* msg, video_frame_info_t video_info) + unsigned pitch, const char* msg, video_frame_info_t *video_info) { (void)msg; int i; diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index eeb99f5c1b..97efef1224 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -192,7 +192,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * } static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, - uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t video_info) + uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { gl_t *vid = data; diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index 8bb8ec9478..1a5704aee5 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -94,7 +94,7 @@ static void *xshm_gfx_init(const video_info_t *video, static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { xshm_t* xshm = (xshm_t*)data; int y; diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index d8fce331ba..782771bda1 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -530,8 +530,8 @@ static void *xv_init(const video_info_t *video, video_driver_build_info(&video_info); - if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) - XStoreName(g_x11_dpy, g_x11_win, buf); + if (video_info.monitor_fps_enable) + XStoreName(g_x11_dpy, g_x11_win, video_info.window_text); x11_set_window_attr(g_x11_dpy, g_x11_win); @@ -784,7 +784,7 @@ static void xv_render_msg(xv_t *xv, const char *msg, static bool xv_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { XWindowAttributes target; xv_t *xv = (xv_t*)data; @@ -811,7 +811,7 @@ static bool xv_frame(void *data, const void *frame, unsigned width, true); XSync(g_x11_dpy, False); - x11_update_window_title(NULL, video_info); + x11_update_title(NULL, video_info); return true; } diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index ee672c8b95..8058495574 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -314,21 +314,12 @@ static bool android_gfx_ctx_set_resize(void *data, return false; } -static void android_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) +static void android_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool android_gfx_ctx_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -493,7 +484,7 @@ dpi_fallback: return true; } -static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) +static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) { android_ctx_data_t *and = (android_ctx_data_t*)data; @@ -618,7 +609,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { NULL, /* get_video_output_next */ android_gfx_ctx_get_metrics, NULL, - android_gfx_ctx_update_window_title, + android_gfx_ctx_update_title, android_gfx_ctx_check_window, android_gfx_ctx_set_resize, android_gfx_ctx_has_focus, diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index b5412a189f..6403d6ed35 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -95,7 +95,7 @@ static void gfx_ctx_cgl_check_window(void *data, bool *quit, } } -static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t *video_info) { gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)data; @@ -110,22 +110,12 @@ static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) return false; } -static void gfx_ctx_cgl_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_cgl_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } - static bool gfx_ctx_cgl_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 566869809a..4876383858 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) } static bool cocoagl_gfx_ctx_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { #if defined(HAVE_COCOA) @@ -416,27 +416,17 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned *height = CGRectGetHeight(size) * screenscale; } -static void cocoagl_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) +static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) { #if defined(HAVE_COCOA) ui_window_cocoa_t view; - const ui_window_t *window = NULL; -#endif - static char buf_fps[128] = {0}; - static char buf[128] = {0}; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - -#if defined(HAVE_COCOA) - window = ui_companion_driver_get_window_ptr(); + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + view.data = (CocoaView*)nsview_get_ptr(); - if (window && *buf) - window->set_title(&view, buf); + if (window && video_info->monitor_fps_enable) + window->set_title(&view, video_info->window_text); #endif - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, @@ -537,7 +527,7 @@ static bool cocoagl_gfx_ctx_has_windowed(void *data) #endif } -static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) +static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) { if (!(--g_fast_forward_skips < 0)) return; diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index f5d4233bb1..9c6acaaafb 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -76,7 +76,7 @@ static bool gfx_ctx_d3d_set_resize(void *data, unsigned new_width, unsigned new_ return true; } -static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t *video_info) { d3d_video_t *d3d = (d3d_video_t*)data; LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; @@ -84,25 +84,11 @@ static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) d3d_swap(d3d, d3dr); } -static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buffer_fps[128]; - const ui_window_t *window = ui_companion_driver_get_window_ptr(); - - buf[0] = buffer_fps[0] = '\0'; - - if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), - buffer_fps, sizeof(buffer_fps))) - { -#ifndef _XBOX - window->set_title(&main_window, buf); -#endif - } - - if (video_info.fps_show) - { #ifdef _XBOX + if (video_info->fps_show) + { MEMORYSTATUS stat; char mem[128]; @@ -111,10 +97,15 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) GlobalMemoryStatus(&stat); snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); - strlcat(buffer_fps, mem, sizeof(buffer_fps)); -#endif - runloop_msg_queue_push(buffer_fps, 1, 1, false); + strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); } +#else + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + + if (window && video_info->monitor_fps_enable) + window->set_title(&main_window, video_info->window_text); +#endif + } static void gfx_ctx_d3d_show_mouse(void *data, bool state) @@ -197,7 +188,7 @@ static void gfx_ctx_d3d_input_driver(void *data, } static bool gfx_ctx_d3d_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 9452198716..9ca36685cb 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -225,7 +225,7 @@ static bool gfx_ctx_drm_queue_flip(void) return false; } -static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t *video_info) { gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; @@ -253,7 +253,7 @@ static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) waiting_for_flip = gfx_ctx_drm_queue_flip(); /* Triple-buffered page flips */ - if (video_info.max_swapchain_images >= 3 && + if (video_info->max_swapchain_images >= 3 && gbm_surface_has_free_buffers(g_gbm_surface)) return; @@ -270,18 +270,8 @@ static bool gfx_ctx_drm_set_resize(void *data, return false; } -static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - - if (video_info.fps_show) - runloop_msg_queue_push( buf_fps, 1, 1, false); } static void gfx_ctx_drm_get_video_size(void *data, @@ -617,7 +607,7 @@ error: #endif static bool gfx_ctx_drm_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -634,7 +624,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, /* If we use black frame insertion, * we fake a 60 Hz monitor for 120 Hz one, * etc, so try to match that. */ - refresh_mod = video_info.black_frame_insertion + refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; /* Find desired video mode, and use that. @@ -660,7 +650,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, continue; diff = fabsf(refresh_mod * g_drm_connector->modes[i].vrefresh - - video_info.refresh_rate); + - video_info->refresh_rate); if (!g_drm_mode || diff < minimum_fps_diff) { diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 1b750a3689..6e5c5eb854 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -75,7 +75,7 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, *quit = false; } -static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t *video_info) { (void)data; /* no-op in emscripten, no way to force swap/wait for VSync in browsers */ @@ -90,17 +90,8 @@ static bool gfx_ctx_emscripten_set_resize(void *data, return false; } -static void gfx_ctx_emscripten_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_emscripten_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_emscripten_get_video_size(void *data, @@ -189,7 +180,7 @@ error: } static bool gfx_ctx_emscripten_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -330,7 +321,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ gfx_ctx_emscripten_translate_aspect, - gfx_ctx_emscripten_update_window_title, + gfx_ctx_emscripten_update_title, gfx_ctx_emscripten_check_window, gfx_ctx_emscripten_set_resize, gfx_ctx_emscripten_has_focus, diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 7f35a5a993..1c3d30cef9 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -87,19 +87,12 @@ static bool gfx_ctx_gdi_set_resize(void *data, return false; } -static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_gdi_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; const ui_window_t *window = ui_companion_driver_get_window_ptr(); - buf[0] = buf_fps[0] = '\0'; - - if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps))) - window->set_title(&main_window, buf); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); + if (window && video_info->monitor_fps_enable) + window->set_title(&main_window, video_info->window_text); } static void gfx_ctx_gdi_get_video_size(void *data, @@ -190,7 +183,7 @@ static void gfx_ctx_gdi_destroy(void *data) } static bool gfx_ctx_gdi_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -287,7 +280,7 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) return flags; } -static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t *video_info) { (void)data; diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index f4cf4f63d5..90b1cb2def 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -35,7 +35,7 @@ static void gfx_ctx_null_check_window(void *data, bool *quit, (void)resize; } -static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t *video_info) { (void)data; } @@ -48,10 +48,8 @@ static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) return false; } -static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t *video_info) { - (void)data; - (void)video_info; } static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) @@ -62,7 +60,7 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h } static bool gfx_ctx_null_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index 80276bae10..c6fcd07e2e 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -110,21 +110,12 @@ static bool gfx_ctx_khr_display_set_resize(void *data, return false; } -static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_khr_display_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -201,7 +192,7 @@ static void gfx_ctx_khr_display_set_swap_interval(void *data, unsigned swap_inte } } -static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t *video_info) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; vulkan_present(&khr->vk, khr->vk.context.current_swapchain_index); diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index de76f06aea..977919627b 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -158,21 +158,12 @@ static bool gfx_ctx_mali_fbdev_set_resize(void *data, return false; } -static void gfx_ctx_mali_fbdev_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_mali_fbdev_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -269,7 +260,7 @@ static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, unsigned swap_inter #endif } -static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t *video_info) { mali_ctx_data_t *mali = (mali_ctx_data_t*)data; @@ -319,7 +310,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_mali_fbdev_update_window_title, + gfx_ctx_mali_fbdev_update_title, gfx_ctx_mali_fbdev_check_window, gfx_ctx_mali_fbdev_set_resize, gfx_ctx_mali_fbdev_has_focus, diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index bab164cadc..d613c18a86 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -141,21 +141,12 @@ static bool gfx_ctx_opendingux_set_resize(void *data, return false; } -static void gfx_ctx_opendingux_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_opendingux_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_opendingux_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -232,7 +223,7 @@ static bool gfx_ctx_opendingux_has_windowed(void *data) return false; } -static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t *video_info) { opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index f6899ece1b..829d6c38bb 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -238,7 +238,7 @@ static void osmesa_ctx_swap_interval(void *data, unsigned interval) } static bool osmesa_ctx_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -306,20 +306,8 @@ static void osmesa_ctx_get_video_size(void *data, *height = osmesa->height; } -static void osmesa_ctx_update_window_title(void *data, video_frame_info_t video_info) +static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) { - static char buf[128] = {0}; - static char buf_fps[128] = {0}; - gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; - - if (!osmesa) - return; - - video_monitor_get_fps(video_info, buf, - sizeof(buf), buf_fps, sizeof(buf_fps)); - - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, @@ -361,7 +349,7 @@ static bool osmesa_ctx_has_windowed(void *data) return true; } -static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t video_info) +static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t *video_info) { gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; osmesa_fifo_accept(osmesa); @@ -417,7 +405,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, /* translate_aspect */ - osmesa_ctx_update_window_title, + osmesa_ctx_update_title, osmesa_ctx_check_window, osmesa_ctx_set_resize, osmesa_ctx_has_focus, diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index fa34420ec9..4a26e0b4ca 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -179,7 +179,7 @@ static bool gfx_ctx_ps3_has_windowed(void *data) return false; } -static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) { (void)data; #ifdef HAVE_LIBDBGFONT @@ -199,19 +199,8 @@ static bool gfx_ctx_ps3_set_resize(void *data, return false; } -static void gfx_ctx_ps3_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_ps3_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - (void)data; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_ps3_get_video_size(void *data, @@ -302,15 +291,10 @@ static void *gfx_ctx_ps3_init(video_frame_info_t video_info, void *video_driver) } static bool gfx_ctx_ps3_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { - global_t *global = global_get_ptr(); - - if (!global) - return false; - return true; } @@ -438,7 +422,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { gfx_ctx_ps3_get_video_output_next, NULL, /* get_metrics */ NULL, - gfx_ctx_ps3_update_window_title, + gfx_ctx_ps3_update_title, gfx_ctx_ps3_check_window, gfx_ctx_ps3_set_resize, gfx_ctx_ps3_has_focus, diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 31ffdbda4b..8308f60fcf 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -319,21 +319,12 @@ static bool gfx_ctx_qnx_set_resize(void *data, return false; } -static void gfx_ctx_qnx_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_qnx_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_qnx_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -444,7 +435,7 @@ static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned swap_interval) #endif } -static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t *video_info) { qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; @@ -493,7 +484,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { NULL, /* get_video_output_next */ gfx_ctx_qnx__get_metrics, NULL, - gfx_ctx_qnx_update_window_title, + gfx_ctx_qnx_update_title, gfx_ctx_qnx_check_window, gfx_ctx_qnx_set_resize, gfx_ctx_qnx_has_focus, diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 50dd0c33a9..e4c34a8194 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -163,7 +163,7 @@ static void sdl_ctx_swap_interval(void *data, unsigned interval) } static bool sdl_ctx_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -177,7 +177,7 @@ static bool sdl_ctx_set_video_mode(void *data, if (fullscreen) { - if (video_info.windowed_fullscreen) + if (video_info->windowed_fullscreen) fsflag = SDL_WINDOW_FULLSCREEN_DESKTOP; else fsflag = SDL_WINDOW_FULLSCREEN; @@ -192,7 +192,7 @@ static bool sdl_ctx_set_video_mode(void *data, } else { - unsigned display = video_info.monitor_index; + unsigned display = video_info->monitor_index; sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), @@ -268,27 +268,18 @@ static void sdl_ctx_get_video_size(void *data, } } -static void sdl_ctx_update_window_title(void *data, video_frame_info_t video_info) +static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - if (video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps))) + if (video_info->monitor_fps_enable) { #ifdef HAVE_SDL2 gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; if (sdl) - SDL_SetWindowTitle(sdl->g_win, buf); + SDL_SetWindowTitle(sdl->g_win, video_info->window_text); #else - SDL_WM_SetCaption(buf, NULL); + SDL_WM_SetCaption(video_info->window_text, NULL); #endif } - - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, @@ -379,7 +370,7 @@ static bool sdl_ctx_has_windowed(void *data) return true; } -static void sdl_ctx_swap_buffers(void *data, video_frame_info_t video_info) +static void sdl_ctx_swap_buffers(void *data, video_frame_info_t *video_info) { #ifdef HAVE_SDL2 gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; @@ -435,7 +426,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, /* translate_aspect */ - sdl_ctx_update_window_title, + sdl_ctx_update_title, sdl_ctx_check_window, sdl_ctx_set_resize, sdl_ctx_has_focus, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 959b0571e3..090c507ec6 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -105,17 +105,8 @@ static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) return false; } -static void gfx_ctx_vc_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_vc_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static void gfx_ctx_vc_get_video_size(void *data, @@ -319,7 +310,7 @@ static void gfx_ctx_vc_set_swap_interval(void *data, unsigned swap_interval) } static bool gfx_ctx_vc_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -608,7 +599,7 @@ error: return false; } -static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t *video_info) { vc_ctx_data_t *vc = (vc_ctx_data_t*)data; @@ -659,7 +650,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ gfx_ctx_vc_translate_aspect, - gfx_ctx_vc_update_window_title, + gfx_ctx_vc_update_title, gfx_ctx_vc_check_window, gfx_ctx_vc_set_resize, gfx_ctx_vc_has_focus, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index ac12fc7afa..ea10357d0e 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -145,21 +145,12 @@ static bool gfx_ctx_vivante_set_resize(void *data, return false; } -static void gfx_ctx_vivante_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_vivante_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; - - buf[0] = buf_fps[0] = '\0'; - - video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps)); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); } static bool gfx_ctx_vivante_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -246,7 +237,7 @@ static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned swap_interval #endif } -static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t *video_info) { vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; @@ -297,7 +288,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_vivante_update_window_title, + gfx_ctx_vivante_update_title, gfx_ctx_vivante_check_window, gfx_ctx_vivante_set_resize, gfx_ctx_vivante_has_focus, diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index a59e99f91c..13a9990e94 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -719,20 +719,12 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) return true; } -static void gfx_ctx_wl_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - buf[0] = buf_fps[0] = '\0'; - - if (video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps))) - wl_shell_surface_set_title(wl->shell_surf, buf); - - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); + if (wl && video_info->monitor_fps_enable) + wl_shell_surface_set_title(wl->shell_surf, video_info->window_text); } @@ -1075,7 +1067,7 @@ static void gfx_ctx_wl_set_swap_interval(void *data, unsigned swap_interval) } static bool gfx_ctx_wl_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -1557,7 +1549,7 @@ static void *gfx_ctx_wl_get_context_data(void *data) } #endif -static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t *video_info) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; @@ -1676,7 +1668,7 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { NULL, /* get_video_output_next */ gfx_ctx_wl_get_metrics, NULL, - gfx_ctx_wl_update_window_title, + gfx_ctx_wl_update_title, gfx_ctx_wl_check_window, gfx_ctx_wl_set_resize, gfx_ctx_wl_has_focus, diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index fba99cf998..57c38441de 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -331,7 +331,7 @@ static void gfx_ctx_wgl_check_window(void *data, bool *quit, } } -static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t *video_info) { (void)data; @@ -386,19 +386,12 @@ static bool gfx_ctx_wgl_set_resize(void *data, return false; } -static void gfx_ctx_wgl_update_window_title(void *data, video_frame_info_t video_info) +static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) { - char buf[128]; - char buf_fps[128]; const ui_window_t *window = ui_companion_driver_get_window_ptr(); - buf[0] = buf_fps[0] = '\0'; - - if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), - buf_fps, sizeof(buf_fps))) - window->set_title(&main_window, buf); - if (video_info.fps_show) - runloop_msg_queue_push(buf_fps, 1, 1, false); + if (window && video_info->monitor_fps_enable) + window->set_title(&main_window, video_info->window_text); } static void gfx_ctx_wgl_get_video_size(void *data, @@ -525,7 +518,7 @@ static void gfx_ctx_wgl_destroy(void *data) } static bool gfx_ctx_wgl_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -687,7 +680,7 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { NULL, /* get_video_output_next */ gfx_ctx_wgl_get_metrics, NULL, - gfx_ctx_wgl_update_window_title, + gfx_ctx_wgl_update_title, gfx_ctx_wgl_check_window, gfx_ctx_wgl_set_resize, gfx_ctx_wgl_has_focus, diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 50a504abc2..cb5cac0582 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -302,7 +302,7 @@ static void gfx_ctx_x_swap_interval(void *data, unsigned interval) } } -static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) { gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; @@ -545,7 +545,7 @@ error: } static bool gfx_ctx_x_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -565,7 +565,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, if (!x) return false; - windowed_full = video_info.windowed_fullscreen; + windowed_full = video_info->windowed_fullscreen; true_full = false; switch (x_api) @@ -613,8 +613,8 @@ static bool gfx_ctx_x_set_video_mode(void *data, RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n"); } - if (video_info.monitor_index) - g_x11_screen = video_info.monitor_index - 1; + if (video_info->monitor_index) + g_x11_screen = video_info->monitor_index - 1; #ifdef HAVE_XINERAMA if (fullscreen || g_x11_screen != 0) @@ -662,7 +662,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, x11_set_window_attr(g_x11_dpy, g_x11_win); - x11_update_window_title(NULL, video_info); + x11_update_title(NULL, video_info); if (fullscreen) x11_show_mouse(g_x11_dpy, g_x11_win, false); @@ -1081,7 +1081,7 @@ const gfx_ctx_driver_t gfx_ctx_x = { NULL, /* get_video_output_next */ x11_get_metrics, NULL, - x11_update_window_title, + x11_update_title, gfx_ctx_x_check_window, gfx_ctx_x_set_resize, x11_has_focus, diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 133736d847..c375a68615 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -257,7 +257,7 @@ static EGLint *xegl_fill_attribs(xegl_ctx_data_t *xegl, EGLint *attr) static void gfx_ctx_xegl_set_swap_interval(void *data, unsigned swap_interval); static bool gfx_ctx_xegl_set_video_mode(void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -298,7 +298,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, ButtonPressMask | ButtonReleaseMask | KeyReleaseMask; swa.override_redirect = fullscreen ? True : False; - if (fullscreen && !video_info.windowed_fullscreen) + if (fullscreen && !video_info->windowed_fullscreen) { if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height, &xegl->desktop_mode)) { @@ -309,8 +309,8 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, RARCH_ERR("[X/EGL]: Entering true fullscreen failed. Will attempt windowed mode.\n"); } - if (video_info.monitor_index) - g_x11_screen = video_info.monitor_index - 1; + if (video_info->monitor_index) + g_x11_screen = video_info->monitor_index - 1; #ifdef HAVE_XINERAMA if (fullscreen || g_x11_screen != 0) @@ -352,7 +352,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, goto error; x11_set_window_attr(g_x11_dpy, g_x11_win); - x11_update_window_title(NULL, video_info); + x11_update_title(NULL, video_info); if (fullscreen) x11_show_mouse(g_x11_dpy, g_x11_win, false); @@ -490,7 +490,7 @@ static void gfx_ctx_xegl_show_mouse(void *data, bool state) x11_show_mouse(g_x11_dpy, g_x11_win, state); } -static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t video_info) +static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t *video_info) { xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; @@ -591,7 +591,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = NULL, /* get_video_output_next */ x11_get_metrics, NULL, - x11_update_window_title, + x11_update_title, x11_check_window, gfx_ctx_xegl_set_resize, x11_has_focus, diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 9bf06e725d..254961f58a 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -456,7 +456,7 @@ bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) video_driver_build_info(&video_info); if (!current_video_context->set_video_mode( - video_context_data, video_info, mode_info->width, + video_context_data, &video_info, mode_info->width, mode_info->height, mode_info->fullscreen)) return false; return true; diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 55a150c177..9b85f6d31a 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -78,7 +78,7 @@ typedef struct gfx_ctx_driver void (*swap_interval)(void *data, unsigned); /* Sets video mode. Creates a window, etc. */ - bool (*set_video_mode)(void*, video_frame_info_t video_info, unsigned, unsigned, bool); + bool (*set_video_mode)(void*, video_frame_info_t *video_info, unsigned, unsigned, bool); /* Gets current window size. * If not initialized yet, it returns current screen size. */ @@ -101,7 +101,7 @@ typedef struct gfx_ctx_driver float (*translate_aspect)(void*, unsigned, unsigned); /* Asks driver to update window title (FPS, etc). */ - void (*update_window_title)(void*, video_frame_info_t video_info); + void (*update_window_title)(void*, video_frame_info_t *video_info); /* Queries for resize and quit events. * Also processes events. */ @@ -123,7 +123,7 @@ typedef struct gfx_ctx_driver /* Swaps buffers. VBlank sync depends on * earlier calls to swap_interval. */ - void (*swap_buffers)(void*, video_frame_info_t video_info); + void (*swap_buffers)(void*, video_frame_info_t *video_info); /* Most video backends will want to use a certain input driver. * Checks for it here. */ diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 9ad62c93be..7146ed805b 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1057,89 +1057,6 @@ bool video_monitor_fps_statistics(double *refresh_rate, } -/** - * video_monitor_get_fps: - * @buf : string suitable for Window title - * @size : size of buffer. - * @buf_fps : string of raw FPS only (optional). - * @size_fps : size of raw FPS buffer. - * - * Get the amount of frames per seconds. - * - * Returns: true if framerate per seconds could be obtained, - * otherwise false. - * - **/ -bool video_monitor_get_fps( - video_frame_info_t video_info, - char *buf, size_t size, - char *buf_fps, size_t size_fps) -{ - static retro_time_t curr_time; - static retro_time_t fps_time; - retro_time_t new_time = cpu_features_get_time_usec(); - uint64_t frame_count = 0; - - video_driver_threaded_lock(); - frame_count = video_driver_frame_count; - video_driver_threaded_unlock(); - - *buf = '\0'; - - if (frame_count) - { - static float last_fps; - bool ret = false; - unsigned write_index = video_driver_frame_time_count++ & - (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); - - video_driver_frame_time_samples[write_index] = new_time - fps_time; - fps_time = new_time; - - if ((frame_count % FPS_UPDATE_INTERVAL) == 0) - { - char frames_text[64]; - - last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); - curr_time = new_time; - - fill_pathname_noext(buf, - video_driver_title_buf, - " || ", - size); - - if (video_info.fps_show) - { - char fps_text[64]; - snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); - strlcat(buf, fps_text, size); - } - - strlcat(buf, "Frames: ", size); - - snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, - (unsigned long long)frame_count); - - strlcat(buf, frames_text, size); - ret = true; - } - - if (buf_fps && video_info.fps_show) - snprintf(buf_fps, size_fps, "FPS: %6.1f || %s: " STRING_REP_UINT64, - last_fps, - msg_hash_to_str(MSG_FRAMES), - (unsigned long long)frame_count); - - return ret; - } - - curr_time = fps_time = new_time; - strlcpy(buf, video_driver_title_buf, size); - if (buf_fps) - strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); - - return true; -} float video_driver_get_aspect_ratio(void) { @@ -2086,6 +2003,93 @@ unsigned video_pixel_get_alignment(unsigned pitch) return 8; } +/** + * video_monitor_get_fps: + * + * Get the amount of frames per seconds. + * + * Returns: true if framerate per seconds could be obtained, + * otherwise false. + * + **/ +static bool video_monitor_get_fps(video_frame_info_t *video_info) +{ + static retro_time_t curr_time; + static retro_time_t fps_time; + retro_time_t new_time = cpu_features_get_time_usec(); + + if (video_info->frame_count) + { + static float last_fps; + bool ret = false; + unsigned write_index = video_driver_frame_time_count++ & + (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); + + video_driver_frame_time_samples[write_index] = new_time - fps_time; + fps_time = new_time; + + if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) + { + char frames_text[64]; + + last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); + curr_time = new_time; + + fill_pathname_noext(video_info->window_text, + video_driver_title_buf, + " || ", + sizeof(video_info->window_text)); + + if (video_info->fps_show) + { + char fps_text[64]; + snprintf(video_info->fps_text, + sizeof(video_info->fps_text), + " FPS: %6.1f || ", last_fps); + strlcat(video_info->window_text, + fps_text, + sizeof(video_info->window_text)); + } + + strlcat(video_info->window_text, + "Frames: ", + sizeof(video_info->window_text)); + + snprintf(frames_text, + sizeof(frames_text), + STRING_REP_UINT64, + (unsigned long long)video_info->frame_count); + + strlcat(video_info->window_text, + frames_text, + sizeof(video_info->window_text)); + ret = true; + } + + if (video_info->fps_text && video_info->fps_show) + snprintf( + video_info->fps_text, + sizeof(video_info->fps_text), + "FPS: %6.1f || %s: " STRING_REP_UINT64, + last_fps, + msg_hash_to_str(MSG_FRAMES), + (unsigned long long)video_info->frame_count); + + return ret; + } + + curr_time = fps_time = new_time; + strlcpy(video_info->window_text, + video_driver_title_buf, + sizeof(video_info->window_text)); + if (video_info->fps_text) + strlcpy(video_info->fps_text, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), + sizeof(video_info->fps_text)); + + return true; +} + /** * video_driver_frame: * @data : pointer to data of the video frame. @@ -2131,6 +2135,13 @@ void video_driver_frame(const void *data, unsigned width, video_driver_build_info(&video_info); + video_driver_threaded_lock(); + video_info.frame_count = video_driver_frame_count; + video_driver_frame_count++; + video_driver_threaded_unlock(); + + video_info.monitor_fps_enable = video_monitor_get_fps(&video_info); + /* Slightly messy code, * but we really need to do processing before blocking on VSync * for best possible scheduling. @@ -2161,16 +2172,14 @@ void video_driver_frame(const void *data, unsigned width, && video_info.font_enable && msg) strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); - video_driver_threaded_lock(); - frame_count = video_driver_frame_count; - video_driver_frame_count++; - video_driver_threaded_unlock(); - if (!current_video || !current_video->frame( video_driver_data, data, width, height, frame_count, - pitch, video_driver_msg, video_info)) + pitch, video_driver_msg, &video_info)) video_driver_active = false; + + if (video_info.fps_show) + runloop_msg_queue_push(video_info.fps_text, 1, 1, false); } void video_driver_display_type_set(enum rarch_display_type type) @@ -2245,6 +2254,10 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->monitor_index = settings->video.monitor_index; video_info->shared_context = settings->video.shared_context; video_info->font_enable = settings->video.font_enable; + + video_info->frame_count = 0; + video_info->window_text[0] = '\0'; + video_info->fps_text[0] = '\0'; } /** diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 768b896607..906deea80e 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -101,6 +101,10 @@ typedef struct video_frame_info bool fullscreen; unsigned monitor_index; bool font_enable; + bool monitor_fps_enable; + char window_text[128]; + char fps_text[128]; + uint64_t frame_count; } video_frame_info_t; /* Optionally implemented interface to poke more @@ -163,7 +167,7 @@ typedef struct video_viewport typedef bool (*video_driver_frame_t)(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info); + unsigned pitch, const char *msg, video_frame_info_t *video_info); typedef struct video_driver { @@ -462,25 +466,6 @@ void video_monitor_set_refresh_rate(float hz); bool video_monitor_fps_statistics(double *refresh_rate, double *deviation, unsigned *sample_points); -/** - * video_monitor_get_fps: - * @video_info : information about the video frame - * @buf : string suitable for Window title - * @size : size of buffer. - * @buf_fps : string of raw FPS only (optional). - * @size_fps : size of raw FPS buffer. - * - * Get the amount of frames per seconds. - * - * Returns: true if framerate per seconds could be obtained, - * otherwise false. - * - **/ -bool video_monitor_get_fps( - video_frame_info_t video_info, - char *buf, size_t size, - char *buf_fps, size_t size_fps); - unsigned video_pixel_get_alignment(unsigned pitch); const video_poke_interface_t *video_driver_get_poke(void); diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index ed868fb1d7..0e1bb2c6f6 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -619,7 +619,7 @@ static void video_thread_loop(void *data) thr->frame.buffer, thr->frame.width, thr->frame.height, thr->frame.count, thr->frame.pitch, *thr->frame.msg ? thr->frame.msg : NULL, - video_info); + &video_info); } slock_unlock(thr->frame.lock); @@ -706,7 +706,7 @@ static bool video_thread_has_windowed(void *data) static bool video_thread_frame(void *data, const void *frame_, unsigned width, unsigned height, uint64_t frame_count, - unsigned pitch, const char *msg, video_frame_info_t video_info) + unsigned pitch, const char *msg, video_frame_info_t *video_info) { unsigned copy_stride; static struct retro_perf_counter thr_frame = {0}; @@ -741,7 +741,7 @@ static bool video_thread_frame(void *data, const void *frame_, { retro_time_t target_frame_time = (retro_time_t) - roundf(1000000 / video_info.refresh_rate); + roundf(1000000 / video_info->refresh_rate); retro_time_t target = thr->last_time + target_frame_time; /* Ideally, use absolute time, but that is only a good idea on POSIX. */ From e620b9b6970c3aa54601dbb5fd0e2124e28a1c7c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 17:42:11 +0100 Subject: [PATCH 184/427] (OSX) Fix OSX --- gfx/drivers_context/cocoa_gl_ctx.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 4876383858..62b9c0a47a 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -621,7 +621,7 @@ const gfx_ctx_driver_t gfx_ctx_cocoagl = { NULL, /* get_video_output_next */ cocoagl_gfx_ctx_get_metrics, NULL, - cocoagl_gfx_ctx_update_window_title, + cocoagl_gfx_ctx_update_title, cocoagl_gfx_ctx_check_window, cocoagl_gfx_ctx_set_resize, cocoagl_gfx_ctx_has_focus, From 40cd1b70cda820a982232ef24c22449dff32cf4e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 17:43:23 +0100 Subject: [PATCH 185/427] Remove runloop.h header includes --- gfx/drivers_context/cgl_ctx.c | 1 - gfx/drivers_context/d3d_ctx.cpp | 1 - gfx/drivers_context/drm_ctx.c | 1 - gfx/drivers_context/gdi_ctx.cpp | 1 - gfx/drivers_context/opendingux_fbdev_ctx.c | 1 - gfx/drivers_context/ps3_ctx.c | 1 - gfx/drivers_context/sdl_gl_ctx.c | 1 - gfx/drivers_context/vivante_fbdev_ctx.c | 1 - gfx/drivers_context/wgl_ctx.cpp | 1 - 9 files changed, 9 deletions(-) diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 6403d6ed35..f31f3c0ad6 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -29,7 +29,6 @@ #include #include -#include "../../runloop.h" #include "../video_context_driver.h" typedef int CGSConnectionID; diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 9c6acaaafb..d163755cf4 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -29,7 +29,6 @@ #include "../drivers/d3d.h" #include "../common/win32_common.h" -#include "../../runloop.h" #include "../../verbosity.h" #include "../../ui/ui_companion_driver.h" diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 9ca36685cb..79402dee86 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -36,7 +36,6 @@ #include #include "../../verbosity.h" -#include "../../runloop.h" #include "../../frontend/frontend_driver.h" #include "../common/drm_common.h" diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 1c3d30cef9..a910159f15 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -34,7 +34,6 @@ #include "../../configuration.h" #include "../../dynamic.h" -#include "../../runloop.h" #include "../../verbosity.h" #include "../video_context_driver.h" diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index d613c18a86..4240c25e7c 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -29,7 +29,6 @@ #endif #include "../../frontend/frontend_driver.h" -#include "../../runloop.h" typedef struct { diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 4a26e0b4ca..430f0ceabb 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -31,7 +31,6 @@ #endif #include "../../configuration.h" -#include "../../runloop.h" #include "../../defines/ps3_defines.h" #include "../common/gl_common.h" #include "../video_context_driver.h" diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index e4c34a8194..cfb1754679 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -25,7 +25,6 @@ #endif #include "../../configuration.h" -#include "../../runloop.h" #include "../common/gl_common.h" static enum gfx_ctx_api sdl_api = GFX_CTX_OPENGL_API; diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index ea10357d0e..61f72aa716 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -29,7 +29,6 @@ #endif #include "../../frontend/frontend_driver.h" -#include "../../runloop.h" typedef struct { diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 57c38441de..901ed3205d 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -41,7 +41,6 @@ #include "../../configuration.h" #include "../../dynamic.h" -#include "../../runloop.h" #include "../video_context_driver.h" #include "../common/win32_common.h" From 6247e9900bee109eb6b0b5c014700561a7001032 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 17:46:08 +0100 Subject: [PATCH 186/427] Remove another header include --- gfx/common/x11_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index a79c6037f7..69a22fb3f2 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -31,7 +31,6 @@ #include "../../frontend/frontend_driver.h" #include "../../input/common/input_x11_common.h" #include "../../verbosity.h" -#include "../../runloop.h" #ifdef HAVE_DBUS #include From aa4790352044cf1bc9c46ec6e9d91befc1427230 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 17:53:25 +0100 Subject: [PATCH 187/427] Prevent 'dereference before null check' --- tasks/task_file_transfer.c | 104 +++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/tasks/task_file_transfer.c b/tasks/task_file_transfer.c index 51d75d39f0..ed1bbcf387 100644 --- a/tasks/task_file_transfer.c +++ b/tasks/task_file_transfer.c @@ -69,63 +69,67 @@ void task_file_load_handler(retro_task_t *task) { nbio_handle_t *nbio = (nbio_handle_t*)task->state; - switch (nbio->status) + if (nbio) { - case NBIO_STATUS_INIT: - if (nbio && !string_is_empty(nbio->path)) - { - const char *fullpath = nbio->path; - struct nbio_t *handle = nbio_open(fullpath, NBIO_READ); - if (handle) + switch (nbio->status) + { + case NBIO_STATUS_INIT: + if (nbio && !string_is_empty(nbio->path)) { - nbio->handle = handle; - nbio->status = NBIO_STATUS_TRANSFER; + const char *fullpath = nbio->path; + struct nbio_t *handle = nbio_open(fullpath, NBIO_READ); - if (strstr(fullpath, file_path_str(FILE_PATH_PNG_EXTENSION))) - nbio->image_type = IMAGE_TYPE_PNG; - else if (strstr(fullpath, file_path_str(FILE_PATH_JPEG_EXTENSION)) - || strstr(fullpath, file_path_str(FILE_PATH_JPG_EXTENSION))) - nbio->image_type = IMAGE_TYPE_JPEG; - else if (strstr(fullpath, file_path_str(FILE_PATH_BMP_EXTENSION))) - nbio->image_type = IMAGE_TYPE_BMP; - else if (strstr(fullpath, file_path_str(FILE_PATH_TGA_EXTENSION))) - nbio->image_type = IMAGE_TYPE_TGA; + if (handle) + { + nbio->handle = handle; + nbio->status = NBIO_STATUS_TRANSFER; - nbio_begin_read(handle); - return; + if (strstr(fullpath, file_path_str(FILE_PATH_PNG_EXTENSION))) + nbio->image_type = IMAGE_TYPE_PNG; + else if (strstr(fullpath, file_path_str(FILE_PATH_JPEG_EXTENSION)) + || strstr(fullpath, file_path_str(FILE_PATH_JPG_EXTENSION))) + nbio->image_type = IMAGE_TYPE_JPEG; + else if (strstr(fullpath, file_path_str(FILE_PATH_BMP_EXTENSION))) + nbio->image_type = IMAGE_TYPE_BMP; + else if (strstr(fullpath, file_path_str(FILE_PATH_TGA_EXTENSION))) + nbio->image_type = IMAGE_TYPE_TGA; + + nbio_begin_read(handle); + return; + } + else + task_set_cancelled(task, true); } - else + break; + case NBIO_STATUS_TRANSFER_PARSE: + if (task_file_transfer_iterate_parse(nbio) == -1) task_set_cancelled(task, true); - } - break; - case NBIO_STATUS_TRANSFER_PARSE: - if (task_file_transfer_iterate_parse(nbio) == -1) - task_set_cancelled(task, true); - nbio->status = NBIO_STATUS_TRANSFER_PARSE_FREE; - break; - case NBIO_STATUS_TRANSFER: - if (task_file_transfer_iterate_transfer(nbio) == -1) - nbio->status = NBIO_STATUS_TRANSFER_PARSE; - break; - case NBIO_STATUS_TRANSFER_PARSE_FREE: - case NBIO_STATUS_POLL: - default: - break; - } + nbio->status = NBIO_STATUS_TRANSFER_PARSE_FREE; + break; + case NBIO_STATUS_TRANSFER: + if (task_file_transfer_iterate_transfer(nbio) == -1) + nbio->status = NBIO_STATUS_TRANSFER_PARSE; + break; + case NBIO_STATUS_TRANSFER_PARSE_FREE: + case NBIO_STATUS_POLL: + default: + break; + } - switch (nbio->image_type) - { - case IMAGE_TYPE_PNG: - case IMAGE_TYPE_JPEG: - case IMAGE_TYPE_TGA: - case IMAGE_TYPE_BMP: - if (!task_image_load_handler(task)) - task_set_finished(task, true); - break; - case 0: - if (nbio->is_finished) - task_set_finished(task, true); - break; + switch (nbio->image_type) + { + case IMAGE_TYPE_PNG: + case IMAGE_TYPE_JPEG: + case IMAGE_TYPE_TGA: + case IMAGE_TYPE_BMP: + if (!task_image_load_handler(task)) + task_set_finished(task, true); + break; + case 0: + if (nbio->is_finished) + task_set_finished(task, true); + break; + } } if (task_get_cancelled(task)) From 31d93cc4b7cad4990dd60022fa58272f46b8ad89 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Wed, 18 Jan 2017 18:56:52 +0100 Subject: [PATCH 188/427] Fix #4449 --- gfx/drivers/gdi_gfx.c | 2 +- managers/state_manager.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 05f9e00509..5f5e419557 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -223,7 +223,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, /* map RGB565 color bits, default is 555 */ masks[0] = 0xF800; masks[1] = 0x07E0; - masks[2] = 0x1F; + masks[2] = 0x001F; } else info->bmiHeader.biCompression = BI_RGB; diff --git a/managers/state_manager.c b/managers/state_manager.c index 435b1f4dd8..c447321944 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -382,6 +382,7 @@ static bool state_manager_pop(state_manager_t *state, const void **data) return true; } + *data = state->thisblock; if (state->head == state->tail) return false; @@ -395,7 +396,6 @@ static bool state_manager_pop(state_manager_t *state, const void **data) state->maxcompsize, out, state->blocksize); state->entries--; - *data = state->thisblock; return true; } @@ -623,9 +623,15 @@ void state_manager_check_rewind(bool pressed, bsv_movie_ctl(BSV_MOVIE_CTL_FRAME_REWIND, NULL); } else + { + retro_ctx_serialize_info_t serial_info; + serial_info.data_const = buf; + serial_info.size = rewind_state.size; + core_unserialize(&serial_info); runloop_msg_queue_push( msg_hash_to_str(MSG_REWIND_REACHED_END), 0, 30, true); + } } else { From d641b64d5eb685b9b88156a87470ab33661761f7 Mon Sep 17 00:00:00 2001 From: Alcaro Date: Wed, 18 Jan 2017 19:48:35 +0100 Subject: [PATCH 189/427] Kill segfault with -L /not/a/dylib.png --- dynamic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dynamic.c b/dynamic.c index 86a09c91d8..48b9b4874b 100644 --- a/dynamic.c +++ b/dynamic.c @@ -252,6 +252,7 @@ static bool load_dynamic_core(void) RARCH_ERR("Error(s): %s\n", dylib_error()); runloop_msg_queue_push(msg_hash_to_str(MSG_FAILED_TO_OPEN_LIBRETRO_CORE), 1, 180, true); + retroarch_fail(1, "load_dynamic_core()"); return false; } From bf511b72e65ad5a6d873d63d2c95d9cc23e20014 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 21:23:18 +0100 Subject: [PATCH 190/427] Create menu_driver_frame --- gfx/drivers/caca_gfx.c | 2 +- gfx/drivers/ctr_gfx.c | 2 +- gfx/drivers/d3d.cpp | 2 +- gfx/drivers/gdi_gfx.c | 2 +- gfx/drivers/gl.c | 2 +- gfx/drivers/sdl2_gfx.c | 2 +- gfx/drivers/vita2d_gfx.c | 2 +- gfx/drivers/vulkan.c | 2 +- menu/drivers/materialui.c | 2 +- menu/drivers/nuklear.c | 2 +- menu/drivers/xmb.c | 2 +- menu/drivers/xui.cpp | 2 +- menu/drivers/zarch.c | 2 +- menu/menu_driver.c | 15 +++++++++------ menu/menu_driver.h | 5 +++-- 15 files changed, 25 insertions(+), 21 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index b55eb5bd40..4ac19e03cc 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -145,7 +145,7 @@ static bool caca_gfx_frame(void *data, const void *frame, caca_clear_canvas(caca_cv); #ifdef HAVE_MENU - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); #endif if (msg) diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 67afa4e360..dd0debe44d 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -750,7 +750,7 @@ static bool ctr_frame(void* data, const void* frame, } ctr->msg_rendering_enabled = true; - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); ctr->msg_rendering_enabled = false; } diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index abf51ba807..6e796f4548 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -1449,7 +1449,7 @@ static bool d3d_frame(void *data, const void *frame, if (d3d->menu && d3d->menu->enabled) { d3d_overlay_render(d3d, d3d->menu); - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); } #endif diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index b0aecc2924..560146c7df 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -162,7 +162,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, return true; #ifdef HAVE_MENU - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); #endif if (gdi_video_width != frame_width || gdi_video_height != frame_height || gdi_video_pitch != pitch) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 09c0bd7dc4..4ca72da58b 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1279,7 +1279,7 @@ static bool gl_frame(void *data, const void *frame, #if defined(HAVE_MENU) if (gl->menu_texture_enable) { - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); if (gl->menu_texture_enable) gl_draw_texture(gl); diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 438abdeb4c..8dd22ccdcd 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -522,7 +522,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, SDL_RenderCopyEx(vid->renderer, vid->frame.tex, NULL, NULL, vid->rotation, NULL, SDL_FLIP_NONE); #ifdef HAVE_MENU - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); #endif if (vid->menu.active) diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index bf784591ea..e1747e354d 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -217,7 +217,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame, if (vita->menu.active) { - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); if(vita->menu.texture){ if (vita->fullscreen) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index a9c2e958a2..0765c9fc9c 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1738,7 +1738,7 @@ static bool vulkan_frame(void *data, const void *frame, #if defined(HAVE_MENU) if (vk->menu.enable) { - menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); + menu_driver_frame(video_info); if (vk->menu.textures[vk->menu.last_index].image != VK_NULL_HANDLE) { diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 056974cde4..d86d9a7498 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -938,7 +938,7 @@ static void mui_draw_bg(menu_display_ctx_draw_t *draw) menu_display_blend_end(); } -static void mui_frame(void *data) +static void mui_frame(void *data, video_frame_info_t *video_info) { float black_bg[16] = { 0, 0, 0, 0.75, diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 78b37184c5..c7dc425ab6 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -302,7 +302,7 @@ static void nk_menu_main(nk_menu_handle_t *nk) } -static void nk_menu_frame(void *data) +static void nk_menu_frame(void *data, video_frame_info_t *video_info) { float white_bg[16]= { 0.98, 0.98, 0.98, 1, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 8fe641b054..f017cb0a8d 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2553,7 +2553,7 @@ static void xmb_draw_dark_layer( menu_display_blend_end(); } -static void xmb_frame(void *data) +static void xmb_frame(void *data, video_frame_info_t *video_info) { size_t selection; size_t percent_width = 0; diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index c688ab193a..3c57b9808c 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -399,7 +399,7 @@ end: string_list_free(list); } -static void xui_frame(void *data) +static void xui_frame(void *data, video_frame_info_t *video_info) { XUIMessage msg; XUIMessageRender msgRender; diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 34a6d38e81..2eeae2d002 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -846,7 +846,7 @@ static int zarch_zui_render_pick_core(zui_t *zui) return 0; } -static void zarch_frame(void *data) +static void zarch_frame(void *data, video_frame_info_t *video_info) { unsigned i; float coord_color[16]; diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 6bd0a55681..73f284c8c1 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -302,6 +302,15 @@ const char *menu_driver_ident(void) return menu_driver_ctx->ident; } +void menu_driver_frame(video_frame_info_t *video_info) +{ + if (!menu_driver_alive) + return; + + if (menu_driver_ctx->frame) + menu_driver_ctx->frame(menu_userdata, video_info); +} + /** * menu_update_libretro_info: * @@ -484,12 +493,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) menu_driver_data->state = 0; break; - case RARCH_MENU_CTL_FRAME: - if (!menu_driver_alive) - return false; - if (menu_driver_ctx->frame) - menu_driver_ctx->frame(menu_userdata); - break; case RARCH_MENU_CTL_SET_PREVENT_POPULATE: menu_driver_prevent_populate = true; break; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index e097fd6a06..3d1b9c6731 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -99,7 +99,6 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_BLIT_RENDER, RARCH_MENU_CTL_RENDER, RARCH_MENU_CTL_RENDER_MESSAGEBOX, - RARCH_MENU_CTL_FRAME, RARCH_MENU_CTL_SET_PREVENT_POPULATE, RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, RARCH_MENU_CTL_IS_PREVENT_POPULATE, @@ -238,7 +237,7 @@ typedef struct menu_ctx_driver void (*render_messagebox)(void *data, const char *msg); int (*iterate)(void *data, void *userdata, enum menu_action action); void (*render)(void *data); - void (*frame)(void *data); + void (*frame)(void *data, video_frame_info_t *video_info); void* (*init)(void**); void (*free)(void*); void (*context_reset)(void *data); @@ -390,6 +389,8 @@ bool menu_driver_is_binding_state(void); void menu_driver_set_binding_state(bool on); +void menu_driver_frame(video_frame_info_t *video_info); + extern menu_ctx_driver_t menu_ctx_xui; extern menu_ctx_driver_t menu_ctx_rgui; extern menu_ctx_driver_t menu_ctx_mui; From dc196498021d37524ac0849f65b93ee7d08ff149 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 21:40:56 +0100 Subject: [PATCH 191/427] Reduce dependence on video_driver_get_frame_count --- menu/drivers/materialui.c | 10 ++++---- menu/drivers/rgui.c | 4 +--- menu/drivers/xmb.c | 9 +++++--- menu/drivers/zarch.c | 48 ++++++++++++++++++++++++++------------- 4 files changed, 45 insertions(+), 26 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index d86d9a7498..754ec1d813 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -800,7 +800,9 @@ static void mui_render_label_value(mui_handle_t *mui, mui_node_t *node, ); } -static void mui_render_menu_list(mui_handle_t *mui, +static void mui_render_menu_list( + video_frame_info_t *video_info, + mui_handle_t *mui, unsigned width, unsigned height, uint32_t font_normal_color, uint32_t font_hover_color, @@ -809,9 +811,8 @@ static void mui_render_menu_list(mui_handle_t *mui, float sum = 0; unsigned header_height = 0; size_t i = 0; - uint64_t frame_count = 0; file_list_t *list = NULL; - frame_count = video_driver_get_frame_count(); + uint64_t frame_count = video_info->frame_count; if (!menu_display_get_update_pending()) return; @@ -1036,7 +1037,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) size_t selection = 0; size_t title_margin = 0; mui_handle_t *mui = (mui_handle_t*)data; - uint64_t frame_count = video_driver_get_frame_count(); + uint64_t frame_count = video_info->frame_count; settings_t *settings = config_get_ptr(); bool background_rendered = false; bool libretro_running = menu_display_libretro_running(); @@ -1293,6 +1294,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) menu_display_font_bind_block(mui->font2, &mui->raster_block2); mui_render_menu_list( + video_info, mui, width, height, diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 2b683af47c..416e4c7502 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -394,11 +394,9 @@ static void rgui_render(void *data) char title_msg[64]; char msg[255]; bool msg_force = false; - uint64_t frame_count = 0; settings_t *settings = config_get_ptr(); rgui_t *rgui = (rgui_t*)data; - - frame_count = video_driver_get_frame_count(); + uint64_t frame_count = video_driver_get_frame_count(); msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0'; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index f017cb0a8d..6b23aa2548 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2064,6 +2064,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, } static void xmb_draw_items( + video_frame_info_t *video_info, menu_display_frame_info_t menu_disp_info, xmb_handle_t *xmb, file_list_t *list, file_list_t *stack, @@ -2073,10 +2074,9 @@ static void xmb_draw_items( size_t i; math_matrix_4x4 mymat; menu_display_ctx_rotate_draw_t rotate_draw; - uint64_t frame_count = 0; xmb_node_t *core_node = NULL; size_t end = 0; - frame_count = video_driver_get_frame_count(); + uint64_t frame_count = video_info->frame_count; if (!list || !list->size) return; @@ -2813,7 +2813,9 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) menu_display_blend_end(); /* Vertical icons */ - xmb_draw_items(menu_disp_info, + xmb_draw_items( + video_info, + menu_disp_info, xmb, xmb->selection_buf_old, xmb->menu_stack_old, @@ -2828,6 +2830,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) menu_stack = menu_entries_get_menu_stack_ptr(0); xmb_draw_items( + video_info, menu_disp_info, xmb, selection_buf, diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 2eeae2d002..8409ab780b 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -311,19 +311,19 @@ static bool zarch_zui_button(zui_t *zui, int x1, int y1, const char *label) + zarch_zui_strwidth(zui->font, label, 1.0) + 24, y1 + 64, label); } -static bool zarch_zui_list_item(zui_t *zui, struct zui_tabbed *tab, int x1, int y1, +static bool zarch_zui_list_item(video_frame_info_t *video_info, + zui_t *zui, struct zui_tabbed *tab, int x1, int y1, const char *label, unsigned item_id, const char *entry, bool selected) { menu_animation_ctx_ticker_t ticker; unsigned ticker_size; char title_buf[PATH_MAX_LENGTH]; - uint64_t frame_count = NULL; unsigned id = zarch_zui_hash(zui, label); int x2 = x1 + zui->width - 290 - 40; int y2 = y1 + 50; bool active = zarch_zui_check_button_up(zui, id, x1, y1, x2, y2); const float *bg = zui_bg_panel; - frame_count = video_driver_get_frame_count(); + uint64_t frame_count = video_info->frame_count; title_buf[0] = '\0'; @@ -500,7 +500,9 @@ static bool zarch_zui_gamepad_input(zui_t *zui, return false; } -static int zarch_zui_render_lay_root_recent(zui_t *zui, struct zui_tabbed *tabbed) +static int zarch_zui_render_lay_root_recent( + video_frame_info_t *video_info, + zui_t *zui, struct zui_tabbed *tabbed) { if (zarch_zui_tab(zui, tabbed, "Recent", 0)) { @@ -524,7 +526,9 @@ static int zarch_zui_render_lay_root_recent(zui_t *zui, struct zui_tabbed *tabbe menu_entry_get_rich_label(i, rich_label, sizeof(rich_label)); menu_entry_get_value(i, NULL, entry_value,sizeof(entry_value)); - if (zarch_zui_list_item(zui, tabbed, 0, + if (zarch_zui_list_item( + video_info, + zui, tabbed, 0, tabbed->tabline_size + j * ZUI_ITEM_SIZE_PX, rich_label, i, entry_value, gamepad_index == (signed)i)) { @@ -563,7 +567,9 @@ static void zarch_zui_render_lay_root_load_set_new_path(zui_t *zui, zui->load_dlist = NULL; } -static int zarch_zui_render_lay_root_load(zui_t *zui, +static int zarch_zui_render_lay_root_load( + video_frame_info_t *video_info, + zui_t *zui, struct zui_tabbed *tabbed) { char parent_dir[PATH_MAX_LENGTH]; @@ -605,7 +611,9 @@ static int zarch_zui_render_lay_root_load(zui_t *zui, fill_pathname_parent_dir(parent_dir, zui->load_cwd, sizeof(parent_dir)); if (!string_is_empty(parent_dir) && - zarch_zui_list_item(zui, tabbed, 0, + zarch_zui_list_item( + video_info, + zui, tabbed, 0, tabbed->tabline_size + 73, " ..", 0, NULL, false /* TODO/FIXME */)) { zarch_zui_render_lay_root_load_set_new_path(zui, parent_dir); @@ -651,7 +659,9 @@ static int zarch_zui_render_lay_root_load(zui_t *zui, if (path_is_directory(path)) strncat(label, "/", sizeof(label)-1); - if (zarch_zui_list_item(zui, tabbed, 0, + if (zarch_zui_list_item( + video_info, + zui, tabbed, 0, tabbed->tabline_size + 73 + j * ZUI_ITEM_SIZE_PX, label, i, NULL, gamepad_index == (signed)(i-skip))) { @@ -709,7 +719,8 @@ static int zarch_zui_render_lay_root_downloads( return 0; } -static int zarch_zui_render_lay_root(zui_t *zui) +static int zarch_zui_render_lay_root(video_frame_info_t *video_info, + zui_t *zui) { char item[PATH_MAX_LENGTH]; static struct zui_tabbed tabbed = {~0U}; @@ -719,9 +730,9 @@ static int zarch_zui_render_lay_root(zui_t *zui) tabbed.width = zui->width - 290 - 40; zui->next_selection_set = false; - if (zarch_zui_render_lay_root_recent(zui, &tabbed)) + if (zarch_zui_render_lay_root_recent(video_info, zui, &tabbed)) return 0; - if (zarch_zui_render_lay_root_load (zui, &tabbed)) + if (zarch_zui_render_lay_root_load(video_info, zui, &tabbed)) return 0; if (zarch_zui_render_lay_root_collections(zui, &tabbed)) return 0; @@ -792,7 +803,8 @@ static void zarch_zui_draw_cursor(float x, float y) { } -static int zarch_zui_render_pick_core(zui_t *zui) +static int zarch_zui_render_pick_core(video_frame_info_t *video_info, + zui_t *zui) { static struct zui_tabbed tabbed = {~0U}; unsigned i, j = 0; @@ -814,7 +826,9 @@ static int zarch_zui_render_pick_core(zui_t *zui) if (!zui->pick_supported) { - zarch_zui_list_item(zui, &tabbed, 0, ZUI_ITEM_SIZE_PX, + zarch_zui_list_item( + video_info, + zui, &tabbed, 0, ZUI_ITEM_SIZE_PX, "Content unsupported", 0, NULL, false /* TODO/FIXME */); return 1; } @@ -828,7 +842,9 @@ static int zarch_zui_render_pick_core(zui_t *zui) if (j > 10) break; - if (zarch_zui_list_item(zui, &tabbed, 0, ZUI_ITEM_SIZE_PX + j * ZUI_ITEM_SIZE_PX, + if (zarch_zui_list_item( + video_info, + zui, &tabbed, 0, ZUI_ITEM_SIZE_PX + j * ZUI_ITEM_SIZE_PX, zui->pick_cores[i].display_name, i, NULL, false)) { int ret = zarch_zui_load_content(zui, i); @@ -899,7 +915,7 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) case LAY_HOME: if (zarch_zui_render_sidebar(zui)) return; - if (zarch_zui_render_lay_root(zui)) + if (zarch_zui_render_lay_root(video_info, zui)) return; break; case LAY_SETTINGS: @@ -908,7 +924,7 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) case LAY_PICK_CORE: if (zarch_zui_render_sidebar(zui)) return; - if (zarch_zui_render_pick_core(zui)) + if (zarch_zui_render_pick_core(video_info, zui)) return; break; } From 34da27c36b2842f2ded8c259bf4c662d3eeb8d52 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 21:47:12 +0100 Subject: [PATCH 192/427] Don't need 'frame_count' variable for check_window --- gfx/common/x11_common.c | 2 +- gfx/common/x11_common.h | 2 +- gfx/drivers_context/android_ctx.c | 4 +--- gfx/drivers_context/cgl_ctx.c | 7 +++---- gfx/drivers_context/d3d_ctx.cpp | 2 +- gfx/drivers_context/drm_ctx.c | 3 +-- gfx/drivers_context/emscriptenegl_ctx.c | 3 +-- gfx/drivers_context/gdi_ctx.cpp | 2 +- gfx/drivers_context/gfx_null_ctx.c | 3 +-- gfx/drivers_context/khr_display_ctx.c | 3 +-- gfx/drivers_context/mali_fbdev_ctx.c | 4 +--- gfx/drivers_context/opendingux_fbdev_ctx.c | 2 +- gfx/drivers_context/osmesa_ctx.c | 7 +++---- gfx/drivers_context/ps3_ctx.c | 2 +- gfx/drivers_context/qnx_ctx.c | 5 +---- gfx/drivers_context/sdl_gl_ctx.c | 5 +---- gfx/drivers_context/vc_egl_ctx.c | 3 +-- gfx/drivers_context/vivante_fbdev_ctx.c | 2 +- gfx/drivers_context/wayland_ctx.c | 5 +---- gfx/drivers_context/wgl_ctx.cpp | 2 +- gfx/drivers_context/x_ctx.c | 6 +++--- gfx/video_context_driver.c | 2 +- gfx/video_context_driver.h | 2 +- 23 files changed, 29 insertions(+), 49 deletions(-) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 69a22fb3f2..196f73ae75 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -633,7 +633,7 @@ bool x11_alive(void *data) } void x11_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width = *width; unsigned new_height = *height; diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index c4ffec01d7..78fd28791b 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -72,7 +72,7 @@ bool x11_get_metrics(void *data, enum display_metric_types type, float *value); void x11_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count); + bool *resize, unsigned *width, unsigned *height); void x11_get_video_size(void *data, unsigned *width, unsigned *height); diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 8058495574..6700c319ae 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -230,14 +230,12 @@ static void android_gfx_ctx_get_video_size(void *data, } static void android_gfx_ctx_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width = 0; unsigned new_height = 0; android_ctx_data_t *and = (android_ctx_data_t*)data; - (void)frame_count; - *quit = false; switch (android_api) diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index f31f3c0ad6..771aa48f96 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -77,11 +77,10 @@ static void gfx_ctx_cgl_get_video_size(void *data, unsigned *width, unsigned *he } static void gfx_ctx_cgl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { - unsigned new_width, new_height; - - (void)frame_count; + unsigned new_width = 0; + unsigned new_height = 0; *quit = false; diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index d163755cf4..9136096e49 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -116,7 +116,7 @@ static void gfx_ctx_d3d_show_mouse(void *data, bool state) static void gfx_ctx_d3d_check_window(void *data, bool *quit, bool *resize, unsigned *width, - unsigned *height, unsigned frame_count) + unsigned *height) { win32_check_window(quit, resize, width, height); } diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 79402dee86..4e1a42409b 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -137,10 +137,9 @@ static void gfx_ctx_drm_swap_interval(void *data, unsigned interval) } static void gfx_ctx_drm_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { (void)data; - (void)frame_count; (void)width; (void)height; diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 6e5c5eb854..bb6b9dfd10 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -52,7 +52,7 @@ static void gfx_ctx_emscripten_swap_interval(void *data, unsigned interval) } static void gfx_ctx_emscripten_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { int input_width; int input_height; @@ -60,7 +60,6 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, emscripten_ctx_data_t *emscripten = (emscripten_ctx_data_t*)data; (void)data; - (void)frame_count; emscripten_get_canvas_size(&input_width, &input_height, &is_fullscreen); *width = (unsigned)input_width; diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index a910159f15..190f0532be 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -64,7 +64,7 @@ static void setup_gdi_pixel_format(HDC hdc) } static void gfx_ctx_gdi_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { win32_check_window(quit, resize, width, height); } diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 90b1cb2def..2198ffb46c 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -25,9 +25,8 @@ static void gfx_ctx_null_swap_interval(void *data, unsigned interval) } static void gfx_ctx_null_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { - (void)frame_count; (void)data; (void)quit; (void)width; diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index c6fcd07e2e..f25d66a541 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -74,10 +74,9 @@ error: } static void gfx_ctx_khr_display_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; - (void)frame_count; *resize = khr->vk.need_new_swapchain; diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 977919627b..cd6ae9403f 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -131,12 +131,10 @@ error: } static void gfx_ctx_mali_fbdev_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width, new_height; - (void)frame_count; - gfx_ctx_mali_fbdev_get_video_size(data, &new_width, &new_height); if (new_width != *width || new_height != *height) diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 4240c25e7c..8ce9f91120 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -112,7 +112,7 @@ static void gfx_ctx_opendingux_get_video_size(void *data, } static void gfx_ctx_opendingux_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width, new_height; opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index 829d6c38bb..27465247b5 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -54,7 +54,6 @@ typedef struct gfx_osmesa_ctx_data int height; int pixsize; - int frame_count; OSMesaContext ctx; int socket; int client; @@ -310,8 +309,9 @@ static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) { } -static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, - unsigned *height, unsigned frame_count) +static void osmesa_ctx_check_window(void *data, bool *quit, + bool *resize,unsigned *width, + unsigned *height) { gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; @@ -319,7 +319,6 @@ static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigne *height = osmesa->height; *resize = false; *quit = false; - osmesa->frame_count = frame_count; } static bool osmesa_ctx_set_resize(void *data, unsigned width, unsigned height) diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 430f0ceabb..ff8cc1e030 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -148,7 +148,7 @@ static void gfx_ctx_ps3_set_swap_interval(void *data, unsigned interval) } static void gfx_ctx_ps3_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { gl_t *gl = data; diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 8308f60fcf..c2e4c15114 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -284,14 +284,11 @@ static void gfx_ctx_qnx_get_video_size(void *data, } static void gfx_ctx_qnx_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width, new_height; qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; - (void)data; - (void)frame_count; - *quit = false; #ifdef HAVE_EGL diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index cfb1754679..3a38de6a0b 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -41,7 +41,6 @@ typedef struct gfx_ctx_sdl_data bool g_full; bool g_resized; - int g_frame_count; #ifdef HAVE_SDL2 SDL_Window *g_win; SDL_GLContext g_ctx; @@ -282,7 +281,7 @@ static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) } static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, - unsigned *height, unsigned frame_count) + unsigned *height) { SDL_Event event; gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; @@ -330,8 +329,6 @@ static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned * *resize = true; sdl->g_resized = false; } - - sdl->g_frame_count = frame_count; } static bool sdl_ctx_set_resize(void *data, unsigned width, unsigned height) diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 090c507ec6..581fd8919d 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -86,10 +86,9 @@ static INLINE bool gfx_ctx_vc_egl_query_extension(vc_ctx_data_t *vc, const char } static void gfx_ctx_vc_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { (void)data; - (void)frame_count; (void)width; (void)height; diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 61f72aa716..6a555db596 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -116,7 +116,7 @@ static void gfx_ctx_vivante_get_video_size(void *data, } static void gfx_ctx_vivante_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width, new_height; vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 13a9990e94..ddcbb55ce3 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -643,14 +643,11 @@ static void flush_wayland_fd(gfx_ctx_wayland_data_t *wl) } static void gfx_ctx_wl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, - unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width, new_height; gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - (void)frame_count; - flush_wayland_fd(wl); new_width = *width; diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 901ed3205d..ee7e48a75b 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -311,7 +311,7 @@ static void gfx_ctx_wgl_swap_interval(void *data, unsigned interval) } static void gfx_ctx_wgl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { win32_check_window(quit, resize, width, height); diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index cb5cac0582..01ebe904eb 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -347,9 +347,9 @@ static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) } static void gfx_ctx_x_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { - x11_check_window(data, quit, resize, width, height, frame_count); + x11_check_window(data, quit, resize, width, height); switch (x_api) { @@ -789,7 +789,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, { bool quit, resize; unsigned width = 0, height = 0; - x11_check_window(x, &quit, &resize, &width, &height, 0); + x11_check_window(x, &quit, &resize, &width, &height); /* Use XCB surface since it's the most supported WSI. * We can obtain the XCB connection directly from X11. */ diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 254961f58a..e66066cfe3 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -282,7 +282,7 @@ bool video_context_driver_check_window(gfx_ctx_size_t *size_data) size_data->quit, size_data->resize, size_data->width, - size_data->height, (unsigned int)video_driver_get_frame_count()); + size_data->height); return true; } diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 9b85f6d31a..f033471ece 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -106,7 +106,7 @@ typedef struct gfx_ctx_driver /* Queries for resize and quit events. * Also processes events. */ void (*check_window)(void*, bool*, bool*, - unsigned*, unsigned*, unsigned); + unsigned*, unsigned*); /* Acknowledge a resize event. This is needed for some APIs. * Most backends will ignore this. */ From d010a852e42e111565e696a8c40aec87816a681d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 22:20:47 +0100 Subject: [PATCH 193/427] Call menu_driver_frame once per video_frame call --- gfx/drivers/caca_gfx.c | 11 ++++++++--- gfx/drivers/ctr_gfx.c | 6 ++++-- gfx/drivers/dispmanx_gfx.c | 8 ++++++++ gfx/drivers/drm_gfx.c | 8 ++++++++ gfx/drivers/exynos_gfx.c | 7 +++++++ gfx/drivers/gdi_gfx.c | 9 ++++++++- gfx/drivers/gx_gfx.c | 20 ++++++++++++-------- gfx/drivers/omap_gfx.c | 14 ++++++++++++-- gfx/drivers/psp1_gfx.c | 8 ++++++++ gfx/drivers/sdl_gfx.c | 8 ++++++++ gfx/drivers/sunxi_gfx.c | 8 ++++++++ gfx/drivers/vg.c | 8 ++++++++ gfx/drivers/vita2d_gfx.c | 2 ++ gfx/drivers/wiiu_gfx.c | 19 ++++++++++++++++--- gfx/drivers/xenon360_gfx.c | 4 ++++ gfx/drivers/xshm_gfx.c | 4 ++++ gfx/drivers/xvideo.c | 12 ++++++++++++ 17 files changed, 137 insertions(+), 19 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 4ac19e03cc..815fcb09af 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -15,13 +15,18 @@ * If not, see . */ -#include #include +#include + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + +#include "../common/caca_common.h" + #include "../../driver.h" #include "../../verbosity.h" -#include "../../menu/menu_driver.h" -#include "../common/caca_common.h" static caca_canvas_t *caca_cv = NULL; static caca_dither_t *caca_dither = NULL; diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index dd0debe44d..ca90959423 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -26,11 +26,13 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../../ctr/gpu_old.h" #include "ctr_gu.h" -#include "../../menu/menu_driver.h" - #include "../../configuration.h" #include "../../command.h" #include "../../driver.h" diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index 1c27cd26f9..fe3698a47a 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -21,6 +21,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../../configuration.h" #include "../../driver.h" #include "../../retroarch.h" @@ -476,6 +480,10 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, dispmanx_surface_free(_dispvars, &_dispvars->menu_surface); } +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + /* Update main surface: locate free page, blit and flip. */ dispmanx_surface_update(_dispvars, frame, _dispvars->main_surface); return true; diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index 62c22f8b55..c3c1e6b021 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -28,6 +28,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../font_driver.h" #include "../video_context_driver.h" #include "../../retroarch.h" @@ -779,6 +783,10 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, drm_plane_setup(_drmvars->main_surface); } +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + /* Update main surface: locate free page, blit and flip. */ drm_surface_update(_drmvars, frame, _drmvars->main_surface); return true; diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 00f0fae394..03b38b86d0 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -35,6 +35,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../common/drm_common.h" #include "../font_driver.h" #include "../../configuration.h" @@ -1315,6 +1319,9 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, { if (exynos_blend_menu(vid->data, vid->menu_rotation) != 0) goto fail; +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif } if (msg) diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 560146c7df..90af988ec4 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -17,10 +17,17 @@ #include +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../../driver.h" #include "../../configuration.h" #include "../../verbosity.h" -#include "../../menu/menu_driver.h" #include "../common/gdi_common.h" #if defined(_WIN32) && !defined(_XBOX) diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 9b9439cf5f..b131268973 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -27,6 +27,11 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#include "../../menu/menu_display.h" +#endif + #ifdef HW_RVL #include "../../memory/wii/mem2_manager.h" #endif @@ -36,8 +41,6 @@ #include "../../configuration.h" #include "../../driver.h" #include "../../runloop.h" -#include "../../menu/menu_driver.h" -#include "../../menu/menu_display.h" extern syssram* __SYS_LockSram(void); extern u32 __SYS_UnlockSram(u32 write); @@ -1500,12 +1503,9 @@ static bool gx_frame(void *data, const void *frame, if (gx->menu_texture_enable && gx->menu_data) { - size_t fb_pitch; - unsigned fb_width, fb_height; - - fb_width = menu_display_get_width(); - fb_height = menu_display_get_height(); - fb_pitch = menu_display_get_framebuffer_pitch(); + unsigned fb_width = menu_display_get_width(); + unsigned fb_height = menu_display_get_height(); + size_t fb_pitch = menu_display_get_framebuffer_pitch(); convert_texture16( gx->menu_data, @@ -1518,6 +1518,10 @@ static bool gx_frame(void *data, const void *frame, fb_width * fb_pitch); } +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + GX_InvalidateTexAll(); GX_SetCurrentMtx(GX_PNMTX0); diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index 1344865ea3..fbc25df83b 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -25,12 +25,16 @@ #include #include +#include +#include + #ifdef HAVE_CONFIG_H #include "../../config.h" #endif -#include -#include +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif #include #include @@ -1008,10 +1012,16 @@ static bool omap_gfx_frame(void *data, const void *frame, unsigned width, omapfb_prepare(vid->omap); omapfb_blit_frame(vid->omap, frame, vid->height, pitch); + +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + if (vid->menu.active) omapfb_blit_frame(vid->omap, vid->menu.frame, vid->menu.scaler.out_height, vid->menu.scaler.out_stride); + if (msg) omap_render_msg(vid, msg); diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 2fbd141fcd..1185064407 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -28,6 +28,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../../defines/psp_defines.h" #include "../../runloop.h" @@ -561,6 +565,10 @@ static bool psp_frame(void *data, const void *frame, performance_counter_stop(&psp_frame_run); +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + if(psp->menu.active) { sceGuSendList(GU_TAIL, psp->menu.dList, &(psp->menu.context_storage)); diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 787c8d8c58..e79fd926a9 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -27,6 +27,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #ifdef HAVE_X11 #include "../common/x11_common.h" #endif @@ -358,6 +362,10 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, pitch); performance_counter_stop(&sdl_scale); +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + if (vid->menu.active) SDL_BlitSurface(vid->menu.frame, NULL, vid->screen, NULL); diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index c01cb7919b..3c290fa22c 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -28,6 +28,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../../retroarch.h" #include "../../runloop.h" #include "../font_driver.h" @@ -779,6 +783,10 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, sunxi_setup_scale(_dispvars, width, height, pitch); } +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + if (_dispvars->menu_active) { ioctl(_dispvars->sunxi_disp->fd_fb, FBIO_WAITFORVSYNC, 0); diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 7791b9b5e3..008e754114 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -31,6 +31,10 @@ #include "../../config.h" #endif +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "../video_context_driver.h" #include "../../retroarch.h" #include "../../runloop.h" @@ -417,6 +421,10 @@ static bool vg_frame(void *data, const void *frame, vg_copy_frame(vg, frame, frame_width, frame_height, pitch); performance_counter_stop(&vg_image); +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + vgDrawImage(vg->mImage); #if 0 diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index e1747e354d..f16d669dcc 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -217,7 +217,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, if (vita->menu.active) { +#ifdef HAVE_MENU menu_driver_frame(video_info); +#endif if(vita->menu.texture){ if (vita->fullscreen) diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index 928993e1e7..c1fb356e5f 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -13,14 +13,23 @@ * If not, see . */ +#include +#include +#include + #include "../../driver.h" #include "../../configuration.h" #include "../../verbosity.h" #include "performance_counters.h" -#include -#include -#include +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + #include "gx2.h" #include "system/memory.h" #include "system/wiiu.h" @@ -668,6 +677,10 @@ static bool wiiu_gfx_frame(void* data, const void* frame, GX2DrawEx(GX2_PRIMITIVE_MODE_QUADS, 4, 0, 1); +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + if (wiiu->menu.enable) { GX2SetAttribBuffer(0, 4 * sizeof(*wiiu->menu.position), sizeof(*wiiu->menu.position), wiiu->menu.position); diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 97efef1224..da74eac58b 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -230,6 +230,10 @@ static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, un Xe_SetShader(vid->gl_device, SHADER_TYPE_PIXEL, vid->g_pPixelTexturedShader, 0); Xe_SetShader(vid->gl_device, SHADER_TYPE_VERTEX, vid->g_pVertexShader, 0); +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + // Draw Xe_DrawPrimitive(vid->gl_device, XE_PRIMTYPE_TRIANGLELIST, 0, 1); diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index 1a5704aee5..31bf833df0 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -104,6 +104,10 @@ static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, memcpy((uint8_t*)xshm->shmInfo.shmaddr + sizeof(uint32_t)*xshm->width*y, (uint8_t*)frame + pitch*y, pitch); } + +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif XShmPutImage(xshm->display, xshm->wndw, xshm->gc, xshm->image, 0, 0, 0, 0, xshm->width, xshm->height, False); diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 782771bda1..ca862d0f60 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -30,6 +30,14 @@ #include +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#ifdef HAVE_MENU +#include ".././menu/menu_driver.h" +#endif + #include "../../configuration.h" #include "../../frontend/frontend_driver.h" #include "../../verbosity.h" @@ -802,6 +810,10 @@ static bool xv_frame(void *data, const void *frame, unsigned width, xv->vp.full_width = target.width; xv->vp.full_height = target.height; +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + if (msg) xv_render_msg(xv, msg, width << 1, height << 1); From 84f9d8674fbd87b82e85a012797b7361ecbcf3ea Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 22:23:19 +0100 Subject: [PATCH 194/427] Implement rgui_frame --- menu/drivers/rgui.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 416e4c7502..ba677413b6 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -62,6 +62,7 @@ typedef struct unsigned last_height; float scroll_y; bool mouse_show; + unsigned int frame_count; } rgui_t; static uint16_t *rgui_framebuf_data = NULL; @@ -381,6 +382,12 @@ static void rgui_blit_cursor(void) rgui_color_rect(fb_pitch, fb_width, fb_height, x - 5, y, 11, 1, 0xFFFF); } +static void rgui_frame(void *data, video_frame_info_t *video_info) +{ + rgui_t *rgui = (rgui_t*)data; + rgui->frame_count = video_info->frame_count; +} + static void rgui_render(void *data) { menu_animation_ctx_ticker_t ticker; @@ -396,7 +403,7 @@ static void rgui_render(void *data) bool msg_force = false; settings_t *settings = config_get_ptr(); rgui_t *rgui = (rgui_t*)data; - uint64_t frame_count = video_driver_get_frame_count(); + uint64_t frame_count = rgui->frame_count; msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0'; @@ -872,7 +879,7 @@ menu_ctx_driver_t menu_ctx_rgui = { rgui_set_message, generic_menu_iterate, rgui_render, - NULL, + rgui_frame, rgui_init, rgui_free, NULL, From c089a925b17301332cb5d70d473a3a58b4ff8672 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Wed, 18 Jan 2017 16:23:44 -0500 Subject: [PATCH 195/427] fix race condition when toggling menu with threaded_video on --- gfx/video_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 7146ed805b..34bed5063a 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -971,18 +971,22 @@ void video_driver_cached_frame_get(const void **data, unsigned *width, void video_driver_get_size(unsigned *width, unsigned *height) { + video_driver_threaded_lock(); if (width) *width = video_driver_width; if (height) *height = video_driver_height; + video_driver_threaded_unlock(); } void video_driver_set_size(unsigned *width, unsigned *height) { + video_driver_threaded_lock(); if (width) video_driver_width = *width; if (height) video_driver_height = *height; + video_driver_threaded_unlock(); } /** From 1981c4b83ea40aa73d00dc5c8604f217ecba453c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 22:25:11 +0100 Subject: [PATCH 196/427] Typo fix --- gfx/drivers/xvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index ca862d0f60..6ee19f84e8 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -35,7 +35,7 @@ #endif #ifdef HAVE_MENU -#include ".././menu/menu_driver.h" +#include "../../menu/menu_driver.h" #endif #include "../../configuration.h" From f3e700aa767d9fef8940049ecee95623c9a21754 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 22:30:16 +0100 Subject: [PATCH 197/427] Add width/height members to video_frame_info --- gfx/video_driver.c | 2 ++ gfx/video_driver.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 34bed5063a..cdbd829932 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2140,6 +2140,8 @@ void video_driver_frame(const void *data, unsigned width, video_driver_build_info(&video_info); video_driver_threaded_lock(); + video_info.width = video_driver_width; + video_info.height = video_driver_height; video_info.frame_count = video_driver_frame_count; video_driver_frame_count++; video_driver_threaded_unlock(); diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 906deea80e..5bd08e8d1f 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -105,6 +105,9 @@ typedef struct video_frame_info char window_text[128]; char fps_text[128]; uint64_t frame_count; + + unsigned width; + unsigned height; } video_frame_info_t; /* Optionally implemented interface to poke more From f4adbd04ae4d4908640cb4eb3f851db695d491df Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 22:55:03 +0100 Subject: [PATCH 198/427] (gl.c) Reduce amount of time video_driver_get_size is called inside gl_frame --- gfx/drivers/gl.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 4ca72da58b..9fc9948e78 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -212,18 +212,18 @@ static void gl_overlay_tex_geom(void *data, tex[7] = y + h; } -static void gl_render_overlay(gl_t *gl) +static void gl_render_overlay(gl_t *gl, video_frame_info_t *video_info) { video_shader_ctx_mvp_t mvp; video_shader_ctx_coords_t coords; video_shader_ctx_info_t shader_info; - unsigned i, width, height; + unsigned i; + unsigned width = video_info->width; + unsigned height = video_info->height; if (!gl || !gl->overlay_enable) return; - video_driver_get_size(&width, &height); - glEnable(GL_BLEND); if (gl->overlay_full_screen) @@ -309,14 +309,13 @@ void gl_set_viewport(void *data, video_frame_info_t *video_info, bool force_full, bool allow_rotate) { gfx_ctx_aspect_t aspect_data; - unsigned width, height; int x = 0; int y = 0; float device_aspect = (float)viewport_width / viewport_height; struct video_ortho ortho = {0, 1, 0, 1, -1, 1}; gl_t *gl = (gl_t*)data; - - video_driver_get_size(&width, &height); + unsigned width = video_info->width; + unsigned height = video_info->height; aspect_data.aspect = &device_aspect; aspect_data.width = viewport_width; @@ -1013,13 +1012,14 @@ static void gl_pbo_async_readback(gl_t *gl) } #endif -static INLINE void gl_draw_texture(gl_t *gl) +static INLINE void gl_draw_texture(gl_t *gl, video_frame_info_t *video_info) { video_shader_ctx_mvp_t mvp; video_shader_ctx_coords_t coords; video_shader_ctx_info_t shader_info; - unsigned width, height; GLfloat color[16]; + unsigned width = video_info->width; + unsigned height = video_info->height; color[ 0] = 1.0f; color[ 1] = 1.0f; @@ -1041,8 +1041,6 @@ static INLINE void gl_draw_texture(gl_t *gl) if (!gl->menu_texture) return; - video_driver_get_size(&width, &height); - gl->coords.vertex = vertexes_flipped; gl->coords.tex_coord = tex_coords; gl->coords.color = color; @@ -1095,11 +1093,13 @@ static bool gl_frame(void *data, const void *frame, video_shader_ctx_mvp_t mvp; video_shader_ctx_coords_t coords; video_shader_ctx_params_t params; - unsigned width, height; struct video_tex_info feedback_info; video_shader_ctx_info_t shader_info; - static struct retro_perf_counter frame_run = {0}; + static struct + retro_perf_counter frame_run = {0}; gl_t *gl = (gl_t*)data; + unsigned width = video_info->width; + unsigned height = video_info->height; performance_counter_init(&frame_run, "frame_run"); performance_counter_start(&frame_run); @@ -1107,8 +1107,6 @@ static bool gl_frame(void *data, const void *frame, if (!gl) return false; - video_driver_get_size(&width, &height); - context_bind_hw_render(false); #ifndef HAVE_OPENGLES @@ -1282,7 +1280,7 @@ static bool gl_frame(void *data, const void *frame, menu_driver_frame(video_info); if (gl->menu_texture_enable) - gl_draw_texture(gl); + gl_draw_texture(gl, video_info); } #endif @@ -1290,7 +1288,7 @@ static bool gl_frame(void *data, const void *frame, font_driver_render_msg(NULL, msg, NULL); #ifdef HAVE_OVERLAY - gl_render_overlay(gl); + gl_render_overlay(gl, video_info); #endif video_context_driver_update_window_title(video_info); From c5445d298043f9166ed94d517a9aaa40480b189b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 23:02:24 +0100 Subject: [PATCH 199/427] Reduce amount of times video_driver_get_size is called --- gfx/drivers/vg.c | 13 ++++++------- gfx/drivers/vulkan.c | 19 +++++++++---------- menu/drivers/materialui.c | 7 ++----- menu/drivers/xmb.c | 6 +++--- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 008e754114..700e1997a2 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -285,10 +285,10 @@ static void vg_free(void *data) free(vg); } -static void vg_calculate_quad(vg_t *vg) +static void vg_calculate_quad(vg_t *vg, video_frame_info_t *video_info) { - unsigned width, height; - video_driver_get_size(&width, &height); + unsigned width = video_info->width; + unsigned heigh = video_info->height; /* set viewport for aspect ratio, taken from the OpenGL driver. */ if (vg->keep_aspect) @@ -384,23 +384,22 @@ static bool vg_frame(void *data, const void *frame, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - unsigned width, height; vg_t *vg = (vg_t*)data; static struct retro_perf_counter vg_fr = {0}; static struct retro_perf_counter vg_image = {0}; + unsigned width = video_info->width; + unsigned height = video_info->height; performance_counter_init(&vg_fr, "vg_fr"); performance_counter_start(&vg_fr); - video_driver_get_size(&width, &height); - if ( frame_width != vg->mRenderWidth || frame_height != vg->mRenderHeight || vg->should_resize) { vg->mRenderWidth = frame_width; vg->mRenderHeight = frame_height; - vg_calculate_quad(vg); + vg_calculate_quad(vg, video_info); matrix_3x3_quad_to_quad( vg->x1, vg->y1, vg->x2, vg->y1, vg->x2, vg->y2, vg->x1, vg->y2, /* needs to be flipped, Khronos loves their bottom-left origin */ diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 0765c9fc9c..dcdd4429fa 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -54,7 +54,7 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width, #ifdef HAVE_OVERLAY static void vulkan_overlay_free(vk_t *vk); -static void vulkan_render_overlay(vk_t *vk); +static void vulkan_render_overlay(vk_t *vk, video_frame_info_t *video_info); #endif static void vulkan_viewport_info(void *data, struct video_viewport *vp); @@ -1523,7 +1523,7 @@ static bool vulkan_frame(void *data, const void *frame, unsigned pitch, const char *msg, video_frame_info_t *video_info) { struct vk_per_frame *chain; - unsigned width, height; + VkSemaphore signal_semaphores[2]; VkClearValue clear_value; vk_t *vk = (vk_t*)data; static struct retro_perf_counter frame_run = {0}; @@ -1534,7 +1534,8 @@ static bool vulkan_frame(void *data, const void *frame, static struct retro_perf_counter swapbuffers = {0}; static struct retro_perf_counter queue_submit = {0}; bool waits_for_semaphores = false; - VkSemaphore signal_semaphores[2]; + unsigned width = video_info->width; + unsigned height = video_info->height; VkCommandBufferBeginInfo begin_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; @@ -1554,8 +1555,6 @@ static bool vulkan_frame(void *data, const void *frame, performance_counter_init(&end_cmd, "end_command"); performance_counter_start(&frame_run); - video_driver_get_size(&width, &height); - /* Bookkeeping on start of frame. */ chain = &vk->swapchain[frame_index]; vk->chain = chain; @@ -1779,7 +1778,7 @@ static bool vulkan_frame(void *data, const void *frame, #ifdef HAVE_OVERLAY if (vk->overlay.enable) - vulkan_render_overlay(vk); + vulkan_render_overlay(vk, video_info); #endif performance_counter_stop(&build_cmd); @@ -2394,17 +2393,17 @@ static void vulkan_overlay_set_alpha(void *data, } } -static void vulkan_render_overlay(vk_t *vk) +static void vulkan_render_overlay(vk_t *vk, video_frame_info_t *video_info) { - unsigned width, height; unsigned i; struct video_viewport vp; + unsigned width = video_info->width; + unsigned height = video_info->height; if (!vk) return; - video_driver_get_size(&width, &height); - vp = vk->vp; + vp = vk->vp; vulkan_set_viewport(vk, width, height, vk->overlay.full_screen, false); for (i = 0; i < vk->overlay.count; i++) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 754ec1d813..4114911a69 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1029,8 +1029,8 @@ static void mui_frame(void *data, video_frame_info_t *video_info) float header_bg_color_real[16] = {0}; file_list_t *list = NULL; mui_node_t *node = NULL; - unsigned width = 0; - unsigned height = 0; + unsigned width = video_info->width; + unsigned height = video_info->height; unsigned ticker_limit = 0; unsigned i = 0; unsigned header_height = 0; @@ -1211,8 +1211,6 @@ static void mui_frame(void *data, video_frame_info_t *video_info) menu_display_set_alpha(header_bg_color_real, settings->menu.header.opacity); menu_display_set_alpha(footer_bg_color_real, settings->menu.footer.opacity); - video_driver_get_size(&width, &height); - menu_display_set_viewport(); header_height = menu_display_get_header_height(); @@ -1663,7 +1661,6 @@ static void mui_context_reset(void *data) if (!mui || !settings) return; - mui_layout(mui); mui_context_bg_destroy(mui); menu_display_allocate_white_texture(); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 6b23aa2548..ca6f894ac2 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2558,13 +2558,15 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) size_t selection; size_t percent_width = 0; math_matrix_4x4 mymat; - unsigned i, width, height; + unsigned i; float item_color[16], coord_black[16], coord_white[16]; menu_display_ctx_rotate_draw_t rotate_draw; char msg[1024]; char title_msg[255]; char title_truncated[255]; menu_display_frame_info_t menu_disp_info; + unsigned width = video_info->width; + unsigned height = video_info->height; bool render_background = false; file_list_t *selection_buf = NULL; file_list_t *menu_stack = NULL; @@ -2580,8 +2582,6 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) title_msg[0] = '\0'; title_truncated[0] = '\0'; - video_driver_get_size(&width, &height); - menu_display_font_bind_block(xmb->font, &xmb->raster_block); menu_display_font_bind_block(xmb->font2, &xmb->raster_block2); From 55b8b8c2445b825b1948fffb58d05d4621a292fd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 23:07:05 +0100 Subject: [PATCH 200/427] Reduce amount of calls to video_driver_get_size --- gfx/drivers/d3d.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 6e796f4548..43f1f429b8 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -332,14 +332,16 @@ static void d3d_viewport_info(void *data, struct video_viewport *vp) d3d->renderchain_driver->viewport_info(d3d, vp); } -static void d3d_overlay_render(d3d_video_t *d3d, overlay_t *overlay) +static void d3d_overlay_render(d3d_video_t *d3d, video_frame_info_t *video_info, + overlay_t *overlay) { struct video_viewport vp; - unsigned width, height; void *verts; unsigned i; float vert[4][9]; float overlay_width, overlay_height; + unsigned width = video_info->width; + unsigned height = video_info->height; if (!d3d || !overlay || !overlay->tex) return; @@ -429,8 +431,6 @@ static void d3d_overlay_render(d3d_video_t *d3d, overlay_t *overlay) { D3DVIEWPORT vp_full; - video_driver_get_size(&width, &height); - vp_full.X = 0; vp_full.Y = 0; vp_full.Width = width; @@ -1370,19 +1370,19 @@ static bool d3d_frame(void *data, const void *frame, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - unsigned width, height; - static struct retro_perf_counter d3d_frame = {0}; + static struct + retro_perf_counter d3d_frame = {0}; unsigned i = 0; d3d_video_t *d3d = (d3d_video_t*)data; HWND window = win32_get_window(); + unsigned width = video_info->width; + unsigned height = video_info->height; (void)i; if (!frame) return true; - video_driver_get_size(&width, &height); - performance_counter_init(&d3d_frame, "d3d_frame"); performance_counter_start(&d3d_frame); @@ -1448,7 +1448,7 @@ static bool d3d_frame(void *data, const void *frame, #ifdef HAVE_MENU if (d3d->menu && d3d->menu->enabled) { - d3d_overlay_render(d3d, d3d->menu); + d3d_overlay_render(d3d, video_info, d3d->menu); menu_driver_frame(video_info); } #endif @@ -1457,7 +1457,7 @@ static bool d3d_frame(void *data, const void *frame, if (d3d->overlays_enabled) { for (i = 0; i < d3d->overlays.size(); i++) - d3d_overlay_render(d3d, &d3d->overlays[i]); + d3d_overlay_render(d3d, video_info, &d3d->overlays[i]); } #endif From 1a30cfea0996b53587899253153619c38c341e24 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 23:13:19 +0100 Subject: [PATCH 201/427] Remove more video_driver_get_size calls --- gfx/drivers/gl_renderchains/render_chain_gl_legacy.c | 5 ++--- menu/drivers/materialui.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c index 8cc1681184..987654cc07 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c @@ -249,7 +249,6 @@ void gl_renderchain_render(gl_t *gl, video_shader_ctx_coords_t coords; video_shader_ctx_params_t params; video_shader_ctx_info_t shader_info; - unsigned width, height; const struct video_fbo_rect *prev_rect; struct video_tex_info *fbo_info; struct video_tex_info fbo_tex_info[GFX_MAX_SHADERS]; @@ -257,8 +256,8 @@ void gl_renderchain_render(gl_t *gl, GLfloat xamt, yamt; unsigned fbo_tex_info_cnt = 0; GLfloat fbo_tex_coords[8] = {0.0f}; - - video_driver_get_size(&width, &height); + unsigned width = video_info->width; + unsigned height = video_info->height; /* Render the rest of our passes. */ gl->coords.tex_coord = fbo_tex_coords; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 4114911a69..bd8cad9f11 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -562,13 +562,13 @@ static void compute_entries_box(mui_handle_t* mui, int width) static void mui_render(void *data) { - size_t i = 0; menu_animation_ctx_delta_t delta; float delta_time; unsigned bottom, width, height, header_height; + size_t i = 0; mui_handle_t *mui = (mui_handle_t*)data; settings_t *settings = config_get_ptr(); - file_list_t *list = menu_entries_get_selection_buf_ptr(0); + file_list_t *list = menu_entries_get_selection_buf_ptr(0); if (!mui) return; From 7f77f0cef132e54c275e50457f6d00ce4bd31e6a Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Wed, 18 Jan 2017 22:50:52 +0000 Subject: [PATCH 202/427] Fix osmesa_ctx missing includes --- gfx/drivers_context/osmesa_ctx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index f6899ece1b..9ae80c151b 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -29,6 +30,7 @@ #include +#include "../../configuration.h" #include "../../runloop.h" #include "../common/gl_common.h" From afd4494c2fb400bade89d728e73eec36e40aebe8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Jan 2017 23:59:22 +0100 Subject: [PATCH 203/427] (menu_driver.c) Get rid of video_driver_get_size call --- menu/drivers/materialui.c | 2 +- menu/drivers/nuklear.c | 7 ++++--- menu/drivers/xmb.c | 6 ++++-- menu/drivers/xui.cpp | 2 +- menu/drivers/zarch.c | 2 +- menu/menu_display.c | 4 +--- menu/menu_display.h | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index bd8cad9f11..f6a12e6143 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1211,7 +1211,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) menu_display_set_alpha(header_bg_color_real, settings->menu.header.opacity); menu_display_set_alpha(footer_bg_color_real, settings->menu.footer.opacity); - menu_display_set_viewport(); + menu_display_set_viewport(video_info->width, video_info->height); header_height = menu_display_get_header_height(); if (libretro_running) diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index c7dc425ab6..075c430a66 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -250,6 +250,7 @@ static void nk_menu_get_message(void *data, const char *message) static void nk_draw_bg( nk_menu_handle_t *nk, + video_frame_info_t *video_info, unsigned width, unsigned height, float alpha, @@ -273,7 +274,7 @@ static void nk_draw_bg( draw.pipeline.id = 0; menu_display_blend_begin(); - menu_display_set_viewport(); + menu_display_set_viewport(video_info->width, video_info->height); draw.pipeline.id = VIDEO_SHADER_MENU_5; draw.pipeline.active = false; @@ -333,7 +334,7 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info) video_driver_get_size(&width, &height); - menu_display_set_viewport(); + menu_display_set_viewport(video_info->width, video_info->height); nk_input_begin(&nk->ctx); nk_menu_input_gamepad(nk); @@ -350,7 +351,7 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info) nk_input_end(&nk->ctx); nk_menu_main(nk); - nk_draw_bg(nk, width, height, 0.5, nk->textures.bg, coord_black, coord_white); + nk_draw_bg(nk, video_info, width, height, 0.5, nk->textures.bg, coord_black, coord_white); nk_common_device_draw(&device, &nk->ctx, width, height, NK_ANTI_ALIASING_ON); menu_display_draw_cursor( diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index ca6f894ac2..622b90c9f8 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2413,6 +2413,7 @@ static bool xmb_shader_pipeline_active(settings_t *settings) static void xmb_draw_bg( xmb_handle_t *xmb, + video_frame_info_t *video_info, unsigned width, unsigned height, float alpha, @@ -2427,7 +2428,7 @@ static void xmb_draw_bg( RARCH_LOG("DRAW BG %d %d \n",width,height); #endif - bool running = menu_display_libretro_running(); + bool running = menu_display_libretro_running(); draw.x = 0; draw.y = 0; @@ -2443,7 +2444,7 @@ static void xmb_draw_bg( draw.pipeline.active = xmb_shader_pipeline_active(settings); menu_display_blend_begin(); - menu_display_set_viewport(); + menu_display_set_viewport(video_info->width, video_info->height); #ifdef HAVE_SHADERPIPELINE if (settings->menu.xmb.shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER @@ -2601,6 +2602,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) xmb_draw_bg( xmb, + video_info, width, height, xmb->alpha, diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index 3c57b9808c..b44aeb1ffa 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -417,7 +417,7 @@ static void xui_frame(void *data, video_frame_info_t *video_info) if (!d3dr) return; - menu_display_set_viewport(); + menu_display_set_viewport(video_info->width, video_info->height); app.RunFrame(); XuiTimersRun(); diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 8409ab780b..510a51c154 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -878,7 +878,7 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) video_driver_get_size(&zui->width, &zui->height); - menu_display_set_viewport(); + menu_display_set_viewport(video_info->width, video_info->height); for (i = 0; i < 16; i++) { diff --git a/menu/menu_display.c b/menu/menu_display.c index 6ed84a065b..a13559eab7 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -397,10 +397,8 @@ bool menu_display_get_update_pending(void) return false; } -void menu_display_set_viewport(void) +void menu_display_set_viewport(unsigned width, unsigned height) { - unsigned width, height; - video_driver_get_size(&width, &height); video_driver_set_viewport(width, height, true, false); } diff --git a/menu/menu_display.h b/menu/menu_display.h index 6e7faa5c42..e127c58128 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -227,7 +227,7 @@ void menu_display_set_msg_force(bool state); bool menu_display_get_font_data_init(void); void menu_display_set_font_data_init(bool state); bool menu_display_get_update_pending(void); -void menu_display_set_viewport(void); +void menu_display_set_viewport(unsigned width, unsigned height); void menu_display_unset_viewport(void); bool menu_display_get_framebuffer_dirty_flag(void); void menu_display_set_framebuffer_dirty_flag(void); From 00adc9a2d37665c3addd293d28b506f5b6da5bcd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 00:01:55 +0100 Subject: [PATCH 204/427] Rewrite menu_display_unset_viewport --- menu/drivers/materialui.c | 2 +- menu/drivers/nuklear.c | 2 +- menu/drivers/xmb.c | 2 +- menu/drivers/xui.cpp | 2 +- menu/drivers/zarch.c | 2 +- menu/menu_display.c | 4 +--- menu/menu_display.h | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index f6a12e6143..6a4410db3d 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1426,7 +1426,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) height); menu_display_restore_clear_color(); - menu_display_unset_viewport(); + menu_display_unset_viewport(video_info->width, video_info->height); } static void mui_layout(mui_handle_t *mui) diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 075c430a66..e70a14aa1f 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -364,7 +364,7 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info) height); menu_display_restore_clear_color(); - menu_display_unset_viewport(); + menu_display_unset_viewport(video_info->width, video_info->height); } static void nk_menu_free(void *data) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 622b90c9f8..0e2bf7d4f6 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2904,7 +2904,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) height); } - menu_display_unset_viewport(); + menu_display_unset_viewport(video_info->width, video_info->height); } static void xmb_layout_ps3(xmb_handle_t *xmb, int width) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index b44aeb1ffa..909efd21e8 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -445,7 +445,7 @@ static void xui_frame(void *data, video_frame_info_t *video_info) XuiRenderEnd( app.GetDC() ); - menu_display_unset_viewport(); + menu_display_unset_viewport(video_info->width, video_info->height); } static void blit_line(int x, int y, const char *message, bool green) diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 510a51c154..1b967fd0d2 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -983,7 +983,7 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) zui->rendering = false; menu_display_font_flush_block((font_data_t*)zui->font); - menu_display_unset_viewport(); + menu_display_unset_viewport(video_info->width, video_info->height); } static void *zarch_init(void **userdata) diff --git a/menu/menu_display.c b/menu/menu_display.c index a13559eab7..ca003a4f46 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -402,10 +402,8 @@ void menu_display_set_viewport(unsigned width, unsigned height) video_driver_set_viewport(width, height, true, false); } -void menu_display_unset_viewport(void) +void menu_display_unset_viewport(unsigned width, unsigned height) { - unsigned width, height; - video_driver_get_size(&width, &height); video_driver_set_viewport(width, height, false, true); } diff --git a/menu/menu_display.h b/menu/menu_display.h index e127c58128..5310dc4097 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -228,7 +228,7 @@ bool menu_display_get_font_data_init(void); void menu_display_set_font_data_init(bool state); bool menu_display_get_update_pending(void); void menu_display_set_viewport(unsigned width, unsigned height); -void menu_display_unset_viewport(void); +void menu_display_unset_viewport(unsigned width, unsigned height); bool menu_display_get_framebuffer_dirty_flag(void); void menu_display_set_framebuffer_dirty_flag(void); void menu_display_unset_framebuffer_dirty_flag(void); From 24e0542bdb75e911551ba0dc87a936a1be585e2f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 00:09:38 +0100 Subject: [PATCH 205/427] (menu) reduce calls to video_driver_get_size --- menu/drivers/materialui.c | 29 +++++++++++++++++------------ menu/drivers/xmb.c | 30 ++++++++++++++---------------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 6a4410db3d..53f16bddf6 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -270,26 +270,28 @@ static void mui_draw_tab(mui_handle_t *mui, &tab_color[0]); } -static void mui_render_keyboard(mui_handle_t *mui, const char *grid[], unsigned id) +static void mui_render_keyboard(mui_handle_t *mui, + video_frame_info_t *video_info, + const char *grid[], unsigned id) { int ptr_width, ptr_height; - unsigned i, width, height; - float dark[16]= { + unsigned i; + unsigned width = video_info->width; + unsigned height = video_info->height; + float dark[16] = { 0.00, 0.00, 0.00, 0.85, 0.00, 0.00, 0.00, 0.85, 0.00, 0.00, 0.00, 0.85, 0.00, 0.00, 0.00, 0.85, }; - float white[16]= { + float white[16] = { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, }; - video_driver_get_size(&width, &height); - menu_display_draw_quad(0, height/2.0, width, height/2.0, width, height, &dark[0]); @@ -457,10 +459,13 @@ static void mui_get_message(void *data, const char *message) } static void mui_render_messagebox(mui_handle_t *mui, + video_frame_info_t *video_info, const char *message, float *body_bg_color, uint32_t font_color) { - unsigned i, width, height, y_position; + unsigned i, y_position; int x, y, line_height, longest = 0, longest_width = 0; + unsigned width = video_info->width; + unsigned height = video_info->height; struct string_list *list = (struct string_list*) string_split(message, "\n"); @@ -469,8 +474,6 @@ static void mui_render_messagebox(mui_handle_t *mui, if (list->elems == 0) goto end; - video_driver_get_size(&width, &height); - line_height = mui->font->size * 1.2; y_position = height / 2; @@ -515,7 +518,9 @@ static void mui_render_messagebox(mui_handle_t *mui, } if (menu_input_dialog_get_display_kb()) - mui_render_keyboard(mui, menu_event_get_osk_grid(), menu_event_get_osk_ptr()); + mui_render_keyboard(mui, + video_info, + menu_event_get_osk_grid(), menu_event_get_osk_ptr()); end: string_list_free(list); @@ -1405,13 +1410,13 @@ static void mui_frame(void *data, video_frame_info_t *video_info) menu_display_draw_quad(0, 0, width, height, width, height, &black_bg[0]); snprintf(msg, sizeof(msg), "%s\n%s", label, str); - mui_render_messagebox(mui, msg, &body_bg_color[0], font_hover_color); + mui_render_messagebox(mui, video_info, msg, &body_bg_color[0], font_hover_color); } if (!string_is_empty(mui->box_message)) { menu_display_draw_quad(0, 0, width, height, width, height, &black_bg[0]); - mui_render_messagebox(mui, mui->box_message, &body_bg_color[0], font_hover_color); + mui_render_messagebox(mui, video_info, mui->box_message, &body_bg_color[0], font_hover_color); mui->box_message[0] = '\0'; } diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 0e2bf7d4f6..90b5e261fe 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -706,11 +706,15 @@ static void xmb_messagebox(void *data, const char *message) strlcpy(xmb->box_message, message, sizeof(xmb->box_message)); } -static void xmb_render_keyboard(xmb_handle_t *xmb, const char *grid[], unsigned id) +static void xmb_render_keyboard(xmb_handle_t *xmb, + video_frame_info_t *video_info, + const char *grid[], unsigned id) { + unsigned i; int ptr_width, ptr_height; - unsigned i, width, height; - float dark[16]= { + unsigned width = video_info->height; + unsigned height = video_info->height; + float dark[16] = { 0.00, 0.00, 0.00, 0.85, 0.00, 0.00, 0.00, 0.85, 0.00, 0.00, 0.00, 0.85, @@ -724,8 +728,6 @@ static void xmb_render_keyboard(xmb_handle_t *xmb, const char *grid[], unsigned 1.00, 1.00, 1.00, 1.00, }; - video_driver_get_size(&width, &height); - menu_display_draw_quad(0, height/2.0, width, height/2.0, width, height, &dark[0]); @@ -798,19 +800,14 @@ static int xmb_osk_ptr_at_pos(void *data, int x, int y) static void xmb_render_messagebox_internal( menu_display_frame_info_t menu_disp_info, + video_frame_info_t *video_info, xmb_handle_t *xmb, const char *message) { - int x, y, longest = 0, longest_width = 0; unsigned i, y_position; - unsigned width, height; - struct string_list *list = NULL; - - if (!xmb) - return; - - video_driver_get_size(&width, &height); - - list = string_split(message, "\n"); + int x, y, longest = 0, longest_width = 0; + unsigned width = video_info->width; + unsigned height = video_info->height; + struct string_list *list = string_split(message, "\n"); if (!list) return; @@ -856,6 +853,7 @@ static void xmb_render_messagebox_internal( if (menu_input_dialog_get_display_kb()) xmb_render_keyboard(xmb, + video_info, menu_event_get_osk_grid(), menu_event_get_osk_ptr()); @@ -2887,7 +2885,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) { xmb_draw_dark_layer(xmb, width, height); - xmb_render_messagebox_internal(menu_disp_info, xmb, msg); + xmb_render_messagebox_internal(menu_disp_info, video_info, xmb, msg); } /* Cursor image */ From 99622cee1428e400974f61bfcf8a0ddac6678c53 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Thu, 19 Jan 2017 00:10:42 +0100 Subject: [PATCH 206/427] (Cocoa ) Update --- gfx/drivers_context/cocoa_gl_ctx.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 62b9c0a47a..ba71512fb0 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -554,10 +554,9 @@ CFStringRef)BOXSTRING(symbol_name) } static void cocoagl_gfx_ctx_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height, unsigned frame_count) + bool *resize, unsigned *width, unsigned *height) { unsigned new_width, new_height; - (void)frame_count; *quit = false; From 78e06ca07f885c815e1cc024be10b1572ee99f30 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Thu, 19 Jan 2017 00:11:29 +0100 Subject: [PATCH 207/427] Cleanup variables --- gfx/drivers/gl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 9fc9948e78..7cab60b1e3 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -309,17 +309,16 @@ void gl_set_viewport(void *data, video_frame_info_t *video_info, bool force_full, bool allow_rotate) { gfx_ctx_aspect_t aspect_data; - int x = 0; - int y = 0; - float device_aspect = (float)viewport_width / viewport_height; + int x = 0; + int y = 0; + float device_aspect = (float)viewport_width / viewport_height; struct video_ortho ortho = {0, 1, 0, 1, -1, 1}; - gl_t *gl = (gl_t*)data; - unsigned width = video_info->width; - unsigned height = video_info->height; + gl_t *gl = (gl_t*)data; + unsigned height = video_info->height; - aspect_data.aspect = &device_aspect; - aspect_data.width = viewport_width; - aspect_data.height = viewport_height; + aspect_data.aspect = &device_aspect; + aspect_data.width = viewport_width; + aspect_data.height = viewport_height; video_context_driver_translate_aspect(&aspect_data); From 57f1c0c3b60ced6aeea93c4ab5ee4709f2160b8a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 01:24:21 +0100 Subject: [PATCH 208/427] FIx threaded video --- gfx/video_driver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index cdbd829932..7be9a5d69e 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2140,8 +2140,6 @@ void video_driver_frame(const void *data, unsigned width, video_driver_build_info(&video_info); video_driver_threaded_lock(); - video_info.width = video_driver_width; - video_info.height = video_driver_height; video_info.frame_count = video_driver_frame_count; video_driver_frame_count++; video_driver_threaded_unlock(); @@ -2244,6 +2242,7 @@ bool video_driver_texture_unload(uintptr_t *id) void video_driver_build_info(video_frame_info_t *video_info) { + video_driver_threaded_lock(); settings_t *settings = config_get_ptr(); video_info->refresh_rate = settings->video.refresh_rate; video_info->black_frame_insertion = @@ -2264,6 +2263,10 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->frame_count = 0; video_info->window_text[0] = '\0'; video_info->fps_text[0] = '\0'; + + video_info->width = video_driver_width; + video_info->height = video_driver_height; + video_driver_threaded_unlock(); } /** From 832840f91c5ecedbfd294b71ddd3ce4ccd0597fb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 01:33:47 +0100 Subject: [PATCH 209/427] Cut down on more video_driver_get_size calls --- menu/drivers/materialui.c | 6 ++---- menu/drivers/nuklear.c | 20 +++++++++----------- menu/drivers/xmb.c | 10 ++++------ menu/menu_driver.c | 5 ++++- menu/menu_driver.h | 2 +- 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 53f16bddf6..583997847d 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -329,17 +329,15 @@ static void mui_render_keyboard(mui_handle_t *mui, } /* Returns the OSK key at a given position */ -static int mui_osk_ptr_at_pos(void *data, int x, int y) +static int mui_osk_ptr_at_pos(void *data, int x, int y, unsigned width, unsigned height) { int ptr_width, ptr_height; - unsigned i, width, height; + unsigned i; mui_handle_t *mui = (mui_handle_t*)data; if (!mui) return -1; - video_driver_get_size(&width, &height); - ptr_width = width / 11; ptr_height = height / 10; diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index e70a14aa1f..c18fac5ea5 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -305,16 +305,22 @@ static void nk_menu_main(nk_menu_handle_t *nk) static void nk_menu_frame(void *data, video_frame_info_t *video_info) { - float white_bg[16]= { + unsigned ticker_limit, i; + float coord_black[16], coord_white[16]; + nk_menu_handle_t *nk = (nk_menu_handle_t*)data; + settings_t *settings = config_get_ptr(); + unsigned width = video_info->width; + unsigned height = video_info->height; + bool libretro_running = menu_display_libretro_running(); + float white_bg[16] = { 0.98, 0.98, 0.98, 1, 0.98, 0.98, 0.98, 1, 0.98, 0.98, 0.98, 1, 0.98, 0.98, 0.98, 1, }; - float coord_black[16], coord_white[16]; - for (int i = 0; i < 16; i++) + for (i = 0; i < 16; i++) { coord_black[i] = 0; coord_white[i] = 1.0f; @@ -323,17 +329,9 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info) menu_display_set_alpha(coord_black, 0.75); menu_display_set_alpha(coord_white, 0.75); - unsigned width, height, ticker_limit, i; - nk_menu_handle_t *nk = (nk_menu_handle_t*)data; - settings_t *settings = config_get_ptr(); - - bool libretro_running = menu_display_libretro_running(); - if (!nk) return; - video_driver_get_size(&width, &height); - menu_display_set_viewport(video_info->width, video_info->height); nk_input_begin(&nk->ctx); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 90b5e261fe..0a46fced2e 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -767,18 +767,16 @@ static void xmb_render_keyboard(xmb_handle_t *xmb, } /* Returns the OSK key at a given position */ -static int xmb_osk_ptr_at_pos(void *data, int x, int y) +static int xmb_osk_ptr_at_pos(void *data, int x, int y, unsigned width, unsigned height) { + unsigned i; int ptr_width, ptr_height; - unsigned i, width, height; - xmb_handle_t *xmb = (xmb_handle_t*)data; + if (!xmb) return -1; - video_driver_get_size(&width, &height); - - ptr_width = width / 11; + ptr_width = width / 11; ptr_height = height / 10; if (ptr_width >= ptr_height) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 73f284c8c1..e0e787a697 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -886,14 +886,17 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) break; case RARCH_MENU_CTL_OSK_PTR_AT_POS: { + unsigned width = 0; + unsigned height = 0; menu_ctx_pointer_t *point = (menu_ctx_pointer_t*)data; if (!menu_driver_ctx || !menu_driver_ctx->osk_ptr_at_pos) { point->retcode = 0; return false; } + video_driver_get_size(&width, &height); point->retcode = menu_driver_ctx->osk_ptr_at_pos(menu_userdata, - point->x, point->y); + point->x, point->y, width, height); } break; case RARCH_MENU_CTL_BIND_INIT: diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 3d1b9c6731..8c49e734e5 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -276,7 +276,7 @@ typedef struct menu_ctx_driver menu_entry_t *entry, unsigned action); void (*update_thumbnail_path)(void *data, unsigned i); void (*update_thumbnail_image)(void *data); - int (*osk_ptr_at_pos)(void *data, int x, int y); + int (*osk_ptr_at_pos)(void *data, int x, int y, unsigned width, unsigned height); void (*update_savestate_thumbnail_path)(void *data, unsigned i); void (*update_savestate_thumbnail_image)(void *data); } menu_ctx_driver_t; From a9a7f360d0a93b2da4a031309a49ad658df40f4b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 01:36:40 +0100 Subject: [PATCH 210/427] (nuklear) cleanup --- menu/drivers/nuklear.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index c18fac5ea5..618385a713 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -145,6 +145,9 @@ static void xmb_init_ribbon(nk_menu_handle_t * xmb) static void *nk_menu_init(void **userdata) { +#if 1 + unsigned i; +#endif settings_t *settings = config_get_ptr(); nk_menu_handle_t *nk = NULL; menu_handle_t *menu = (menu_handle_t*) @@ -169,16 +172,18 @@ static void *nk_menu_init(void **userdata) "nuklear", sizeof(nk->assets_directory)); nk_menu_init_device(nk); - /* for demo puposes only, opens all windows */ + /* for demo purposes only, opens all windows */ #if 1 - for (int i=0; i < NK_WND_LAST; i++) + for (i = 0; i < NK_WND_LAST; i++) nk->window[i].open = true; #else nk->window[NK_WND_MAIN].open = true; #endif xmb_init_ribbon(nk); + return menu; error: + if (menu) free(menu); return NULL; From b6c0e57946e3cd1a20e304c8a62490a3f1f3152d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 01:39:11 +0100 Subject: [PATCH 211/427] Silence some warnings --- gfx/video_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 7be9a5d69e..547f13d6fc 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2070,7 +2070,7 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) ret = true; } - if (video_info->fps_text && video_info->fps_show) + if (video_info->fps_show) snprintf( video_info->fps_text, sizeof(video_info->fps_text), @@ -2086,10 +2086,10 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) strlcpy(video_info->window_text, video_driver_title_buf, sizeof(video_info->window_text)); - if (video_info->fps_text) - strlcpy(video_info->fps_text, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), - sizeof(video_info->fps_text)); + + strlcpy(video_info->fps_text, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), + sizeof(video_info->fps_text)); return true; } From b96e0bb82037fad97b3f8e230d5fdc87c3d3bf41 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 01:58:44 +0100 Subject: [PATCH 212/427] Remove stub update_title functions --- gfx/drivers_context/android_ctx.c | 6 +----- gfx/drivers_context/cgl_ctx.c | 6 +----- gfx/drivers_context/cocoa_gl_ctx.m | 8 ++++++-- gfx/drivers_context/drm_ctx.c | 6 +----- gfx/drivers_context/emscriptenegl_ctx.c | 6 +----- gfx/drivers_context/gfx_null_ctx.c | 6 +----- gfx/drivers_context/khr_display_ctx.c | 6 +----- gfx/drivers_context/mali_fbdev_ctx.c | 6 +----- gfx/drivers_context/opendingux_fbdev_ctx.c | 6 +----- gfx/drivers_context/osmesa_ctx.c | 6 +----- gfx/drivers_context/ps3_ctx.c | 6 +----- gfx/drivers_context/qnx_ctx.c | 6 +----- gfx/drivers_context/vc_egl_ctx.c | 6 +----- gfx/drivers_context/vivante_fbdev_ctx.c | 6 +----- gfx/drivers_context/x_ctx.c | 1 - 15 files changed, 19 insertions(+), 68 deletions(-) diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 6700c319ae..353117e977 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -312,10 +312,6 @@ static bool android_gfx_ctx_set_resize(void *data, return false; } -static void android_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) -{ -} - static bool android_gfx_ctx_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -607,7 +603,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { NULL, /* get_video_output_next */ android_gfx_ctx_get_metrics, NULL, - android_gfx_ctx_update_title, + NULL, /* update_title */ android_gfx_ctx_check_window, android_gfx_ctx_set_resize, android_gfx_ctx_has_focus, diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 771aa48f96..87d6ffafab 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -108,10 +108,6 @@ static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) return false; } -static void gfx_ctx_cgl_update_title(void *data, video_frame_info_t *video_info) -{ -} - static bool gfx_ctx_cgl_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -352,7 +348,7 @@ const gfx_ctx_driver_t gfx_ctx_cgl = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_cgl_update_window_title, + NULL, /* update_title */ gfx_ctx_cgl_check_window, gfx_ctx_cgl_set_resize, gfx_ctx_cgl_has_focus, diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index ba71512fb0..0f27d2e0c7 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -416,9 +416,9 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned *height = CGRectGetHeight(size) * screenscale; } +#if defined(HAVE_COCOA) static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) { -#if defined(HAVE_COCOA) ui_window_cocoa_t view; const ui_window_t *window = ui_companion_driver_get_window_ptr(); @@ -426,8 +426,8 @@ static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_i if (window && video_info->monitor_fps_enable) window->set_title(&view, video_info->window_text); -#endif } +#endif static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, float *value) @@ -620,7 +620,11 @@ const gfx_ctx_driver_t gfx_ctx_cocoagl = { NULL, /* get_video_output_next */ cocoagl_gfx_ctx_get_metrics, NULL, +#if defined(HAVE_COCOA) cocoagl_gfx_ctx_update_title, +#else + NULL, /* update_title */ +#endif cocoagl_gfx_ctx_check_window, cocoagl_gfx_ctx_set_resize, cocoagl_gfx_ctx_has_focus, diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 4e1a42409b..ca957eca3f 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -268,10 +268,6 @@ static bool gfx_ctx_drm_set_resize(void *data, return false; } -static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t *video_info) -{ -} - static void gfx_ctx_drm_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -877,7 +873,7 @@ const gfx_ctx_driver_t gfx_ctx_drm = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_drm_update_window_title, + NULL, /* update_window_title */ gfx_ctx_drm_check_window, gfx_ctx_drm_set_resize, gfx_ctx_drm_has_focus, diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index bb6b9dfd10..5266cf4493 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -89,10 +89,6 @@ static bool gfx_ctx_emscripten_set_resize(void *data, return false; } -static void gfx_ctx_emscripten_update_title(void *data, video_frame_info_t *video_info) -{ -} - static void gfx_ctx_emscripten_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -320,7 +316,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ gfx_ctx_emscripten_translate_aspect, - gfx_ctx_emscripten_update_title, + NULL, /* update_title */ gfx_ctx_emscripten_check_window, gfx_ctx_emscripten_set_resize, gfx_ctx_emscripten_has_focus, diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 2198ffb46c..ca62a41210 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -47,10 +47,6 @@ static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) return false; } -static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t *video_info) -{ -} - static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) { (void)data; @@ -158,7 +154,7 @@ const gfx_ctx_driver_t gfx_ctx_null = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_null_update_window_title, + NULL, /* update_title */ gfx_ctx_null_check_window, gfx_ctx_null_set_resize, gfx_ctx_null_has_focus, diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index f25d66a541..2fed13ec96 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -109,10 +109,6 @@ static bool gfx_ctx_khr_display_set_resize(void *data, return false; } -static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t *video_info) -{ -} - static bool gfx_ctx_khr_display_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -233,7 +229,7 @@ const gfx_ctx_driver_t gfx_ctx_khr_display = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_khr_display_update_window_title, + NULL, /* update_title */ gfx_ctx_khr_display_check_window, gfx_ctx_khr_display_set_resize, gfx_ctx_khr_display_has_focus, diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index cd6ae9403f..bee9f9d30a 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -156,10 +156,6 @@ static bool gfx_ctx_mali_fbdev_set_resize(void *data, return false; } -static void gfx_ctx_mali_fbdev_update_title(void *data, video_frame_info_t *video_info) -{ -} - static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -308,7 +304,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_mali_fbdev_update_title, + NULL, /* update_title */ gfx_ctx_mali_fbdev_check_window, gfx_ctx_mali_fbdev_set_resize, gfx_ctx_mali_fbdev_has_focus, diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 8ce9f91120..95874fffc3 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -140,10 +140,6 @@ static bool gfx_ctx_opendingux_set_resize(void *data, return false; } -static void gfx_ctx_opendingux_update_title(void *data, video_frame_info_t *video_info) -{ -} - static bool gfx_ctx_opendingux_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -282,7 +278,7 @@ const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_opendingux_update_window_title, + NULL, /* update_title */ gfx_ctx_opendingux_check_window, gfx_ctx_opendingux_set_resize, gfx_ctx_opendingux_has_focus, diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index 27465247b5..65fd769055 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -305,10 +305,6 @@ static void osmesa_ctx_get_video_size(void *data, *height = osmesa->height; } -static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) -{ -} - static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, unsigned *height) @@ -404,7 +400,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, /* translate_aspect */ - osmesa_ctx_update_title, + NULL, /* update_title */ osmesa_ctx_check_window, osmesa_ctx_set_resize, osmesa_ctx_has_focus, diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index ff8cc1e030..a4d949057d 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -198,10 +198,6 @@ static bool gfx_ctx_ps3_set_resize(void *data, return false; } -static void gfx_ctx_ps3_update_title(void *data, video_frame_info_t *video_info) -{ -} - static void gfx_ctx_ps3_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -421,7 +417,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { gfx_ctx_ps3_get_video_output_next, NULL, /* get_metrics */ NULL, - gfx_ctx_ps3_update_title, + NULL, /* update_title */ gfx_ctx_ps3_check_window, gfx_ctx_ps3_set_resize, gfx_ctx_ps3_has_focus, diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index c2e4c15114..41c8e37b4a 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -316,10 +316,6 @@ static bool gfx_ctx_qnx_set_resize(void *data, return false; } -static void gfx_ctx_qnx_update_title(void *data, video_frame_info_t *video_info) -{ -} - static bool gfx_ctx_qnx_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -481,7 +477,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { NULL, /* get_video_output_next */ gfx_ctx_qnx__get_metrics, NULL, - gfx_ctx_qnx_update_title, + NULL, /* update_title */ gfx_ctx_qnx_check_window, gfx_ctx_qnx_set_resize, gfx_ctx_qnx_has_focus, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 581fd8919d..d348e56c9b 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -104,10 +104,6 @@ static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) return false; } -static void gfx_ctx_vc_update_title(void *data, video_frame_info_t *video_info) -{ -} - static void gfx_ctx_vc_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -649,7 +645,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ gfx_ctx_vc_translate_aspect, - gfx_ctx_vc_update_title, + NULL, /* update_title */ gfx_ctx_vc_check_window, gfx_ctx_vc_set_resize, gfx_ctx_vc_has_focus, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 6a555db596..b3d89795a3 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -144,10 +144,6 @@ static bool gfx_ctx_vivante_set_resize(void *data, return false; } -static void gfx_ctx_vivante_update_title(void *data, video_frame_info_t *video_info) -{ -} - static bool gfx_ctx_vivante_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -287,7 +283,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { NULL, /* get_video_output_next */ NULL, /* get_metrics */ NULL, - gfx_ctx_vivante_update_title, + NULL, /* update_title */ gfx_ctx_vivante_check_window, gfx_ctx_vivante_set_resize, gfx_ctx_vivante_has_focus, diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 01ebe904eb..08a6e64170 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -660,7 +660,6 @@ static bool gfx_ctx_x_set_video_mode(void *data, break; } - x11_set_window_attr(g_x11_dpy, g_x11_win); x11_update_title(NULL, video_info); From 19cc8176137d6c2d5401ec2888d380fb474c7a86 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 02:25:45 +0100 Subject: [PATCH 213/427] This needs to be set this way --- gfx/video_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 547f13d6fc..ed55a6f79c 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2046,12 +2046,11 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) if (video_info->fps_show) { - char fps_text[64]; snprintf(video_info->fps_text, sizeof(video_info->fps_text), " FPS: %6.1f || ", last_fps); strlcat(video_info->window_text, - fps_text, + video_info->fps_text, sizeof(video_info->window_text)); } From 3761b5bdf6a2140d66431bc23e0386fb8d97a075 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 02:34:35 +0100 Subject: [PATCH 214/427] Unroll video_driver_cached_frame_set --- gfx/video_driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index ed55a6f79c..50e6bc0126 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2134,7 +2134,11 @@ void video_driver_frame(const void *data, unsigned width, performance_counter_stop(&video_frame_conv); - video_driver_cached_frame_set(data, width, height, pitch); + if (data) + frame_cache_data = data; + frame_cache_width = width; + frame_cache_height = height; + frame_cache_pitch = pitch; video_driver_build_info(&video_info); From 7fbd3fcfb67a8ed73d95b6061e6a3e937f0f7189 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 02:50:56 +0100 Subject: [PATCH 215/427] Simplify has_windowed --- gfx/drivers_context/android_ctx.c | 8 +------- gfx/drivers_context/cgl_ctx.c | 8 +------- gfx/drivers_context/cocoa_gl_ctx.m | 12 ++++++------ gfx/drivers_context/d3d_ctx.cpp | 10 ++++++---- gfx/drivers_context/drm_ctx.c | 8 +------- gfx/drivers_context/gfx_null_ctx.c | 8 +------- gfx/drivers_context/khr_display_ctx.c | 8 +------- gfx/drivers_context/mali_fbdev_ctx.c | 8 +------- gfx/drivers_context/opendingux_fbdev_ctx.c | 8 +------- gfx/drivers_context/ps3_ctx.c | 8 +------- gfx/drivers_context/qnx_ctx.c | 8 +------- gfx/drivers_context/vc_egl_ctx.c | 8 +------- gfx/drivers_context/vivante_fbdev_ctx.c | 8 +------- gfx/video_context_driver.h | 2 +- gfx/video_driver.h | 2 +- 15 files changed, 25 insertions(+), 89 deletions(-) diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 353117e977..9c7a4e7b3c 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -421,12 +421,6 @@ static bool android_gfx_ctx_suppress_screensaver(void *data, bool enable) return false; } -static bool android_gfx_ctx_has_windowed(void *data) -{ - (void)data; - return false; -} - static void dpi_get_density(char *s, size_t len) { system_property_get("getprop", "ro.sf.lcd_density", s); @@ -608,7 +602,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { android_gfx_ctx_set_resize, android_gfx_ctx_has_focus, android_gfx_ctx_suppress_screensaver, - android_gfx_ctx_has_windowed, + NULL, /* has_windowed */ android_gfx_ctx_swap_buffers, android_gfx_ctx_input_driver, android_gfx_ctx_get_proc_address, diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 87d6ffafab..a7bc1bc2a8 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -179,12 +179,6 @@ static bool gfx_ctx_cgl_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_cgl_has_windowed(void *data) -{ - (void)data; - return false; -} - static bool gfx_ctx_cgl_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { @@ -353,7 +347,7 @@ const gfx_ctx_driver_t gfx_ctx_cgl = { gfx_ctx_cgl_set_resize, gfx_ctx_cgl_has_focus, gfx_ctx_cgl_suppress_screensaver, - gfx_ctx_cgl_has_windowed, + NULL, /* has_windowed */ gfx_ctx_cgl_swap_buffers, gfx_ctx_cgl_input_driver, gfx_ctx_cgl_get_proc_address, diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 0f27d2e0c7..d2a276b74a 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -516,16 +516,12 @@ static bool cocoagl_gfx_ctx_suppress_screensaver(void *data, bool enable) return false; } +#if !defined(HAVE_COCOATOUCH) static bool cocoagl_gfx_ctx_has_windowed(void *data) { - (void)data; - -#if defined(HAVE_COCOATOUCH) - return false; -#else return true; -#endif } +#endif static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) { @@ -629,7 +625,11 @@ const gfx_ctx_driver_t gfx_ctx_cocoagl = { cocoagl_gfx_ctx_set_resize, cocoagl_gfx_ctx_has_focus, cocoagl_gfx_ctx_suppress_screensaver, +#if defined(HAVE_COCOATOUCH) + NULL, +#else cocoagl_gfx_ctx_has_windowed, +#endif cocoagl_gfx_ctx_swap_buffers, cocoagl_gfx_ctx_input_driver, cocoagl_gfx_ctx_get_proc_address, diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 9136096e49..1d2b9ae948 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -131,16 +131,14 @@ static bool gfx_ctx_d3d_suppress_screensaver(void *data, bool enable) return win32_suppress_screensaver(data, enable); } +#ifndef _XBOX static bool gfx_ctx_d3d_has_windowed(void *data) { (void)data; -#ifdef _XBOX - return false; -#else return true; -#endif } +#endif static bool gfx_ctx_d3d_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) @@ -337,7 +335,11 @@ const gfx_ctx_driver_t gfx_ctx_d3d = { gfx_ctx_d3d_set_resize, gfx_ctx_d3d_has_focus, gfx_ctx_d3d_suppress_screensaver, +#ifdef _XBOX + NULL, +#else gfx_ctx_d3d_has_windowed, +#endif gfx_ctx_d3d_swap_buffers, gfx_ctx_d3d_input_driver, NULL, diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index ca957eca3f..f0bb839ab8 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -749,12 +749,6 @@ static bool gfx_ctx_drm_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_drm_has_windowed(void *data) -{ - (void)data; - return false; -} - static bool gfx_ctx_drm_bind_api(void *video_driver, enum gfx_ctx_api api, unsigned major, unsigned minor) { @@ -878,7 +872,7 @@ const gfx_ctx_driver_t gfx_ctx_drm = { gfx_ctx_drm_set_resize, gfx_ctx_drm_has_focus, gfx_ctx_drm_suppress_screensaver, - gfx_ctx_drm_has_windowed, + NULL, /* has_windowed */ gfx_ctx_drm_swap_buffers, gfx_ctx_drm_input_driver, gfx_ctx_drm_get_proc_address, diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index ca62a41210..448289f1ef 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -94,12 +94,6 @@ static bool gfx_ctx_null_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_null_has_windowed(void *data) -{ - (void)data; - return true; -} - static bool gfx_ctx_null_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { (void)data; @@ -159,7 +153,7 @@ const gfx_ctx_driver_t gfx_ctx_null = { gfx_ctx_null_set_resize, gfx_ctx_null_has_focus, gfx_ctx_null_suppress_screensaver, - gfx_ctx_null_has_windowed, + NULL, /* has_windowed */ gfx_ctx_null_swap_buffers, gfx_ctx_null_input_driver, NULL, diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index 2fed13ec96..a8cdc5ae1b 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -170,12 +170,6 @@ static bool gfx_ctx_khr_display_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_khr_display_has_windowed(void *data) -{ - (void)data; - return false; -} - static void gfx_ctx_khr_display_set_swap_interval(void *data, unsigned swap_interval) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; @@ -234,7 +228,7 @@ const gfx_ctx_driver_t gfx_ctx_khr_display = { gfx_ctx_khr_display_set_resize, gfx_ctx_khr_display_has_focus, gfx_ctx_khr_display_suppress_screensaver, - gfx_ctx_khr_display_has_windowed, + NULL, /* has_windowed */ gfx_ctx_khr_display_swap_buffers, gfx_ctx_khr_display_input_driver, gfx_ctx_khr_display_get_proc_address, diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index bee9f9d30a..842f970fa7 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -239,12 +239,6 @@ static bool gfx_ctx_mali_fbdev_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_mali_fbdev_has_windowed(void *data) -{ - (void)data; - return false; -} - static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, unsigned swap_interval) { mali_ctx_data_t *mali = (mali_ctx_data_t*)data; @@ -309,7 +303,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { gfx_ctx_mali_fbdev_set_resize, gfx_ctx_mali_fbdev_has_focus, gfx_ctx_mali_fbdev_suppress_screensaver, - gfx_ctx_mali_fbdev_has_windowed, + NULL, /* has_windowed */ gfx_ctx_mali_fbdev_swap_buffers, gfx_ctx_mali_fbdev_input_driver, gfx_ctx_mali_fbdev_get_proc_address, diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 95874fffc3..f6672ef937 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -212,12 +212,6 @@ static bool gfx_ctx_opendingux_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_opendingux_has_windowed(void *data) -{ - (void)data; - return false; -} - static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t *video_info) { opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; @@ -283,7 +277,7 @@ const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { gfx_ctx_opendingux_set_resize, gfx_ctx_opendingux_has_focus, gfx_ctx_opendingux_suppress_screensaver, - gfx_ctx_opendingux_has_windowed, + NULL, /* has_windowed */ gfx_ctx_opendingux_swap_buffers, gfx_ctx_opendingux_input_driver, gfx_ctx_opendingux_get_proc_address, diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index a4d949057d..e427fcb2ea 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -172,12 +172,6 @@ static bool gfx_ctx_ps3_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_ps3_has_windowed(void *data) -{ - (void)data; - return false; -} - static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) { (void)data; @@ -422,7 +416,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { gfx_ctx_ps3_set_resize, gfx_ctx_ps3_has_focus, gfx_ctx_ps3_suppress_screensaver, - gfx_ctx_ps3_has_windowed, + NULL, /* has_windowed */ gfx_ctx_ps3_swap_buffers, gfx_ctx_ps3_input_driver, NULL, diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 41c8e37b4a..4126740754 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -359,12 +359,6 @@ static bool gfx_ctx_qnx_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_qnx_has_windowed(void *data) -{ - (void)data; - return false; -} - static int dpi_get_density(qnx_ctx_data_t *qnx) { int screen_dpi[2]; @@ -482,7 +476,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { gfx_ctx_qnx_set_resize, gfx_ctx_qnx_has_focus, gfx_ctx_qnx_suppress_screensaver, - gfx_ctx_qnx_has_windowed, + NULL, /* has_windowed */ gfx_ctx_qnx_swap_buffers, gfx_ctx_qnx_input_driver, gfx_ctx_qnx_get_proc_address, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index d348e56c9b..007e26b1c8 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -457,12 +457,6 @@ static bool gfx_ctx_vc_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_vc_has_windowed(void *data) -{ - (void)data; - return false; -} - static float gfx_ctx_vc_translate_aspect(void *data, unsigned width, unsigned height) { @@ -650,7 +644,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { gfx_ctx_vc_set_resize, gfx_ctx_vc_has_focus, gfx_ctx_vc_suppress_screensaver, - gfx_ctx_vc_has_windowed, + NULL, /* has_windowed */ gfx_ctx_vc_swap_buffers, gfx_ctx_vc_input_driver, gfx_ctx_vc_get_proc_address, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index b3d89795a3..7c6f4662c9 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -217,12 +217,6 @@ static bool gfx_ctx_vivante_suppress_screensaver(void *data, bool enable) return false; } -static bool gfx_ctx_vivante_has_windowed(void *data) -{ - (void)data; - return false; -} - static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned swap_interval) { vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; @@ -288,7 +282,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { gfx_ctx_vivante_set_resize, gfx_ctx_vivante_has_focus, gfx_ctx_vivante_suppress_screensaver, - gfx_ctx_vivante_has_windowed, + NULL, /* has_windowed */ gfx_ctx_vivante_swap_buffers, gfx_ctx_vivante_input_driver, gfx_ctx_vivante_get_proc_address, diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index f033471ece..20f52a1cc7 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -334,7 +334,7 @@ bool video_context_driver_translate_aspect(gfx_ctx_aspect_t *aspect); bool video_context_driver_input_driver(gfx_ctx_input_t *inp); -#define video_context_driver_has_windowed() ((video_context_data && current_video_context->has_windowed(video_context_data)) ? true : false) +#define video_context_driver_has_windowed() ((video_context_data && current_video_context->has_windowed && current_video_context->has_windowed(video_context_data)) ? true : false) void video_context_driver_free(void); diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 5bd08e8d1f..4bf0344ff8 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -249,7 +249,7 @@ extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END]; #if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE) #define video_driver_has_windowed() (false) #else -#define video_driver_has_windowed() (current_video->has_windowed(video_driver_data)) +#define video_driver_has_windowed() (current_video->has_windowed && current_video->has_windowed(video_driver_data)) #endif #define video_driver_cached_frame_has_valid_framebuffer() (frame_cache_data ? (frame_cache_data == RETRO_HW_FRAME_BUFFER_VALID) : false) From ca2c2a8ce737a060305150de75eda0b7e2c53c9d Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 18 Jan 2017 21:12:01 -0500 Subject: [PATCH 216/427] separate this --- network/netplay/netplay_frontend.c | 38 +++++++++++++++++------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index e460d50209..e21cc1edf3 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -834,12 +834,32 @@ void deinit_netplay(void) -static void netplay_announce(void *task_data, void *user_data, const char *error) +static void netplay_announce_cb(void *task_data, void *user_data, const char *error) { RARCH_LOG("Announcing netplay game... \n"); return; } +static void netplay_announce() +{ + rarch_system_info_t *system = NULL; + settings_t *settings = config_get_ptr(); + + runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); + char url [2048] = "http://lobby.libretro.com/?"; + char buf [2048]; + buf[0] = '\0'; + + snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s&" + "gamename=%s&gamecrc=%08x&port=%d", + url, settings->username, system->info.library_name, + system->info.library_version, + path_basename(path_get(RARCH_PATH_BASENAME)),0, + settings->netplay.port); + + task_push_http_transfer(buf, true, NULL, netplay_announce_cb, NULL); +} + /** * init_netplay * @direct_host : Host to connect to directly, if applicable (client only) @@ -895,21 +915,7 @@ bool init_netplay(void *direct_host, const char *server, unsigned port) msg_hash_to_str(MSG_WAITING_FOR_CLIENT), 0, 180, false); - rarch_system_info_t *system = NULL; - - runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); - char url [2048] = "http://lobby.libretro.com/?"; - char buf [2048]; - buf[0] = '\0'; - - snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s - &gamename=%s&gamecrc=%08x&port=%d", - url, settings->username, system->info.library_name, - system->info.library_version, - path_basename(path_get(RARCH_PATH_BASENAME)),0, - settings->netplay.port); - - task_push_http_transfer(buf, true, NULL, netplay_announce, NULL); + netplay_announce(); } netplay_data = (netplay_t*)netplay_new( From 72cdb390cb1dc6d6112793df98bd01ab48f414dc Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 18 Jan 2017 21:31:02 -0500 Subject: [PATCH 217/427] reannounce roughly every minute --- network/netplay/netplay_frontend.c | 61 ++++++++++++++++-------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index e21cc1edf3..d8a9bc6b41 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -393,6 +393,34 @@ static int16_t netplay_input_state(netplay_t *netplay, } } +static int reannounce = 0; + +static void netplay_announce_cb(void *task_data, void *user_data, const char *error) +{ + RARCH_LOG("Announcing netplay game... \n"); + return; +} + +static void netplay_announce() +{ + rarch_system_info_t *system = NULL; + settings_t *settings = config_get_ptr(); + + runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); + char url [2048] = "http://lobby.libretro.com/?"; + char buf [2048]; + buf[0] = '\0'; + + snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s&" + "gamename=%s&gamecrc=%08x&port=%d", + url, settings->username, system->info.library_name, + system->info.library_version, + path_basename(path_get(RARCH_PATH_BASENAME)),0, + settings->netplay.port); + + task_push_http_transfer(buf, true, NULL, netplay_announce_cb, NULL); +} + int16_t input_state_net(unsigned port, unsigned device, unsigned idx, unsigned id) { @@ -522,7 +550,10 @@ static void netplay_frontend_paused(netplay_t *netplay, bool paused) bool netplay_pre_frame(netplay_t *netplay) { bool sync_stalled; - + reannounce ++; + RARCH_LOG("%d\n", reannounce); + if (reannounce % 3600 == 0) + netplay_announce(); retro_assert(netplay); /* FIXME: This is an ugly way to learn we're not paused anymore */ @@ -832,34 +863,6 @@ void deinit_netplay(void) core_unset_netplay_callbacks(); } - - -static void netplay_announce_cb(void *task_data, void *user_data, const char *error) -{ - RARCH_LOG("Announcing netplay game... \n"); - return; -} - -static void netplay_announce() -{ - rarch_system_info_t *system = NULL; - settings_t *settings = config_get_ptr(); - - runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); - char url [2048] = "http://lobby.libretro.com/?"; - char buf [2048]; - buf[0] = '\0'; - - snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s&" - "gamename=%s&gamecrc=%08x&port=%d", - url, settings->username, system->info.library_name, - system->info.library_version, - path_basename(path_get(RARCH_PATH_BASENAME)),0, - settings->netplay.port); - - task_push_http_transfer(buf, true, NULL, netplay_announce_cb, NULL); -} - /** * init_netplay * @direct_host : Host to connect to directly, if applicable (client only) From 95a2da81e4b43fd7edcf1eeceb15cac5a171238a Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 18 Jan 2017 22:46:48 -0500 Subject: [PATCH 218/427] start adding ui elements to insert room list into --- intl/msg_hash_lbl.h | 2 ++ intl/msg_hash_us.h | 10 +++++--- menu/cbs/menu_cbs_left.c | 3 +++ menu/cbs/menu_cbs_right.c | 3 +++ menu/cbs/menu_cbs_title.c | 2 ++ menu/drivers/xmb.c | 33 +++++++++++++++++++++++-- menu/menu_displaylist.c | 39 ++++++++++++++++++++++++++---- menu/menu_displaylist.h | 1 + menu/menu_driver.h | 1 + msg_hash.h | 1 + network/netplay/netplay_frontend.c | 1 - 11 files changed, 85 insertions(+), 11 deletions(-) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index b223e9fa33..e307a25cd5 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -14,6 +14,8 @@ MSG_HASH(MENU_ENUM_LABEL_CONFIGURATIONS_LIST, "configurations_list") MSG_HASH(MENU_ENUM_LABEL_ADD_TAB, "add_tab") +MSG_HASH(MENU_ENUM_LABEL_NETPLAY_TAB, + "netplay_tab") MSG_HASH(MENU_ENUM_LABEL_ARCHIVE_MODE, "archive_mode") MSG_HASH(MENU_ENUM_LABEL_ASSETS_DIRECTORY, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 4301bdd150..ffcfb615bf 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -199,6 +199,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TAB, "Import content" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, + "Netplay Rooms" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ARCHIVE_MODE, "Archive File Association Action" @@ -967,13 +971,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_CLIENT_SWAP_INPUT, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DELAY_FRAMES, "Netplay Delay Frames") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, - "Disconnect") + "Disconnect from netplay host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE, "Netplay Enable") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_CLIENT, - "Connect to Netplay host") + "Connect to netplay host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST, - "Start hosting") + "Start netplay host") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS, "Server Address") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_LAN_SCAN_SETTINGS, diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 3a139c101b..dc8b6e1e3f 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -487,6 +487,7 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs, string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || + string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)) || @@ -586,6 +587,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs, if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || + string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)) || @@ -625,6 +627,7 @@ int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs, if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || + string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 92f2d02912..c313ff1271 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -474,6 +474,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs, if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || + string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)) || @@ -594,6 +595,7 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs, if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || + string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_TAB)) || @@ -632,6 +634,7 @@ int menu_cbs_init_bind_right(menu_file_list_cbs_t *cbs, if ( string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_HISTORY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB)) || + string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_MUSIC_TAB)) || string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_IMAGES_TAB)) || diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index 89710e9c5c..0c1cc995df 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -257,6 +257,8 @@ static int action_get_title_group_settings(const char *path, const char *label, strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB), len); else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_TAB))) strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_TAB), len); + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB))) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_TAB), len); else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU))) strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HORIZONTAL_MENU), len); else diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 2a436e6fbd..88d0327bc1 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -96,6 +96,9 @@ enum XMB_TEXTURE_MUSICS, XMB_TEXTURE_MOVIES, #endif +#ifdef HAVE_NETWORKING + XMB_TEXTURE_NETPLAY, +#endif #ifdef HAVE_IMAGEVIEWER XMB_TEXTURE_IMAGES, #endif @@ -151,10 +154,15 @@ enum #ifdef HAVE_IMAGEVIEWER XMB_SYSTEM_TAB_IMAGES, #endif - XMB_SYSTEM_TAB_ADD + XMB_SYSTEM_TAB_ADD, +#ifdef HAVE_NETWORKING + XMB_SYSTEM_TAB_NETPLAY +#endif }; -#ifdef HAVE_LIBRETRODB +#ifdef HAVE_NETWORKING +#define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_NETPLAY +#elif defined(HAVE_LIBRETRODB) #define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_ADD #elif defined(HAVE_IMAGEVIEWER) #define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_IMAGES @@ -164,6 +172,7 @@ enum #define XMB_SYSTEM_TAB_END XMB_SYSTEM_TAB_HISTORY #endif + typedef struct xmb_handle { file_list_t *menu_stack_old; @@ -300,6 +309,7 @@ typedef struct xmb_handle xmb_node_t settings_tab_node; xmb_node_t history_tab_node; xmb_node_t add_tab_node; + xmb_node_t netplay_tab_node; font_data_t *font; font_data_t *font2; @@ -1466,6 +1476,8 @@ static xmb_node_t* xmb_get_node(xmb_handle_t *xmb, unsigned i) return &xmb->history_tab_node; case XMB_SYSTEM_TAB_ADD: return &xmb->add_tab_node; + case XMB_SYSTEM_TAB_NETPLAY: + return &xmb->netplay_tab_node; default: if (i > xmb->system_tab_end) return xmb_get_userdata_from_horizontal_list( @@ -3249,6 +3261,9 @@ static void *xmb_init(void **userdata) if (settings->menu.xmb.show_add) xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_ADD; #endif +#ifdef HAVE_NETWORKING + xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_NETPLAY; +#endif menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL); @@ -3464,6 +3479,8 @@ static const char *xmb_texture_path(unsigned id) return "off.png"; case XMB_TEXTURE_ADD: return "add.png"; + case XMB_TEXTURE_NETPLAY: + return "wifi.png"; case XMB_TEXTURE_KEY: return "key.png"; case XMB_TEXTURE_KEY_HOVER: @@ -3514,6 +3531,12 @@ static void xmb_context_reset_textures( xmb->add_tab_node.icon = xmb->textures.list[XMB_TEXTURE_ADD]; xmb->add_tab_node.alpha = xmb->categories.active.alpha; xmb->add_tab_node.zoom = xmb->categories.active.zoom; + +#ifdef HAVE_NETWORKING + xmb->netplay_tab_node.icon = xmb->textures.list[XMB_TEXTURE_NETPLAY]; + xmb->netplay_tab_node.alpha = xmb->categories.active.alpha; + xmb->netplay_tab_node.zoom = xmb->categories.active.zoom; +#endif } static void xmb_context_reset_background(const char *iconpath) @@ -3826,6 +3849,12 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action menu_stack->list[stack_size - 1].type = MENU_ADD_TAB; break; + case XMB_SYSTEM_TAB_NETPLAY: + menu_stack->list[stack_size - 1].label = + strdup(msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)); + menu_stack->list[stack_size - 1].type = + MENU_NETPLAY_TAB; + break; default: menu_stack->list[stack_size - 1].label = strdup(msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 84f802422e..8f6ee38771 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -244,11 +244,6 @@ static int menu_displaylist_parse_netplay( MENU_ENUM_LABEL_NETPLAY_DISCONNECT, MENU_SETTING_ACTION, 0, 0); - menu_entries_append_enum(info->list, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS), - msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_SETTINGS), - MENU_ENUM_LABEL_NETWORK_SETTINGS, MENU_SETTING_GROUP, 0, 0); - menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_LAN_SCAN_SETTINGS), msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS), @@ -2697,6 +2692,11 @@ static int menu_displaylist_parse_load_content_settings( MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS, MENU_SETTING_ACTION, 0, 0); +#ifdef HAVE_NETWORKING + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_NETPLAY, + PARSE_ACTION, false); +#endif menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS), @@ -2930,6 +2930,7 @@ static int menu_displaylist_parse_add_content_list( static int menu_displaylist_parse_scan_directory_list( menu_displaylist_info_t *info) { + #ifdef HAVE_LIBRETRODB menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY), @@ -2947,6 +2948,21 @@ static int menu_displaylist_parse_scan_directory_list( return 0; } +static int menu_displaylist_parse_netplay_room_list( + menu_displaylist_info_t *info) +{ + +#ifdef HAVE_NETWORKING + menu_entries_append_enum(info->list, + "Refresh Room List", + msg_hash_to_str(MENU_ENUM_LABEL_SCAN_DIRECTORY), + MENU_ENUM_LABEL_SCAN_DIRECTORY, + MENU_SETTING_ACTION, 0, 0); +#endif + + return 0; +} + static int menu_displaylist_parse_options( menu_displaylist_info_t *info) { @@ -3781,6 +3797,12 @@ static bool menu_displaylist_push_internal( return false; return true; } + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB))) + { + if (!menu_displaylist_ctl(DISPLAYLIST_NETPLAY_ROOM_LIST, info)) + return false; + return true; + } else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU))) { if (!menu_displaylist_ctl(DISPLAYLIST_HORIZONTAL, info)) @@ -3909,6 +3931,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) case DISPLAYLIST_ADD_CONTENT_LIST: case DISPLAYLIST_CONFIGURATIONS_LIST: case DISPLAYLIST_SCAN_DIRECTORY_LIST: + case DISPLAYLIST_NETPLAY_ROOM_LIST: case DISPLAYLIST_LOAD_CONTENT_LIST: case DISPLAYLIST_USER_BINDS_LIST: case DISPLAYLIST_ACCOUNTS_LIST: @@ -5312,6 +5335,12 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) case DISPLAYLIST_SCAN_DIRECTORY_LIST: ret = menu_displaylist_parse_scan_directory_list(info); + info->need_push = true; + info->need_refresh = true; + break; + case DISPLAYLIST_NETPLAY_ROOM_LIST: + ret = menu_displaylist_parse_netplay_room_list(info); + info->need_push = true; info->need_refresh = true; break; diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 5e63c5f768..c7156ec55d 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -151,6 +151,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_ADD_CONTENT_LIST, DISPLAYLIST_CONFIGURATIONS_LIST, DISPLAYLIST_SCAN_DIRECTORY_LIST, + DISPLAYLIST_NETPLAY_ROOM_LIST, DISPLAYLIST_ARCHIVE_ACTION, DISPLAYLIST_ARCHIVE_ACTION_DETECT_CORE, DISPLAYLIST_CORE_CONTENT, diff --git a/menu/menu_driver.h b/menu/menu_driver.h index e097fd6a06..3429cac4f6 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -158,6 +158,7 @@ enum menu_settings_type MENU_MUSIC_TAB, MENU_VIDEO_TAB, MENU_IMAGES_TAB, + MENU_NETPLAY_TAB, MENU_ADD_TAB, MENU_PLAYLISTS_TAB, MENU_SETTING_NO_ITEM, diff --git a/msg_hash.h b/msg_hash.h index 863c19246d..f3cd259221 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1146,6 +1146,7 @@ enum msg_hash_enums MENU_LABEL(SETTINGS_TAB), MENU_LABEL(HISTORY_TAB), MENU_LABEL(ADD_TAB), + MENU_LABEL(NETPLAY_TAB), MENU_LABEL(PLAYLISTS_TAB), MENU_LABEL(MAIN_MENU), MENU_LABEL(INPUT_SETTINGS), diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index d8a9bc6b41..1181c0eaab 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -551,7 +551,6 @@ bool netplay_pre_frame(netplay_t *netplay) { bool sync_stalled; reannounce ++; - RARCH_LOG("%d\n", reannounce); if (reannounce % 3600 == 0) netplay_announce(); retro_assert(netplay); From b44c8c99959d0942fe1e00e613fee464380c14a8 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 19 Jan 2017 00:33:52 -0500 Subject: [PATCH 219/427] store buffer for window title, only update actual title when it changes --- gfx/common/x11_common.c | 10 ++++++-- gfx/drivers/sdl2_gfx.c | 11 ++++++++- gfx/drivers/xvideo.c | 11 ++++++++- gfx/drivers_context/cocoa_gl_ctx.m | 11 ++++++++- gfx/drivers_context/d3d_ctx.cpp | 11 ++++++++- gfx/drivers_context/gdi_ctx.cpp | 13 +++++++++-- gfx/drivers_context/sdl_gl_ctx.c | 13 ++++++++--- gfx/drivers_context/wayland_ctx.c | 9 ++++++-- gfx/drivers_context/wgl_ctx.cpp | 11 ++++++++- gfx/video_driver.c | 37 +++++++++++++++++++++--------- gfx/video_driver.h | 3 ++- 11 files changed, 114 insertions(+), 26 deletions(-) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 196f73ae75..2ed94fc1d7 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -716,8 +716,14 @@ bool x11_connect(void) void x11_update_title(void *data, video_frame_info_t *video_info) { - if (video_info->monitor_fps_enable) - XStoreName(g_x11_dpy, g_x11_win, video_info->window_text); + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0] && video_info->monitor_fps_enable) + XStoreName(g_x11_dpy, g_x11_win, title); } bool x11_input_ctx_new(bool true_full) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 8dd22ccdcd..6cc61b0a8c 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -534,7 +534,16 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, SDL_RenderPresent(vid->renderer); if (video_info->monitor_fps_enable) - SDL_SetWindowTitle(vid->window, video_info->window_text); + { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + SDL_SetWindowTitle(vid->window, title); + } return true; } diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 6ee19f84e8..463e1f28c2 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -539,7 +539,16 @@ static void *xv_init(const video_info_t *video, video_driver_build_info(&video_info); if (video_info.monitor_fps_enable) - XStoreName(g_x11_dpy, g_x11_win, video_info.window_text); + { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + XStoreName(g_x11_dpy, g_x11_win, title); + } x11_set_window_attr(g_x11_dpy, g_x11_win); diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index d2a276b74a..aa91c64738 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -425,7 +425,16 @@ static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_i view.data = (CocoaView*)nsview_get_ptr(); if (window && video_info->monitor_fps_enable) - window->set_title(&view, video_info->window_text); + { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + window->set_title(&view, title); + } } #endif diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 1d2b9ae948..98f65be158 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -102,7 +102,16 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) const ui_window_t *window = ui_companion_driver_get_window_ptr(); if (window && video_info->monitor_fps_enable) - window->set_title(&main_window, video_info->window_text); + { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + window->set_title(&main_window, title); + } #endif } diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 190f0532be..dea9050840 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -86,12 +86,21 @@ static bool gfx_ctx_gdi_set_resize(void *data, return false; } -static void gfx_ctx_gdi_update_title(void *data, video_frame_info_t *video_info) +static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t *video_info) { const ui_window_t *window = ui_companion_driver_get_window_ptr(); if (window && video_info->monitor_fps_enable) - window->set_title(&main_window, video_info->window_text); + { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + window->set_title(&main_window, title); + } } static void gfx_ctx_gdi_get_video_size(void *data, diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 3a38de6a0b..c4f6ff3e57 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -268,14 +268,21 @@ static void sdl_ctx_get_video_size(void *data, static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + if (video_info->monitor_fps_enable) { #ifdef HAVE_SDL2 gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; - if (sdl) - SDL_SetWindowTitle(sdl->g_win, video_info->window_text); + + if (sdl && title[0]) + SDL_SetWindowTitle(sdl->g_win, title); #else - SDL_WM_SetCaption(video_info->window_text, NULL); + SDL_WM_SetCaption(title, NULL); #endif } } diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index ddcbb55ce3..70100b88a3 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -719,9 +719,14 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + char title[128]; - if (wl && video_info->monitor_fps_enable) - wl_shell_surface_set_title(wl->shell_surf, video_info->window_text); + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (wl && title[0] && video_info->monitor_fps_enable) + wl_shell_surface_set_title(wl->shell_surf, title); } diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index ee7e48a75b..18b83ba5c0 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -390,7 +390,16 @@ static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) const ui_window_t *window = ui_companion_driver_get_window_ptr(); if (window && video_info->monitor_fps_enable) - window->set_title(&main_window, video_info->window_text); + { + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + window->set_title(&main_window, title); + } } static void gfx_ctx_wgl_get_video_size(void *data, diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 50e6bc0126..e3928f934c 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -137,6 +137,8 @@ static unsigned video_driver_height = 0; static enum rarch_display_type video_driver_display_type = RARCH_DISPLAY_NONE; static char video_driver_title_buf[64] = {0}; +static char video_driver_window_title[128] = {0}; +static bool video_driver_window_title_update = true; static retro_time_t video_driver_frame_time_samples[MEASURE_FRAME_TIME_SAMPLES_COUNT]; static uint64_t video_driver_frame_time_count = 0; @@ -2039,34 +2041,36 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); curr_time = new_time; - fill_pathname_noext(video_info->window_text, + fill_pathname_noext(video_driver_window_title, video_driver_title_buf, " || ", - sizeof(video_info->window_text)); + sizeof(video_driver_window_title)); if (video_info->fps_show) { snprintf(video_info->fps_text, sizeof(video_info->fps_text), " FPS: %6.1f || ", last_fps); - strlcat(video_info->window_text, + strlcat(video_driver_window_title, video_info->fps_text, - sizeof(video_info->window_text)); + sizeof(video_driver_window_title)); } - strlcat(video_info->window_text, + strlcat(video_driver_window_title, "Frames: ", - sizeof(video_info->window_text)); + sizeof(video_driver_window_title)); snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, (unsigned long long)video_info->frame_count); - strlcat(video_info->window_text, + strlcat(video_driver_window_title, frames_text, - sizeof(video_info->window_text)); + sizeof(video_driver_window_title)); ret = true; + + video_driver_window_title_update = true; } if (video_info->fps_show) @@ -2082,14 +2086,16 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) } curr_time = fps_time = new_time; - strlcpy(video_info->window_text, + strlcpy(video_driver_window_title, video_driver_title_buf, - sizeof(video_info->window_text)); + sizeof(video_driver_window_title)); strlcpy(video_info->fps_text, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), sizeof(video_info->fps_text)); + video_driver_window_title_update = true; + return true; } @@ -2264,11 +2270,11 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->font_enable = settings->video.font_enable; video_info->frame_count = 0; - video_info->window_text[0] = '\0'; video_info->fps_text[0] = '\0'; video_info->width = video_driver_width; video_info->height = video_driver_height; + video_driver_threaded_unlock(); } @@ -2325,3 +2331,12 @@ bool video_driver_translate_coord_viewport( return true; } + +void video_driver_get_window_title(char *buf, unsigned len) +{ + if (buf && video_driver_window_title_update) + { + strlcpy(buf, video_driver_window_title, len); + video_driver_window_title_update = false; + } +} diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 4bf0344ff8..479cb77cf7 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -102,7 +102,6 @@ typedef struct video_frame_info unsigned monitor_index; bool font_enable; bool monitor_fps_enable; - char window_text[128]; char fps_text[128]; uint64_t frame_count; @@ -531,6 +530,8 @@ void video_driver_build_info(video_frame_info_t *video_info); void video_driver_reinit(void); +void video_driver_get_window_title(char *buf, unsigned len); + extern video_driver_t video_gl; extern video_driver_t video_vulkan; extern video_driver_t video_psp1; From 009c1a45b7cd8b9d980789f2545392a18cac6ed8 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 19 Jan 2017 00:36:29 -0500 Subject: [PATCH 220/427] forgot check for SDL1 --- gfx/drivers_context/sdl_gl_ctx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index c4f6ff3e57..ad6dbff509 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -282,7 +282,8 @@ static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) if (sdl && title[0]) SDL_SetWindowTitle(sdl->g_win, title); #else - SDL_WM_SetCaption(title, NULL); + if (title[0]) + SDL_WM_SetCaption(title, NULL); #endif } } From 7c833074bb9943673ba613e38f06e7ca2085942c Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 00:52:53 -0500 Subject: [PATCH 221/427] parsing now works --- file_path_special.h | 1 + file_path_str.c | 2 + intl/msg_hash_lbl.h | 2 + menu/cbs/menu_cbs_ok.c | 113 +++++++++++++++++++++++++++++++++++++++- menu/menu_displaylist.c | 4 +- msg_hash.h | 1 + 6 files changed, 120 insertions(+), 3 deletions(-) diff --git a/file_path_special.h b/file_path_special.h index 521866143a..9a119dad7d 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -53,6 +53,7 @@ enum file_path_enum FILE_PATH_LAKKA_URL, FILE_PATH_CORE_THUMBNAILS_URL, FILE_PATH_INDEX_DIRS_URL, + FILE_PATH_NETPLAY_ROOM_LIST_URL, FILE_PATH_INDEX_URL, FILE_PATH_INDEX_EXTENDED_URL, FILE_PATH_CGP_EXTENSION, diff --git a/file_path_str.c b/file_path_str.c index fea26786c2..77009bcf46 100644 --- a/file_path_str.c +++ b/file_path_str.c @@ -101,6 +101,8 @@ const char *file_path_str(enum file_path_enum enum_idx) return ".index-dirs"; case FILE_PATH_INDEX_EXTENDED_URL: return ".index-extended"; + case FILE_PATH_NETPLAY_ROOM_LIST_URL: + return "registry.lpl"; case FILE_PATH_CORE_THUMBNAILS_URL: return "http://thumbnailpacks.libretro.com"; case FILE_PATH_LAKKA_URL: diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index e307a25cd5..b90ab38ac9 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -839,6 +839,8 @@ MSG_HASH(MENU_ENUM_LABEL_SCAN_DIRECTORY, "scan_directory") MSG_HASH(MENU_ENUM_LABEL_SCAN_FILE, "scan_file") +MSG_HASH(MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS, + "refresh_rooms") MSG_HASH(MENU_ENUM_LABEL_SCAN_THIS_DIRECTORY, "scan_this_directory") MSG_HASH(MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 944791e075..d0741abab1 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3262,6 +3262,18 @@ static int action_ok_push_content_list(const char *path, entry_idx, ACTION_OK_DL_CONTENT_LIST); } +struct room +{ + char nickname [PATH_MAX_LENGTH]; + char address [PATH_MAX_LENGTH]; + int port; + char corename [PATH_MAX_LENGTH]; + char coreversion [PATH_MAX_LENGTH]; + char gamename [PATH_MAX_LENGTH]; + int gamecrc; + int timestamp; +}; + static int action_ok_push_scan_file(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -3269,6 +3281,102 @@ static int action_ok_push_scan_file(const char *path, return action_ok_push_content_list(path, label, type, idx, entry_idx); } +static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const char *err) +{ + char buf[PATH_MAX_LENGTH]; + + http_transfer_data_t *data = (http_transfer_data_t*)task_data; + menu_file_transfer_t *state = (menu_file_transfer_t*)user_data; + + buf[0] = '\0'; + + if (!data || err) + goto finish; + + memcpy(buf, data->data, data->len * sizeof(char)); + buf[data->len] = '\0'; + + +finish: + if (!err && !strstr(buf, file_path_str(FILE_PATH_NETPLAY_ROOM_LIST_URL))) + { + if (string_is_empty(buf)) + RARCH_LOG("Room list empty\n"); + else + { + int rooms, i = 0; + char tmp[PATH_MAX_LENGTH]; + struct string_list *room_data = NULL; + room_data = string_split(buf, "\n"); + + rooms = room_data->size / 8; + struct room *room_list = NULL; + room_list = (struct room*)malloc(sizeof(struct room) * rooms); + + /*for (int i = 0; i < room_data->size; i++) + { + strlcpy(tmp, + room_data->elems[i].data, sizeof(tmp)); + RARCH_LOG("tmp %s\n", tmp); + + }*/ + + RARCH_LOG ("Found %d rooms\n", rooms); + for (i = 0; i < rooms; i++) + { + strlcpy(room_list[i].nickname, room_data->elems[(i+1)*0].data, sizeof(room_list[i].nickname)); + strlcpy(room_list[i].address, room_data->elems[(i+1)*1].data, sizeof(room_list[i].address)); + room_list[i].port = atoi(room_data->elems[(i+1)*2].data); + strlcpy(room_list[i].corename, room_data->elems[(i+1)*3].data, sizeof(room_list[i].corename)); + strlcpy(room_list[i].coreversion, room_data->elems[(i+1)*4].data, sizeof(room_list[i].coreversion)); + strlcpy(room_list[i].gamename, room_data->elems[(i+1)*5].data, sizeof(room_list[i].coreversion)); + room_list[i].gamecrc = atoi(room_data->elems[(i+1)*6].data); + room_list[i].timestamp = atoi(room_data->elems[(i+1)*7].data); + RARCH_LOG("Room Data: \n" + "Nickname: %s\n" + "Address: %s\n" + "Port: %d\n" + "Core: %s\n" + "Core Version: %s\n" + "Game: %s\n" + "Game CRC: %d\n" + "Timestamp: %d\n", + room_list[i].nickname, + room_list[i].address, + room_list[i].port, + room_list[i].corename, + room_list[i].coreversion, + room_list[i].gamename, + room_list[i].gamecrc, + room_list[i].timestamp); + } + } + } + + if (err) + RARCH_ERR("%s: %s\n", msg_hash_to_str(MSG_DOWNLOAD_FAILED), err); + + if (data) + { + if (data->data) + free(data->data); + free(data); + } + + if (user_data) + free(user_data); + +} + +static int action_ok_push_netplay_refresh_rooms(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + char url [2048] = "http://lobby.libretro.com/registry.lpl"; + task_push_http_transfer(url, true, NULL, netplay_refresh_rooms_cb, NULL); + return 0; +} + + static int action_ok_scan_directory_list(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -3779,7 +3887,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, first_char = atoi(&str[0]); - if (first_char != (i+1)) + if (first_char != ((i+1))) continue; BIND_ACTION_OK(cbs, action_ok_push_user_binds_list); @@ -3992,6 +4100,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_SCAN_FILE: BIND_ACTION_OK(cbs, action_ok_push_scan_file); break; + case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS: + BIND_ACTION_OK(cbs, action_ok_push_netplay_refresh_rooms); + break; case MENU_ENUM_LABEL_FAVORITES: BIND_ACTION_OK(cbs, action_ok_push_content_list); break; diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 8f6ee38771..9fc439adf2 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2955,8 +2955,8 @@ static int menu_displaylist_parse_netplay_room_list( #ifdef HAVE_NETWORKING menu_entries_append_enum(info->list, "Refresh Room List", - msg_hash_to_str(MENU_ENUM_LABEL_SCAN_DIRECTORY), - MENU_ENUM_LABEL_SCAN_DIRECTORY, + msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS), + MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS, MENU_SETTING_ACTION, 0, 0); #endif diff --git a/msg_hash.h b/msg_hash.h index f3cd259221..1f1dfcc362 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -867,6 +867,7 @@ enum msg_hash_enums MENU_LABEL(SCAN_THIS_DIRECTORY), MENU_LABEL(SCAN_DIRECTORY), MENU_LABEL(SCAN_FILE), + MENU_LABEL(NETPLAY_REFRESH_ROOMS), MENU_LABEL(ADD_CONTENT_LIST), MENU_LABEL(CONFIGURATIONS_LIST), From 9e1f267ab275ab97e3d50f9acbf59d7ab7653b5d Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 02:05:33 -0500 Subject: [PATCH 222/427] fix listing --- menu/cbs/menu_cbs_ok.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d0741abab1..c7ba6f80af 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3304,7 +3304,7 @@ finish: RARCH_LOG("Room list empty\n"); else { - int rooms, i = 0; + int rooms, i, j = 0; char tmp[PATH_MAX_LENGTH]; struct string_list *room_data = NULL; room_data = string_split(buf, "\n"); @@ -3324,14 +3324,14 @@ finish: RARCH_LOG ("Found %d rooms\n", rooms); for (i = 0; i < rooms; i++) { - strlcpy(room_list[i].nickname, room_data->elems[(i+1)*0].data, sizeof(room_list[i].nickname)); - strlcpy(room_list[i].address, room_data->elems[(i+1)*1].data, sizeof(room_list[i].address)); - room_list[i].port = atoi(room_data->elems[(i+1)*2].data); - strlcpy(room_list[i].corename, room_data->elems[(i+1)*3].data, sizeof(room_list[i].corename)); - strlcpy(room_list[i].coreversion, room_data->elems[(i+1)*4].data, sizeof(room_list[i].coreversion)); - strlcpy(room_list[i].gamename, room_data->elems[(i+1)*5].data, sizeof(room_list[i].coreversion)); - room_list[i].gamecrc = atoi(room_data->elems[(i+1)*6].data); - room_list[i].timestamp = atoi(room_data->elems[(i+1)*7].data); + strlcpy(room_list[i].nickname, room_data->elems[j+0].data, sizeof(room_list[i].nickname)); + strlcpy(room_list[i].address, room_data->elems[j+1].data, sizeof(room_list[i].address)); + room_list[i].port = atoi(room_data->elems[j+2].data); + strlcpy(room_list[i].corename, room_data->elems[j+3].data, sizeof(room_list[i].corename)); + strlcpy(room_list[i].coreversion, room_data->elems[j+4].data, sizeof(room_list[i].coreversion)); + strlcpy(room_list[i].gamename, room_data->elems[j+5].data, sizeof(room_list[i].coreversion)); + room_list[i].gamecrc = atoi(room_data->elems[j+6].data); + room_list[i].timestamp = atoi(room_data->elems[j+7].data); RARCH_LOG("Room Data: \n" "Nickname: %s\n" "Address: %s\n" @@ -3349,6 +3349,7 @@ finish: room_list[i].gamename, room_list[i].gamecrc, room_list[i].timestamp); + j+=8; } } } From 9237752d915f3ffdff5b6e777dc7bf2edef16ca2 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 02:09:09 -0500 Subject: [PATCH 223/427] styling --- menu/cbs/menu_cbs_ok.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index c7ba6f80af..7026b04a64 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3262,6 +3262,8 @@ static int action_ok_push_content_list(const char *path, entry_idx, ACTION_OK_DL_CONTENT_LIST); } +/* data is ordered like this on the server, I left it in this ordered + for reference */ struct room { char nickname [PATH_MAX_LENGTH]; @@ -3324,14 +3326,15 @@ finish: RARCH_LOG ("Found %d rooms\n", rooms); for (i = 0; i < rooms; i++) { - strlcpy(room_list[i].nickname, room_data->elems[j+0].data, sizeof(room_list[i].nickname)); - strlcpy(room_list[i].address, room_data->elems[j+1].data, sizeof(room_list[i].address)); - room_list[i].port = atoi(room_data->elems[j+2].data); - strlcpy(room_list[i].corename, room_data->elems[j+3].data, sizeof(room_list[i].corename)); - strlcpy(room_list[i].coreversion, room_data->elems[j+4].data, sizeof(room_list[i].coreversion)); - strlcpy(room_list[i].gamename, room_data->elems[j+5].data, sizeof(room_list[i].coreversion)); - room_list[i].gamecrc = atoi(room_data->elems[j+6].data); - room_list[i].timestamp = atoi(room_data->elems[j+7].data); + strlcpy(room_list[i].nickname, room_data->elems[j + 0].data, sizeof(room_list[i].nickname)); + strlcpy(room_list[i].address, room_data->elems[j + 1].data, sizeof(room_list[i].address)); + strlcpy(room_list[i].corename, room_data->elems[j + 3].data, sizeof(room_list[i].corename)); + strlcpy(room_list[i].coreversion, room_data->elems[j + 4].data, sizeof(room_list[i].coreversion)); + strlcpy(room_list[i].gamename, room_data->elems[j + 5].data, sizeof(room_list[i].coreversion)); + room_list[i].port = atoi(room_data->elems[j + 2].data); + room_list[i].gamecrc = atoi(room_data->elems[j + 6].data); + room_list[i].timestamp = atoi(room_data->elems[j + 7].data); + RARCH_LOG("Room Data: \n" "Nickname: %s\n" "Address: %s\n" From 5489bd3a95d15487cdf9f7364d487f04ac875b35 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 10:30:10 +0100 Subject: [PATCH 224/427] Fixed common typos --- intl/msg_hash_de.h | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 865ac62e12..b04fa8aaa3 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -37,7 +37,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_DRIVER, "Audio-Resampler-Treiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS, - "Audio-Einstellungen") + "Audioeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_SYNC, "Synchronisiere Audio") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME, @@ -75,7 +75,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT, MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS, "Konfigurationsdatei laden") /* FIXME/UPDATE */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS, - "Konfigurations-Einstellungen") + "Konfigurationseinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST, "Konfigurationen") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, @@ -159,7 +159,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND, "Ordner nicht gefunden.") MSG_HASH(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS, - "Verzeichnis-Einstellungen") + "Verzeichniseinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISABLED, "Deaktiviert") MSG_HASH(MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS, @@ -181,7 +181,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_VALUE, "DPI-Override") MSG_HASH(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS, - "Treiber-Einstellungen") + "Treibereinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, "Dummy bei Core-Abschaltung") MSG_HASH(MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPER, @@ -253,7 +253,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, /* UPDATE/FIXME */ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, "Bind-Remapping aktivieren") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS, - "Eingabe-Einstellungen") + "Eingabeeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Turbo-Dauer") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, @@ -317,13 +317,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_LOG_VERBOSITY, MSG_HASH(MENU_ENUM_LABEL_VALUE_MAIN_MENU, "Hauptmenü") MSG_HASH(MENU_ENUM_LABEL_VALUE_MANAGEMENT, - "Datenbank-Einstellungen") + "Datenbankeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER, "Menü-Treiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Menü-Dateibrowser-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, - "Menü-Einstellungen") + "Menüeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, "Menühintergrund") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, @@ -335,7 +335,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MORE, MSG_HASH(MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Maus-Unterstützung") MSG_HASH(MENU_ENUM_LABEL_VALUE_MULTIMEDIA_SETTINGS, - "Multimedia-Einstellungen") + "Multimediaeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "Musik") MSG_HASH(MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -469,7 +469,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "Wiedergabelisten-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS, - "Wiedergabelisten-Einstellungen") + "Wiedergabelisteneinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "Touch-Unterstützung") MSG_HASH(MENU_ENUM_LABEL_VALUE_PORT, @@ -477,7 +477,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PORT, MSG_HASH(MENU_ENUM_LABEL_VALUE_PRESENT, "Vorhanden") MSG_HASH(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS, - "Privatsphäre-Einstellungen") + "Privatsphäreeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, "RetroArch beenden") MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_CRC32, @@ -511,7 +511,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY, "Aufnahme-Ausgabeverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, - "Aufnahme-Einstellungen") + "Aufnahmeeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, "Aufnahme-Konfiguration") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORD_DRIVER, @@ -547,7 +547,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, "Genauigkeit des Zurückspulens (Rewind)") MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS, - "Zurückspul-Einstellungen") + "Zurückspuleinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "Dateibrowser-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, @@ -575,7 +575,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG, MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_STATE, "Savestate speichern") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS, - "Spielstand-Einstellungen") + "Spielstandeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY, "Verzeichnis Durchsuchen") MSG_HASH(MENU_ENUM_LABEL_VALUE_SCAN_FILE, @@ -779,11 +779,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_OVERLAYS, MSG_HASH(MENU_ENUM_LABEL_VALUE_USER, "Benutzer") MSG_HASH(MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS, - "Benutzeroberflächen-Einstellungen") + "Benutzeroberflächeneinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Sprache") MSG_HASH(MENU_ENUM_LABEL_VALUE_USER_SETTINGS, - "Benutzer-Einstellungen") + "Benutzereinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, "Verwende integrierten Player") /* FIXME/UPDATE */ MSG_HASH(MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, @@ -851,7 +851,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SCALE, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER, "Ganzzahlige Bildskalierung") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS, - "Video-Einstellungen") + "Videoeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DIR, "Grafikshader-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, @@ -914,6 +914,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, "Verwalte und erstelle Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Limit the number of entries in recent playlist for games, images, music, and videos.") +MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, + "Ändere Treiber für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, From 3a47c9131489aba4d3b5cb53798f25ae932fa38f Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 10:41:43 +0100 Subject: [PATCH 225/427] Added translations for some sublables --- intl/msg_hash_de.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index b04fa8aaa3..d086e63dbe 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -910,6 +910,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO, "Zeige Videos") MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, "Ja") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, + "Einstellungen zur Audioausgabe.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, "Verwalte und erstelle Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, @@ -922,6 +924,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Enable or disable recent playlist for games, images, music, and videos.") MSG_HASH(MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, "Zeigt Informationen über Core, Netzwerk, und des Systems an. Anzeigen-Manager für Datenbank und Zeiger.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_SETTINGS, + "Einstellungen für Joypads, Tastaturen und Mäuse.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, @@ -938,6 +942,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, + "Einstellungen zur Videoausgabe.") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK, "Zurück") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_CONFIRM, From f704a78bfe25a0b5583fdfbb2a149669393b356c Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 10:43:08 +0100 Subject: [PATCH 226/427] Fixed common typos --- intl/msg_hash_de.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index d086e63dbe..e467f8dbd6 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -17,7 +17,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES, MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE, "Soundkarte") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_DRIVER, - "Audio-Treiber") + "Audiotreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN, "Audio-DSP-Plugin") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE, @@ -57,7 +57,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY, /* FIXME/UPDATE */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CAMERA_ALLOW, "Erlaube Kamera-Zugriff") MSG_HASH(MENU_ENUM_LABEL_VALUE_CAMERA_DRIVER, - "Kamera-Treiber") + "Kameratreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT, "Cheat") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_CHANGES, @@ -239,7 +239,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW, /* TODO/FIXME */ "Zeige Core-Eingabe-Beschriftungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, - "Eingabe-Treiber") + "Eingabetreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Auslastungsgrad") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS, @@ -309,7 +309,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_LOAD_STATE, MSG_HASH(MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW, "Erlaube Standort-Lokalisierung") MSG_HASH(MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, - "Standort-Treiber") + "Standorttreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS, "Logging-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_LOG_VERBOSITY, @@ -319,7 +319,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MAIN_MENU, MSG_HASH(MENU_ENUM_LABEL_VALUE_MANAGEMENT, "Datenbankeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER, - "Menü-Treiber") + "Menütreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Menü-Dateibrowser-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -515,7 +515,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, "Aufnahme-Konfiguration") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORD_DRIVER, - "Aufnahme-Treiber") + "Aufnahmetreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORD_ENABLE, "Aktiviere Aufnahmefunktion") MSG_HASH(MENU_ENUM_LABEL_VALUE_RECORD_PATH, /* FIXME/UPDATE */ @@ -893,9 +893,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN, "Unechter Vollbild-Modus (Windowed Fullscreen)") MSG_HASH(MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, - "Wlan-Treiber") + "WLAN-Treiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS, - "Wlan") + "WLAN") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, "Icon Schatten") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_HISTORY, From 1e5fe79bf3f47424d9da4a86e79a3436772dabef Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 10:44:57 +0100 Subject: [PATCH 227/427] Fixed another typo --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index e467f8dbd6..fc4a7465b4 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -197,7 +197,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_FALSE, MSG_HASH(MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, "Maximale Ausführungsgeschwindigkeit") MSG_HASH(MENU_ENUM_LABEL_VALUE_FPS_SHOW, - "Zeige Framerate") + "Zeige Bildwiederholungsrate") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE, "Begrenze maximale Ausführungsgeschwindigkeit") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRONTEND_COUNTERS, From 690963bf2d8b33533d4e0c04405b7f56ebc2954d Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 11:09:10 +0100 Subject: [PATCH 228/427] Added translations for first level of settings --- intl/msg_hash_de.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index fc4a7465b4..66db37f72d 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -538,6 +538,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RESUME, "Fortsetzen") MSG_HASH(MENU_ENUM_LABEL_VALUE_RESUME_CONTENT, "Fortsetzen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_RETRO_ACHIEVEMENTS_SETTINGS, + "Errungenschaften") MSG_HASH(MENU_ENUM_LABEL_VALUE_RETROKEYBOARD, "RetroKeyboard") MSG_HASH(MENU_ENUM_LABEL_VALUE_RETROPAD, @@ -912,12 +914,20 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, "Ja") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, "Einstellungen zur Audioausgabe.") +MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, + "Ändere die Standardeinstellungen für Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, "Verwalte und erstelle Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Limit the number of entries in recent playlist for games, images, music, and videos.") +MSG_HASH(MENU_ENUM_SUBLABEL_CORE_SETTINGS, + "Ändere Einstellungen der Cores.") +MSG_HASH(MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, + "Ändere das Standardverzeichis für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "Ändere Treiber für dieses System.") +MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, + "Ändere Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") // This does not sound like a correct sentence. Suggestions are appreciated. MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -928,6 +938,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_SETTINGS, "Einstellungen für Joypads, Tastaturen und Mäuse.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") +MSG_HASH(MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, + "Ändere die Logging-Einstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, "Hoste eine Netplay Session oder trete einer bei.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_LAN_SCAN_SETTINGS, @@ -936,8 +948,22 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, "Ändere die Netzwerkeinstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, "Lade Add-Ons, Komponenten und Inhalte für RetroArch herunter.") +MSG_HASH(MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS, + "Ändere Einstellungen des Display-Overlays, Bildschirmtastatur und Bildschirmbenachrichtigung.") // There is no Translation for display overlay. MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pause gameplay when window focus is lost.") +MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, + "Ändere Einstellungen der Wiedergabelisten.") +MSG_HASH(MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS, + "Ändere deine Privatsphäreneinstellungen.") +MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, + "Ändere Einstellungen der Errungenschaften.") +MSG_HASH(MENU_ENUM_SUBLABEL_SAVING_SETTINGS, + "Ändere Einstellungen der Spielstände.") +MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, + "Ändere Einstellungen der Benutzeroberfläche.") +MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, + "Ändere das Konto, Benutzername, und die Sprache.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, From b7f2eccbe95885a238b1b6ff3cc7332b271d0c57 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 11:09:49 +0100 Subject: [PATCH 229/427] Fixed typo --- intl/msg_hash_de.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 66db37f72d..171dff7688 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -921,13 +921,13 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Limit the number of entries in recent playlist for games, images, music, and videos.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_SETTINGS, - "Ändere Einstellungen der Cores.") + "Ändere die Einstellungen der Cores.") MSG_HASH(MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, "Ändere das Standardverzeichis für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "Ändere Treiber für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, - "Ändere Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") // This does not sound like a correct sentence. Suggestions are appreciated. + "Ändere die Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") // This does not sound like a correct sentence. Suggestions are appreciated. MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -949,19 +949,19 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, "Lade Add-Ons, Komponenten und Inhalte für RetroArch herunter.") MSG_HASH(MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS, - "Ändere Einstellungen des Display-Overlays, Bildschirmtastatur und Bildschirmbenachrichtigung.") // There is no Translation for display overlay. + "Ändere die Einstellungen des Display-Overlays, Bildschirmtastatur und Bildschirmbenachrichtigung.") // There is no Translation for display overlay. MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pause gameplay when window focus is lost.") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, - "Ändere Einstellungen der Wiedergabelisten.") + "Ändere die Einstellungen der Wiedergabelisten.") MSG_HASH(MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS, "Ändere deine Privatsphäreneinstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, - "Ändere Einstellungen der Errungenschaften.") + "Ändere die Einstellungen der Errungenschaften.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVING_SETTINGS, - "Ändere Einstellungen der Spielstände.") + "Ändere die Einstellungen der Spielstände.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, - "Ändere Einstellungen der Benutzeroberfläche.") + "Ändere die Einstellungen der Benutzeroberfläche.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, "Ändere das Konto, Benutzername, und die Sprache.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, From 6208d037fc4c3752c19895799b9928d8772f60f7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 11:16:53 +0100 Subject: [PATCH 230/427] (MaterialUI) Cleanups --- menu/drivers/materialui.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 583997847d..42150a8ffa 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -333,8 +333,8 @@ static int mui_osk_ptr_at_pos(void *data, int x, int y, unsigned width, unsigned { int ptr_width, ptr_height; unsigned i; - mui_handle_t *mui = (mui_handle_t*)data; + if (!mui) return -1; @@ -364,7 +364,7 @@ static void mui_draw_tab_begin(mui_handle_t *mui, { float scale_factor = menu_display_get_dpi(); - mui->tabs_height = scale_factor / 3; + mui->tabs_height = scale_factor / 3; /* tabs background */ menu_display_draw_quad(0, height - mui->tabs_height, width, @@ -395,16 +395,17 @@ static void mui_draw_tab_end(mui_handle_t *mui, &active_tab_marker_color[0]); } -static float mui_content_height() +static float mui_content_height(void) { + unsigned i; file_list_t *list = menu_entries_get_selection_buf_ptr(0); - float sum = 0; - unsigned i = 0; - for (; i < menu_entries_get_end(); i++) + float sum = 0; + + for (i = 0; i < menu_entries_get_end(); i++) { - mui_node_t *node = (mui_node_t*) - menu_entries_get_userdata_at_offset(list, i); - sum += node->line_height; + mui_node_t *node = (mui_node_t*) + menu_entries_get_userdata_at_offset(list, i); + sum += node->line_height; } return sum; } @@ -524,21 +525,22 @@ end: string_list_free(list); } -static unsigned count_lines(const char *str) +static unsigned mui_count_lines(const char *str) { - unsigned c = 0; + unsigned c = 0; unsigned lines = 1; + for (c = 0; str[c]; c++) lines += (str[c] == '\n'); return lines; } -static void compute_entries_box(mui_handle_t* mui, int width) +static void mui_compute_entries_box(mui_handle_t* mui, int width) { size_t usable_width = width - (mui->margin * 2); - file_list_t *list = menu_entries_get_selection_buf_ptr(0); - float sum = 0; - unsigned i = 0; + file_list_t *list = menu_entries_get_selection_buf_ptr(0); + float sum = 0; + unsigned i = 0; for (; i < menu_entries_get_end(); i++) { @@ -553,7 +555,7 @@ static void compute_entries_box(mui_handle_t* mui, int width) if (menu_entry_get_sublabel(i, sublabel_str, sizeof(sublabel_str))) { word_wrap(sublabel_str, sublabel_str, (int)(usable_width / mui->glyph_width2)); - lines = count_lines(sublabel_str); + lines = mui_count_lines(sublabel_str); } scale_factor = menu_display_get_dpi(); @@ -578,7 +580,7 @@ static void mui_render(void *data) video_driver_get_size(&width, &height); - compute_entries_box(mui, width); + mui_compute_entries_box(mui, width); menu_animation_ctl(MENU_ANIMATION_CTL_DELTA_TIME, &delta_time); From b93046f8671c648972531ccf0016bbba140b630c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 11:20:02 +0100 Subject: [PATCH 231/427] Cleanup mui_draw_scrollbar --- menu/drivers/materialui.c | 54 +++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 42150a8ffa..cc0a7897c9 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -329,10 +329,11 @@ static void mui_render_keyboard(mui_handle_t *mui, } /* Returns the OSK key at a given position */ -static int mui_osk_ptr_at_pos(void *data, int x, int y, unsigned width, unsigned height) +static int mui_osk_ptr_at_pos(void *data, int x, int y, + unsigned width, unsigned height) { - int ptr_width, ptr_height; unsigned i; + int ptr_width, ptr_height; mui_handle_t *mui = (mui_handle_t*)data; if (!mui) @@ -413,38 +414,31 @@ static float mui_content_height(void) static void mui_draw_scrollbar(mui_handle_t *mui, unsigned width, unsigned height, float *coord_color) { - unsigned header_height; - float content_height, total_height, - scrollbar_height, scrollbar_margin, y; - - if (!mui) - return; - - header_height = menu_display_get_header_height(); - - content_height = mui_content_height(); - total_height = height - header_height - mui->tabs_height; - scrollbar_margin = mui->scrollbar_width; - scrollbar_height = total_height / (content_height / total_height); - y = total_height * mui->scroll_y / content_height; + unsigned header_height = menu_display_get_header_height(); + float content_height = mui_content_height(); + float total_height = height - header_height - mui->tabs_height; + float scrollbar_margin = mui->scrollbar_width; + float scrollbar_height = total_height / (content_height / total_height); + float y = total_height * mui->scroll_y / content_height; /* apply a margin on the top and bottom of the scrollbar for aestetic */ - scrollbar_height -= scrollbar_margin * 2; - y += scrollbar_margin; + scrollbar_height -= scrollbar_margin * 2; + y += scrollbar_margin; - if (content_height >= total_height) - { - /* if the scrollbar is extremely short, display it as a square */ - if (scrollbar_height <= mui->scrollbar_width) - scrollbar_height = mui->scrollbar_width; + if (content_height < total_height) + return; - menu_display_draw_quad( width - mui->scrollbar_width - scrollbar_margin, - header_height + y, - mui->scrollbar_width, - scrollbar_height, - width, height, - coord_color); - } + /* if the scrollbar is extremely short, display it as a square */ + if (scrollbar_height <= mui->scrollbar_width) + scrollbar_height = mui->scrollbar_width; + + menu_display_draw_quad( + width - mui->scrollbar_width - scrollbar_margin, + header_height + y, + mui->scrollbar_width, + scrollbar_height, + width, height, + coord_color); } static void mui_get_message(void *data, const char *message) From 9d1de5c9746c2ef08422cc72a98ca850a8125243 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 14:31:57 +0100 Subject: [PATCH 232/427] Rewrite video_context_driver_set_resize --- gfx/drivers/d3d.cpp | 2 +- gfx/drivers/gl.c | 2 +- gfx/drivers/vulkan.c | 2 +- gfx/drivers_context/cgl_ctx.c | 10 +--------- gfx/drivers_context/cocoa_gl_ctx.m | 10 +--------- gfx/drivers_context/drm_ctx.c | 12 +----------- gfx/drivers_context/emscriptenegl_ctx.c | 11 +---------- gfx/drivers_context/gfx_null_ctx.c | 10 +--------- gfx/drivers_context/mali_fbdev_ctx.c | 11 +---------- gfx/drivers_context/opendingux_fbdev_ctx.c | 11 +---------- gfx/drivers_context/osmesa_ctx.c | 10 +--------- gfx/drivers_context/ps3_ctx.c | 8 +------- gfx/drivers_context/qnx_ctx.c | 11 +---------- gfx/drivers_context/sdl_gl_ctx.c | 10 +--------- gfx/drivers_context/vc_egl_ctx.c | 10 +--------- gfx/drivers_context/vivante_fbdev_ctx.c | 11 +---------- gfx/drivers_context/xegl_ctx.c | 11 +---------- gfx/video_context_driver.c | 10 ---------- gfx/video_context_driver.h | 6 ++++-- 19 files changed, 21 insertions(+), 147 deletions(-) diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 43f1f429b8..1ada4f5dd4 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -881,7 +881,7 @@ static bool d3d_alive(void *data) mode.width = temp_width; mode.height = temp_height; - video_context_driver_set_resize(&mode); + video_context_driver_set_resize(mode); d3d_restore(d3d); } diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 7cab60b1e3..55a89ff0a8 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1143,7 +1143,7 @@ static bool gl_frame(void *data, const void *frame, mode.width = width; mode.height = height; - video_context_driver_set_resize(&mode); + video_context_driver_set_resize(mode); #ifdef HAVE_FBO if (gl->fbo_inited) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index dcdd4429fa..5be806a7c9 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1921,7 +1921,7 @@ static bool vulkan_frame(void *data, const void *frame, gfx_ctx_mode_t mode; mode.width = width; mode.height = height; - video_context_driver_set_resize(&mode); + video_context_driver_set_resize(mode); vk->should_resize = false; } diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index a7bc1bc2a8..68229bc89a 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -100,14 +100,6 @@ static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t *video_info) CGLFlushDrawable(cgl->glCtx); } -static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool gfx_ctx_cgl_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -344,7 +336,7 @@ const gfx_ctx_driver_t gfx_ctx_cgl = { NULL, NULL, /* update_title */ gfx_ctx_cgl_check_window, - gfx_ctx_cgl_set_resize, + NULL, /* set_resize */ gfx_ctx_cgl_has_focus, gfx_ctx_cgl_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index aa91c64738..e3a49f8ab3 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -574,14 +574,6 @@ static void cocoagl_gfx_ctx_check_window(void *data, bool *quit, } } -static bool cocoagl_gfx_ctx_set_resize(void *data, unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static void cocoagl_gfx_ctx_input_driver(void *data, const char *name, const input_driver_t **input, void **input_data) @@ -631,7 +623,7 @@ const gfx_ctx_driver_t gfx_ctx_cocoagl = { NULL, /* update_title */ #endif cocoagl_gfx_ctx_check_window, - cocoagl_gfx_ctx_set_resize, + NULL, /* set_resize */ cocoagl_gfx_ctx_has_focus, cocoagl_gfx_ctx_suppress_screensaver, #if defined(HAVE_COCOATOUCH) diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index f0bb839ab8..4c68edc575 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -258,16 +258,6 @@ static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t *video_info) gfx_ctx_drm_wait_flip(true); } -static bool gfx_ctx_drm_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - return false; -} - static void gfx_ctx_drm_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -869,7 +859,7 @@ const gfx_ctx_driver_t gfx_ctx_drm = { NULL, NULL, /* update_window_title */ gfx_ctx_drm_check_window, - gfx_ctx_drm_set_resize, + NULL, /* set_resize */ gfx_ctx_drm_has_focus, gfx_ctx_drm_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 5266cf4493..cb8e45e93d 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -80,15 +80,6 @@ static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t *vide /* no-op in emscripten, no way to force swap/wait for VSync in browsers */ } -static bool gfx_ctx_emscripten_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static void gfx_ctx_emscripten_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -318,7 +309,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { gfx_ctx_emscripten_translate_aspect, NULL, /* update_title */ gfx_ctx_emscripten_check_window, - gfx_ctx_emscripten_set_resize, + NULL, /* set_resize */ gfx_ctx_emscripten_has_focus, gfx_ctx_emscripten_suppress_screensaver, gfx_ctx_emscripten_has_windowed, diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 448289f1ef..18c81a60df 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -39,14 +39,6 @@ static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t *video_info (void)data; } -static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) { (void)data; @@ -150,7 +142,7 @@ const gfx_ctx_driver_t gfx_ctx_null = { NULL, NULL, /* update_title */ gfx_ctx_null_check_window, - gfx_ctx_null_set_resize, + NULL, /* set_resize */ gfx_ctx_null_has_focus, gfx_ctx_null_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 842f970fa7..cb1561ee9d 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -147,15 +147,6 @@ static void gfx_ctx_mali_fbdev_check_window(void *data, bool *quit, *quit = (bool)frontend_driver_get_signal_handler_state(); } -static bool gfx_ctx_mali_fbdev_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -300,7 +291,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { NULL, NULL, /* update_title */ gfx_ctx_mali_fbdev_check_window, - gfx_ctx_mali_fbdev_set_resize, + NULL, /* set_resize */ gfx_ctx_mali_fbdev_has_focus, gfx_ctx_mali_fbdev_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index f6672ef937..411221e5b4 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -131,15 +131,6 @@ static void gfx_ctx_opendingux_check_window(void *data, bool *quit, *quit = (bool)frontend_driver_get_signal_handler_state(); } -static bool gfx_ctx_opendingux_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool gfx_ctx_opendingux_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -274,7 +265,7 @@ const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { NULL, NULL, /* update_title */ gfx_ctx_opendingux_check_window, - gfx_ctx_opendingux_set_resize, + NULL, /* set_resize */ gfx_ctx_opendingux_has_focus, gfx_ctx_opendingux_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index 65fd769055..da8009229e 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -317,14 +317,6 @@ static void osmesa_ctx_check_window(void *data, bool *quit, *quit = false; } -static bool osmesa_ctx_set_resize(void *data, unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool osmesa_ctx_has_focus(void *data) { (void)data; @@ -402,7 +394,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = NULL, /* translate_aspect */ NULL, /* update_title */ osmesa_ctx_check_window, - osmesa_ctx_set_resize, + NULL, /* set_resize */ osmesa_ctx_has_focus, osmesa_ctx_suppress_screensaver, osmesa_ctx_has_windowed, diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index e427fcb2ea..7f35f60daa 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -186,12 +186,6 @@ static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) #endif } -static bool gfx_ctx_ps3_set_resize(void *data, - unsigned width, unsigned height) -{ - return false; -} - static void gfx_ctx_ps3_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -413,7 +407,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { NULL, NULL, /* update_title */ gfx_ctx_ps3_check_window, - gfx_ctx_ps3_set_resize, + NULL, /* set_resize */ gfx_ctx_ps3_has_focus, gfx_ctx_ps3_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 4126740754..252f89808d 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -307,15 +307,6 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit, *quit = true; } -static bool gfx_ctx_qnx_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool gfx_ctx_qnx_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -473,7 +464,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { NULL, NULL, /* update_title */ gfx_ctx_qnx_check_window, - gfx_ctx_qnx_set_resize, + NULL, /* set_resize */ gfx_ctx_qnx_has_focus, gfx_ctx_qnx_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index ad6dbff509..8b1847e44c 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -339,14 +339,6 @@ static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned * } } -static bool sdl_ctx_set_resize(void *data, unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool sdl_ctx_has_focus(void *data) { unsigned flags; @@ -432,7 +424,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = NULL, /* translate_aspect */ sdl_ctx_update_title, sdl_ctx_check_window, - sdl_ctx_set_resize, + NULL, /* set_resize */ sdl_ctx_has_focus, sdl_ctx_suppress_screensaver, sdl_ctx_has_windowed, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 007e26b1c8..c2b98d5ebd 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -96,14 +96,6 @@ static void gfx_ctx_vc_check_window(void *data, bool *quit, *quit = (bool)frontend_driver_get_signal_handler_state(); } -static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static void gfx_ctx_vc_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -641,7 +633,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { gfx_ctx_vc_translate_aspect, NULL, /* update_title */ gfx_ctx_vc_check_window, - gfx_ctx_vc_set_resize, + NULL, /* set_resize */ gfx_ctx_vc_has_focus, gfx_ctx_vc_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 7c6f4662c9..c59e5dd577 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -135,15 +135,6 @@ static void gfx_ctx_vivante_check_window(void *data, bool *quit, *quit = (bool)frontend_driver_get_signal_handler_state(); } -static bool gfx_ctx_vivante_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static bool gfx_ctx_vivante_set_video_mode(void *data, video_frame_info_t *video_info, unsigned width, unsigned height, @@ -279,7 +270,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { NULL, NULL, /* update_title */ gfx_ctx_vivante_check_window, - gfx_ctx_vivante_set_resize, + NULL, /* set_resize */ gfx_ctx_vivante_has_focus, gfx_ctx_vivante_suppress_screensaver, NULL, /* has_windowed */ diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index c375a68615..661d5239c0 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -91,15 +91,6 @@ EGL_BLUE_SIZE, 1, \ EGL_ALPHA_SIZE, 0, \ EGL_DEPTH_SIZE, 0 -static bool gfx_ctx_xegl_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - return false; -} - static void *gfx_ctx_xegl_init(video_frame_info_t video_info, void *video_driver) { #ifdef HAVE_EGL @@ -593,7 +584,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = NULL, x11_update_title, x11_check_window, - gfx_ctx_xegl_set_resize, + NULL, /* set_resize */ x11_has_focus, gfx_ctx_xegl_suppress_screensaver, gfx_ctx_xegl_has_windowed, diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index e66066cfe3..a8cc52e78d 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -462,16 +462,6 @@ bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) return true; } -bool video_context_driver_set_resize(gfx_ctx_mode_t *mode_info) -{ - if (!current_video_context) - return false; - if (!current_video_context->set_resize( - video_context_data, mode_info->width, mode_info->height)) - return false; - return true; -} - bool video_context_driver_get_video_size(gfx_ctx_mode_t *mode_info) { if (!current_video_context || !current_video_context->get_video_size) diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 20f52a1cc7..52baf831d9 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -302,6 +302,10 @@ void video_context_driver_destroy(void); #define video_context_driver_focus() ((video_context_data && current_video_context->has_focus && current_video_context->has_focus(video_context_data)) ? true : false) +#define video_context_driver_set_resize(mode_info) \ + if (current_video_context && current_video_context->set_resize) \ + current_video_context->set_resize(video_context_data, mode_info.width, mode_info.height) + bool video_context_driver_get_video_output_size(gfx_ctx_size_t *size_data); bool video_context_driver_swap_interval(unsigned *interval); @@ -314,8 +318,6 @@ bool video_context_driver_get_ident(gfx_ctx_ident_t *ident); bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info); -bool video_context_driver_set_resize(gfx_ctx_mode_t *mode_info); - bool video_context_driver_get_video_size(gfx_ctx_mode_t *mode_info); bool video_context_driver_get_context_data(void *data); From 3dd6c91493aae16d16fea312e127703777ed011e Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 08:56:56 -0500 Subject: [PATCH 233/427] start populating the list --- menu/cbs/menu_cbs_ok.c | 63 +++++++++++++---------------- menu/menu_displaylist.c | 16 ++++++++ network/netplay/netplay_discovery.h | 19 +++++++++ 3 files changed, 62 insertions(+), 36 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 7026b04a64..5de72e1ca1 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3262,19 +3262,7 @@ static int action_ok_push_content_list(const char *path, entry_idx, ACTION_OK_DL_CONTENT_LIST); } -/* data is ordered like this on the server, I left it in this ordered - for reference */ -struct room -{ - char nickname [PATH_MAX_LENGTH]; - char address [PATH_MAX_LENGTH]; - int port; - char corename [PATH_MAX_LENGTH]; - char coreversion [PATH_MAX_LENGTH]; - char gamename [PATH_MAX_LENGTH]; - int gamecrc; - int timestamp; -}; + static int action_ok_push_scan_file(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) @@ -3303,17 +3291,20 @@ finish: if (!err && !strstr(buf, file_path_str(FILE_PATH_NETPLAY_ROOM_LIST_URL))) { if (string_is_empty(buf)) + { + netplay_room_count = 0; RARCH_LOG("Room list empty\n"); + } else { - int rooms, i, j = 0; + int i, j = 0; char tmp[PATH_MAX_LENGTH]; - struct string_list *room_data = NULL; + static struct string_list *room_data = NULL; + room_data = string_split(buf, "\n"); - rooms = room_data->size / 8; - struct room *room_list = NULL; - room_list = (struct room*)malloc(sizeof(struct room) * rooms); + netplay_room_count = room_data->size / 8; + netplay_room_list = (struct netplay_room*)malloc(sizeof(struct netplay_room) * netplay_room_count); /*for (int i = 0; i < room_data->size; i++) { @@ -3323,17 +3314,17 @@ finish: }*/ - RARCH_LOG ("Found %d rooms\n", rooms); - for (i = 0; i < rooms; i++) + RARCH_LOG ("Found %d rooms\n", netplay_room_count); + for (i = 0; i < netplay_room_count; i++) { - strlcpy(room_list[i].nickname, room_data->elems[j + 0].data, sizeof(room_list[i].nickname)); - strlcpy(room_list[i].address, room_data->elems[j + 1].data, sizeof(room_list[i].address)); - strlcpy(room_list[i].corename, room_data->elems[j + 3].data, sizeof(room_list[i].corename)); - strlcpy(room_list[i].coreversion, room_data->elems[j + 4].data, sizeof(room_list[i].coreversion)); - strlcpy(room_list[i].gamename, room_data->elems[j + 5].data, sizeof(room_list[i].coreversion)); - room_list[i].port = atoi(room_data->elems[j + 2].data); - room_list[i].gamecrc = atoi(room_data->elems[j + 6].data); - room_list[i].timestamp = atoi(room_data->elems[j + 7].data); + strlcpy(netplay_room_list[i].nickname, room_data->elems[j + 0].data, sizeof(netplay_room_list[i].nickname)); + strlcpy(netplay_room_list[i].address, room_data->elems[j + 1].data, sizeof(netplay_room_list[i].address)); + strlcpy(netplay_room_list[i].corename, room_data->elems[j + 3].data, sizeof(netplay_room_list[i].corename)); + strlcpy(netplay_room_list[i].coreversion, room_data->elems[j + 4].data, sizeof(netplay_room_list[i].coreversion)); + strlcpy(netplay_room_list[i].gamename, room_data->elems[j + 5].data, sizeof(netplay_room_list[i].coreversion)); + netplay_room_list[i].port = atoi(room_data->elems[j + 2].data); + netplay_room_list[i].gamecrc = atoi(room_data->elems[j + 6].data); + netplay_room_list[i].timestamp = atoi(room_data->elems[j + 7].data); RARCH_LOG("Room Data: \n" "Nickname: %s\n" @@ -3344,14 +3335,14 @@ finish: "Game: %s\n" "Game CRC: %d\n" "Timestamp: %d\n", - room_list[i].nickname, - room_list[i].address, - room_list[i].port, - room_list[i].corename, - room_list[i].coreversion, - room_list[i].gamename, - room_list[i].gamecrc, - room_list[i].timestamp); + netplay_room_list[i].nickname, + netplay_room_list[i].address, + netplay_room_list[i].port, + netplay_room_list[i].corename, + netplay_room_list[i].coreversion, + netplay_room_list[i].gamename, + netplay_room_list[i].gamecrc, + netplay_room_list[i].timestamp); j+=8; } } diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 9fc439adf2..9e2eb89e59 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2958,6 +2958,22 @@ static int menu_displaylist_parse_netplay_room_list( msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS), MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS, MENU_SETTING_ACTION, 0, 0); + + if (netplay_room_count > 0) + { + unsigned i; + for (i = 0; i < netplay_room_count; i++) + { + char s[PATH_MAX_LENGTH]; + snprintf(s, sizeof(s), "Nickname: %s", netplay_room_list[i].nickname); + const char *label = s; + menu_entries_append_enum(info->list, + label, + msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_WIFI), + MENU_ENUM_LABEL_CONNECT_WIFI, + MENU_WIFI, 0, 0); + } + } #endif return 0; diff --git a/network/netplay/netplay_discovery.h b/network/netplay/netplay_discovery.h index f0b7358c78..9548b88cb9 100644 --- a/network/netplay/netplay_discovery.h +++ b/network/netplay/netplay_discovery.h @@ -18,6 +18,7 @@ #define __RARCH_NETPLAY_DISCOVERY_H #include +#include #define NETPLAY_HOST_STR_LEN 32 @@ -44,6 +45,24 @@ struct netplay_host_list { size_t size; }; +/* data is ordered like this on the server, I left it in this ordered + for reference */ +struct netplay_room +{ + char nickname [PATH_MAX_LENGTH]; + char address [PATH_MAX_LENGTH]; + int port; + char corename [PATH_MAX_LENGTH]; + char coreversion [PATH_MAX_LENGTH]; + char gamename [PATH_MAX_LENGTH]; + int gamecrc; + int timestamp; +}; + +struct netplay_room *netplay_room_list; + +int netplay_room_count; + /** Initialize Netplay discovery */ bool init_netplay_discovery(void); From 702f0cd95de82a7197c4b170967e7aac0895b1c4 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 09:16:37 -0500 Subject: [PATCH 234/427] add entries to the list --- menu/cbs/menu_cbs_ok.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 5de72e1ca1..cff20c87b4 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3300,6 +3300,9 @@ finish: int i, j = 0; char tmp[PATH_MAX_LENGTH]; static struct string_list *room_data = NULL; + file_list_t *file_list = NULL; + file_list = menu_entries_get_selection_buf_ptr(0); + menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, file_list); room_data = string_split(buf, "\n"); @@ -3313,6 +3316,11 @@ finish: RARCH_LOG("tmp %s\n", tmp); }*/ + menu_entries_append_enum(file_list, + "Refresh Room List", + msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS), + MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS, + MENU_SETTING_ACTION, 0, 0); RARCH_LOG ("Found %d rooms\n", netplay_room_count); for (i = 0; i < netplay_room_count; i++) @@ -3344,6 +3352,14 @@ finish: netplay_room_list[i].gamecrc, netplay_room_list[i].timestamp); j+=8; + char s[PATH_MAX_LENGTH]; + snprintf(s, sizeof(s), "Nickname: %s", netplay_room_list[i].nickname); + menu_entries_append_enum(file_list, + s, + msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_WIFI), + MENU_ENUM_LABEL_CONNECT_WIFI, + MENU_WIFI, 0, 0); + } } } From d2e09622c86712ec8ebb78e45255f2f1c390e7cd Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 09:31:01 -0500 Subject: [PATCH 235/427] add own labels --- intl/msg_hash_lbl.h | 2 ++ menu/cbs/menu_cbs_ok.c | 4 ++-- menu/menu_displaylist.c | 4 ++-- msg_hash.h | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index b90ab38ac9..412e0148e3 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -157,6 +157,8 @@ MSG_HASH(MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT, "config_save_on_exit") MSG_HASH(MENU_ENUM_LABEL_CONNECT_WIFI, "connect_wifi") +MSG_HASH(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, + "connect_room") MSG_HASH(MENU_ENUM_LABEL_CONTENT_ACTIONS, "content_actions") MSG_HASH(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index cff20c87b4..7cd975c3e1 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3356,8 +3356,8 @@ finish: snprintf(s, sizeof(s), "Nickname: %s", netplay_room_list[i].nickname); menu_entries_append_enum(file_list, s, - msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_WIFI), - MENU_ENUM_LABEL_CONNECT_WIFI, + msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), + MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, MENU_WIFI, 0, 0); } diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 9e2eb89e59..145c6b9cac 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2969,8 +2969,8 @@ static int menu_displaylist_parse_netplay_room_list( const char *label = s; menu_entries_append_enum(info->list, label, - msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_WIFI), - MENU_ENUM_LABEL_CONNECT_WIFI, + msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), + MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, MENU_WIFI, 0, 0); } } diff --git a/msg_hash.h b/msg_hash.h index 1f1dfcc362..dffb8238ff 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -746,6 +746,7 @@ enum msg_hash_enums MENU_LABEL(NETPLAY_LAN_SCAN_SETTINGS), MENU_ENUM_LABEL_CONNECT_WIFI, + MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, MENU_ENUM_LABEL_CONNECT_NETPLAY_LAN, MENU_LABEL(MENU_ENUM_LINEAR_FILTER), From 4a8cb5687a73dd3f544f7095634e2f9ea3f5f344 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 15:55:42 +0100 Subject: [PATCH 236/427] (ctr_font.c) use #if 0 blocks --- gfx/drivers_font/ctr_font.c | 78 ++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 2409aec4e1..58a4e9878a 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -33,7 +33,10 @@ /* FIXME: this is just a workaround to avoid * using ctrGuCopyImage, since it seems to cause * a freeze/blackscreen when used here. */ -//#define FONT_TEXTURE_IN_VRAM + +#if 0 +#define FONT_TEXTURE_IN_VRAM +#endif typedef struct { @@ -227,7 +230,8 @@ static void ctr_font_render_line( return; ctrGuSetVertexShaderFloatUniform(0, (float*)&font->scale_vector, 1); - GSPGPU_FlushDataCache(ctr->vertex_cache.current, (v - ctr->vertex_cache.current) * sizeof(ctr_vertex_t)); + GSPGPU_FlushDataCache(ctr->vertex_cache.current, + (v - ctr->vertex_cache.current) * sizeof(ctr_vertex_t)); ctrGuSetAttributeBuffers(2, VIRT_TO_PHYS(ctr->vertex_cache.current), CTRGU_ATTRIBFMT(GPU_SHORT, 4) << 0 | @@ -241,18 +245,25 @@ static void ctr_font_render_line( GPU_TEVOPERANDS(GPU_TEVOP_RGB_SRC_R, GPU_TEVOP_RGB_SRC_ALPHA, 0), GPU_MODULATE, GPU_MODULATE, color); -// printf("%s\n", msg); -// DEBUG_VAR(color); -// GPU_SetTexEnv(0, GPU_TEXTURE0, GPU_TEXTURE0, 0, GPU_TEVOPERANDS(GPU_TEVOP_RGB_SRC_R, 0, 0), GPU_REPLACE, GPU_REPLACE, 0); - ctrGuSetTexture(GPU_TEXUNIT0, VIRT_TO_PHYS(font->texture.data), font->texture.width, font->texture.height, - GPU_TEXTURE_MAG_FILTER(GPU_NEAREST) | GPU_TEXTURE_MIN_FILTER(GPU_NEAREST) | - GPU_TEXTURE_WRAP_S(GPU_CLAMP_TO_EDGE) | GPU_TEXTURE_WRAP_T(GPU_CLAMP_TO_EDGE), - GPU_L8); + +#if 0 + printf("%s\n", msg); + DEBUG_VAR(color); + GPU_SetTexEnv(0, GPU_TEXTURE0, GPU_TEXTURE0, 0, + GPU_TEVOPERANDS(GPU_TEVOP_RGB_SRC_R, 0, 0), GPU_REPLACE, GPU_REPLACE, 0); +#endif + + ctrGuSetTexture(GPU_TEXUNIT0, VIRT_TO_PHYS(font->texture.data), + font->texture.width, font->texture.height, + GPU_TEXTURE_MAG_FILTER(GPU_NEAREST) | GPU_TEXTURE_MIN_FILTER(GPU_NEAREST) | + GPU_TEXTURE_WRAP_S(GPU_CLAMP_TO_EDGE) | GPU_TEXTURE_WRAP_T(GPU_CLAMP_TO_EDGE), + GPU_L8); GPU_SetViewport(NULL, - VIRT_TO_PHYS(ctr->drawbuffers.top.left), - 0, 0, CTR_TOP_FRAMEBUFFER_HEIGHT, - ctr->video_mode == CTR_VIDEO_MODE_800x240 ? CTR_TOP_FRAMEBUFFER_WIDTH * 2 : CTR_TOP_FRAMEBUFFER_WIDTH); + VIRT_TO_PHYS(ctr->drawbuffers.top.left), + 0, 0, CTR_TOP_FRAMEBUFFER_HEIGHT, + ctr->video_mode == CTR_VIDEO_MODE_800x240 + ? CTR_TOP_FRAMEBUFFER_WIDTH * 2 : CTR_TOP_FRAMEBUFFER_WIDTH); GPU_DrawArray(GPU_GEOMETRY_PRIM, 0, v - ctr->vertex_cache.current); @@ -265,29 +276,32 @@ static void ctr_font_render_line( GPU_DrawArray(GPU_GEOMETRY_PRIM, 0, v - ctr->vertex_cache.current); } - - - -// v = font->vertices; -// v->x0 = 0; -// v->y0 = 0; -// v->u0 = 0; -// v->v0 = 0; -// v->x1 = font->texture.width; -// v->y1 = font->texture.height; -// v->u1 = font->texture.width; -// v->v1 = font->texture.height; -// GPU_DrawArray(GPU_GEOMETRY_PRIM, 0, 1); +#if 0 + v = font->vertices; + v->x0 = 0; + v->y0 = 0; + v->u0 = 0; + v->v0 = 0; + v->x1 = font->texture.width; + v->y1 = font->texture.height; + v->u1 = font->texture.width; + v->v1 = font->texture.height; + GPU_DrawArray(GPU_GEOMETRY_PRIM, 0, 1); +#endif GPU_SetTexEnv(0, GPU_TEXTURE0, GPU_TEXTURE0, 0, 0, GPU_REPLACE, GPU_REPLACE, 0); - // DEBUG_VAR(v - font->vertices); - // v = font->vertices; - // printf("OSDMSG: %s\n", msg); - // printf("vertex : (%i,%i,%i,%i) - (%i,%i,%i,%i)\n", - // v->x0, v->y0, v->x1, v->y1, - // v->u0, v->v0, v->u1, v->v1); -// printf("%s\n", msg); +#if 0 + DEBUG_VAR(v - font->vertices); + v = font->vertices; + printf("OSDMSG: %s\n", msg); + printf("vertex : (%i,%i,%i,%i) - (%i,%i,%i,%i)\n", + v->x0, v->y0, v->x1, v->y1, + v->u0, v->v0, v->u1, v->v1); + + printf("%s\n", msg); +#endif + ctr->vertex_cache.current = v; } From db9f380fe11ae3e280a00e874cd074e0385ff04b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 15:59:51 +0100 Subject: [PATCH 237/427] Remove diff2.diff --- diff2.diff | 2364 ---------------------------------------------------- 1 file changed, 2364 deletions(-) delete mode 100644 diff2.diff diff --git a/diff2.diff b/diff2.diff deleted file mode 100644 index 14d68a640b..0000000000 --- a/diff2.diff +++ /dev/null @@ -1,2364 +0,0 @@ -diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c -index fb5e5d25b..a79c6037f 100644 ---- a/gfx/common/x11_common.c -+++ b/gfx/common/x11_common.c -@@ -323,7 +323,7 @@ void x11_suspend_screensaver(Window wnd, bool enable) - x11_suspend_screensaver_xdg_screensaver(wnd, enable); - } - --static bool get_video_mode(video_frame_info_t video_info, -+static bool get_video_mode(video_frame_info_t *video_info, - Display *dpy, unsigned width, unsigned height, - XF86VidModeModeInfo *mode, XF86VidModeModeInfo *desktop_mode) - { -@@ -345,7 +345,7 @@ static bool get_video_mode(video_frame_info_t video_info, - - /* If we use black frame insertion, we fake a 60 Hz monitor - * for 120 Hz one, etc, so try to match that. */ -- refresh_mod = video_info.black_frame_insertion ? 0.5f : 1.0f; -+ refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; - - for (i = 0; i < num_modes; i++) - { -@@ -361,7 +361,7 @@ static bool get_video_mode(video_frame_info_t video_info, - continue; - - refresh = refresh_mod * m->dotclock * 1000.0f / (m->htotal * m->vtotal); -- diff = fabsf(refresh - video_info.refresh_rate); -+ diff = fabsf(refresh - video_info->refresh_rate); - - if (!ret || diff < minimum_fps_diff) - { -@@ -375,7 +375,7 @@ static bool get_video_mode(video_frame_info_t video_info, - return ret; - } - --bool x11_enter_fullscreen(video_frame_info_t video_info, -+bool x11_enter_fullscreen(video_frame_info_t *video_info, - Display *dpy, unsigned width, - unsigned height, XF86VidModeModeInfo *desktop_mode) - { -@@ -715,18 +715,10 @@ bool x11_connect(void) - return true; - } - --void x11_update_window_title(void *data, video_frame_info_t video_info) -+void x11_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- if (video_monitor_get_fps(video_info, -- buf, sizeof(buf), buf_fps, sizeof(buf_fps))) -- XStoreName(g_x11_dpy, g_x11_win, buf); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); -+ if (video_info->monitor_fps_enable) -+ XStoreName(g_x11_dpy, g_x11_win, video_info->window_text); - } - - bool x11_input_ctx_new(bool true_full) -diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h -index b08db07e0..c4ffec01d 100644 ---- a/gfx/common/x11_common.h -+++ b/gfx/common/x11_common.h -@@ -45,7 +45,7 @@ void x11_save_last_used_monitor(Window win); - void x11_show_mouse(Display *dpy, Window win, bool state); - void x11_windowed_fullscreen(Display *dpy, Window win); - void x11_suspend_screensaver(Window win, bool enable); --bool x11_enter_fullscreen(video_frame_info_t video_info, -+bool x11_enter_fullscreen(video_frame_info_t *video_info, - Display *dpy, unsigned width, - unsigned height, XF86VidModeModeInfo *desktop_mode); - -@@ -84,7 +84,7 @@ bool x11_alive(void *data); - - bool x11_connect(void); - --void x11_update_window_title(void *data, video_frame_info_t video_info); -+void x11_update_title(void *data, video_frame_info_t *video_info); - - bool x11_input_ctx_new(bool true_full); - -diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c -index c56ca64b5..b55eb5bd4 100644 ---- a/gfx/drivers/caca_gfx.c -+++ b/gfx/drivers/caca_gfx.c -@@ -94,7 +94,7 @@ static void *caca_gfx_init(const video_info_t *video, - - static bool caca_gfx_frame(void *data, const void *frame, - unsigned frame_width, unsigned frame_height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - size_t len = 0; - void *buffer = NULL; -diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c -index 44f36f98f..67afa4e36 100644 ---- a/gfx/drivers/ctr_gfx.c -+++ b/gfx/drivers/ctr_gfx.c -@@ -446,7 +446,7 @@ static void* ctr_init(const video_info_t* video, - static bool ctr_frame(void* data, const void* frame, - unsigned width, unsigned height, - uint64_t frame_count, -- unsigned pitch, const char* msg, video_frame_info_t info) -+ unsigned pitch, const char* msg, video_frame_info_t *video_info) - { - uint32_t diff; - static uint64_t currentTick,lastTick; -diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp -index 46e706e67..abf51ba80 100644 ---- a/gfx/drivers/d3d.cpp -+++ b/gfx/drivers/d3d.cpp -@@ -1368,7 +1368,7 @@ static void d3d_get_overlay_interface(void *data, - static bool d3d_frame(void *data, const void *frame, - unsigned frame_width, unsigned frame_height, - uint64_t frame_count, unsigned pitch, -- const char *msg, video_frame_info_t video_info) -+ const char *msg, video_frame_info_t *video_info) - { - unsigned width, height; - static struct retro_perf_counter d3d_frame = {0}; -@@ -1412,18 +1412,18 @@ static bool d3d_frame(void *data, const void *frame, - /* render_chain() only clears out viewport, - * clear out everything. */ - D3DVIEWPORT screen_vp; -- screen_vp.X = 0; -- screen_vp.Y = 0; -- screen_vp.MinZ = 0; -- screen_vp.MaxZ = 1; -- screen_vp.Width = width; -+ screen_vp.X = 0; -+ screen_vp.Y = 0; -+ screen_vp.MinZ = 0; -+ screen_vp.MaxZ = 1; -+ screen_vp.Width = width; - screen_vp.Height = height; - d3d_set_viewports(d3d->dev, &screen_vp); - d3d_clear(d3d->dev, 0, 0, D3DCLEAR_TARGET, 0, 1, 0); - - /* Insert black frame first, so we - * can screenshot, etc. */ -- if (video_info.black_frame_insertion) -+ if (video_info->black_frame_insertion) - { - if (!d3d_swap(d3d, d3d->dev) || d3d->needs_restore) - return true; -diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c -index 873eced47..1c27cd26f 100644 ---- a/gfx/drivers/dispmanx_gfx.c -+++ b/gfx/drivers/dispmanx_gfx.c -@@ -430,7 +430,7 @@ static void *dispmanx_gfx_init(const video_info_t *video, - - static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - struct dispmanx_video *_dispvars = data; - float aspect = video_driver_get_aspect_ratio(); -@@ -438,7 +438,9 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, - if (!frame) - return true; - -- if (width != _dispvars->core_width || height != _dispvars->core_height || _dispvars->aspect_ratio != aspect) -+ if ( (width != _dispvars->core_width) || -+ (height != _dispvars->core_height) || -+ (_dispvars->aspect_ratio != aspect)) - { - /* Sanity check. */ - if (width == 0 || height == 0) -@@ -467,18 +469,11 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, - settings->video.max_swapchain_images, - 0, - &_dispvars->main_surface); -- -+ - /* We need to recreate the menu surface too, if it exists already, so we - * free it and let dispmanx_set_texture_frame() recreate it as it detects it's NULL.*/ -- if (_dispvars->menu_active && _dispvars->menu_surface) { -+ if (_dispvars->menu_active && _dispvars->menu_surface) - dispmanx_surface_free(_dispvars, &_dispvars->menu_surface); -- } -- } -- -- if (video_info.fps_show) -- { -- char buf[128]; -- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); - } - - /* Update main surface: locate free page, blit and flip. */ -diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c -index 9e2146313..62c22f8b5 100644 ---- a/gfx/drivers/drm_gfx.c -+++ b/gfx/drivers/drm_gfx.c -@@ -744,11 +744,12 @@ static void *drm_gfx_init(const video_info_t *video, - - static bool drm_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - struct drm_video *_drmvars = data; - -- if (width != _drmvars->core_width || height != _drmvars->core_height) -+ if ( ( width != _drmvars->core_width) || -+ (height != _drmvars->core_height)) - { - /* Sanity check. */ - if (width == 0 || height == 0) -@@ -778,14 +779,6 @@ static bool drm_gfx_frame(void *data, const void *frame, unsigned width, - drm_plane_setup(_drmvars->main_surface); - } - -- if (_drmvars->menu_active) -- { -- char buf[128]; -- buf[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); -- } -- - /* Update main surface: locate free page, blit and flip. */ - drm_surface_update(_drmvars, frame, _drmvars->main_surface); - return true; -diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c -index 68f5132eb..00f0fae39 100644 ---- a/gfx/drivers/exynos_gfx.c -+++ b/gfx/drivers/exynos_gfx.c -@@ -1159,7 +1159,6 @@ static int exynos_render_msg(struct exynos_video *vid, - return exynos_blend_font(pdata); - } - -- - static void *exynos_gfx_init(const video_info_t *video, - const input_driver_t **input, void **input_data) - { -@@ -1273,7 +1272,7 @@ static void exynos_gfx_free(void *data) - - static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - struct exynos_video *vid = data; - struct exynos_page *page = NULL; -@@ -1304,18 +1303,6 @@ static bool exynos_gfx_frame(void *data, const void *frame, unsigned width, - goto fail; - } - -- if (video_info.fps_show) -- { -- char buffer[128]; -- char buffer_fps[128]; -- -- buffer[0] = buffer_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buffer, sizeof(buffer), -- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); -- runloop_msg_queue_push(buffer_fps, 1, 1, false); -- } -- - /* If at this point the dimension parameters are still zero, setup some * - * fake blit parameters so that menu and font rendering work properly. */ - if (vid->width == 0 || vid->height == 0) -diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c -index 05f9e0050..b0aecc292 100644 ---- a/gfx/drivers/gdi_gfx.c -+++ b/gfx/drivers/gdi_gfx.c -@@ -146,7 +146,7 @@ error: - - static bool gdi_gfx_frame(void *data, const void *frame, - unsigned frame_width, unsigned frame_height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - gfx_ctx_mode_t mode; - RECT rect; -diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c -index 5c42dcce3..09c0bd7dc 100644 ---- a/gfx/drivers/gl.c -+++ b/gfx/drivers/gl.c -@@ -299,11 +299,11 @@ static void gl_set_viewport_wrapper(void *data, unsigned viewport_width, - - video_driver_build_info(&video_info); - -- gl_set_viewport(data, video_info, -+ gl_set_viewport(data, &video_info, - viewport_width, viewport_height, force_full, allow_rotate); - } - --void gl_set_viewport(void *data, video_frame_info_t video_info, -+void gl_set_viewport(void *data, video_frame_info_t *video_info, - unsigned viewport_width, - unsigned viewport_height, - bool force_full, bool allow_rotate) -@@ -324,7 +324,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, - - video_context_driver_translate_aspect(&aspect_data); - -- if (video_info.scale_integer && !force_full) -+ if (video_info->scale_integer && !force_full) - { - video_viewport_get_scaled_integer(&gl->vp, - viewport_width, viewport_height, -@@ -337,7 +337,7 @@ void gl_set_viewport(void *data, video_frame_info_t video_info, - float desired_aspect = video_driver_get_aspect_ratio(); - - #if defined(HAVE_MENU) -- if (video_info.aspect_ratio_idx == ASPECT_RATIO_CUSTOM) -+ if (video_info->aspect_ratio_idx == ASPECT_RATIO_CUSTOM) - { - const struct video_viewport *custom = video_viewport_get_custom(); - -@@ -1090,7 +1090,7 @@ static bool gl_frame(void *data, const void *frame, - unsigned frame_width, unsigned frame_height, - uint64_t frame_count, - unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - video_shader_ctx_mvp_t mvp; - video_shader_ctx_coords_t coords; -@@ -1339,7 +1339,7 @@ static bool gl_frame(void *data, const void *frame, - /* Disable BFI during fast forward, slow-motion, - * and pause to prevent flicker. */ - if ( -- video_info.black_frame_insertion -+ video_info->black_frame_insertion - && !input_driver_is_nonblock_state() - && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) - && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) -@@ -1351,7 +1351,7 @@ static bool gl_frame(void *data, const void *frame, - video_context_driver_swap_buffers(video_info); - - #ifdef HAVE_GL_SYNC -- if (video_info.hard_sync && gl->have_sync) -+ if (video_info->hard_sync && gl->have_sync) - { - static struct retro_perf_counter gl_fence = {0}; - -@@ -1361,7 +1361,7 @@ static bool gl_frame(void *data, const void *frame, - gl->fences[gl->fence_count++] = - glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); - -- while (gl->fence_count > video_info.hard_sync_frames) -+ while (gl->fence_count > video_info->hard_sync_frames) - { - glClientWaitSync(gl->fences[0], - GL_SYNC_FLUSH_COMMANDS_BIT, 1000000000); -diff --git a/gfx/drivers/gl_renderchains/render_chain_gl.h b/gfx/drivers/gl_renderchains/render_chain_gl.h -index 24886dec0..c329b83fb 100644 ---- a/gfx/drivers/gl_renderchains/render_chain_gl.h -+++ b/gfx/drivers/gl_renderchains/render_chain_gl.h -@@ -49,14 +49,14 @@ void gl_load_texture_data( - const void *frame, unsigned base_size); - - void gl_renderchain_render(gl_t *gl, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - uint64_t frame_count, - const struct video_tex_info *tex_info, - const struct video_tex_info *feedback_info); - - void gl_renderchain_init(gl_t *gl, unsigned fbo_width, unsigned fbo_height); - --void gl_set_viewport(void *data, video_frame_info_t video_info, -+void gl_set_viewport(void *data, video_frame_info_t *video_info, - unsigned viewport_width, - unsigned viewport_height, bool force_full, bool allow_rotate); - -@@ -70,7 +70,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, - unsigned width, unsigned height, - unsigned vp_width, unsigned vp_height); - --void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info); -+void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info); - - void gl_check_fbo_dimensions(gl_t *gl); - -diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c -index 55d687d81..8cc168118 100644 ---- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c -+++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c -@@ -239,7 +239,7 @@ void gl_check_fbo_dimensions(gl_t *gl) - } - } - void gl_renderchain_render(gl_t *gl, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - uint64_t frame_count, - const struct video_tex_info *tex_info, - const struct video_tex_info *feedback_info) -@@ -667,7 +667,7 @@ void gl_renderchain_recompute_pass_sizes(gl_t *gl, - } - } - --void gl_renderchain_start_render(gl_t *gl, video_frame_info_t video_info) -+void gl_renderchain_start_render(gl_t *gl, video_frame_info_t *video_info) - { - glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); - glBindFramebuffer(RARCH_GL_FRAMEBUFFER, gl->fbo[0]); -diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c -index d2ed4cb64..9b9439cf5 100644 ---- a/gfx/drivers/gx_gfx.c -+++ b/gfx/drivers/gx_gfx.c -@@ -1438,7 +1438,7 @@ static bool gx_frame(void *data, const void *frame, - unsigned width, unsigned height, - uint64_t frame_count, unsigned pitch, - const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - char fps_txt[128]; - char fps_text_buf[128]; -@@ -1538,10 +1538,7 @@ static bool gx_frame(void *data, const void *frame, - - GX_DrawDone(); - -- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), -- fps_text_buf, sizeof(fps_text_buf)); -- -- if (video_info.fps_show) -+ if (video_info->fps_show) - { - char mem1_txt[128]; - char mem2_txt[128]; -diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c -index 2a9adebf5..30708f4df 100644 ---- a/gfx/drivers/nullgfx.c -+++ b/gfx/drivers/nullgfx.c -@@ -32,7 +32,7 @@ static void *null_gfx_init(const video_info_t *video, - - static bool null_gfx_frame(void *data, const void *frame, - unsigned width, unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - (void)data; - (void)frame; -diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c -index af46ff768..1344865ea 100644 ---- a/gfx/drivers/omap_gfx.c -+++ b/gfx/drivers/omap_gfx.c -@@ -985,7 +985,7 @@ fail: - - static bool omap_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - omap_video_t *vid = (omap_video_t*)data; - -diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c -index 47887c0d0..2fbd141fc 100644 ---- a/gfx/drivers/psp1_gfx.c -+++ b/gfx/drivers/psp1_gfx.c -@@ -467,7 +467,7 @@ static void *psp_init(const video_info_t *video, - - static bool psp_frame(void *data, const void *frame, - unsigned width, unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - #ifdef DISPLAY_FPS - uint32_t diff; -@@ -476,8 +476,6 @@ static bool psp_frame(void *data, const void *frame, - static float fps = 0.0; - #endif - static struct retro_perf_counter psp_frame_run = {0}; -- static char fps_txt[128] = {0}; -- static char fps_text_buf[128] = {0}; - psp1_video_t *psp = (psp1_video_t*)data; - - if (!width || !height) -@@ -495,14 +493,10 @@ static bool psp_frame(void *data, const void *frame, - - pspDebugScreenSetXY(0,0); - -- video_monitor_get_fps(video_info, fps_txt, sizeof(fps_txt), -- video_info.fps_show ? fps_text_buf : NULL, -- video_info.fps_show ? sizeof(fps_text_buf) : 0); -- -- if (video_info.fps_show) -+ if (video_info->fps_show) - { -- pspDebugScreenSetXY(68 - strlen(fps_text_buf) - 1,0); -- pspDebugScreenPuts(fps_text_buf); -+ pspDebugScreenSetXY(68 - strlen(video_info->fps_text) - 1,0); -+ pspDebugScreenPuts(video_info->fps_text); - pspDebugScreenSetXY(0,1); - } - -diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c -index 6d216d898..438abdeb4 100644 ---- a/gfx/drivers/sdl2_gfx.c -+++ b/gfx/drivers/sdl2_gfx.c -@@ -498,13 +498,10 @@ static void check_window(sdl2_video_t *vid) - - static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { -- char buf[128]; - sdl2_video_t *vid = (sdl2_video_t*)data; - -- buf[0] = '\0'; -- - if (vid->should_resize) - sdl_refresh_viewport(vid); - -@@ -536,8 +533,8 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, - - SDL_RenderPresent(vid->renderer); - -- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) -- SDL_SetWindowTitle(vid->window, buf); -+ if (video_info->monitor_fps_enable) -+ SDL_SetWindowTitle(vid->window, video_info->window_text); - - return true; - } -diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c -index 45bdf8f1d..787c8d8c5 100644 ---- a/gfx/drivers/sdl_gfx.c -+++ b/gfx/drivers/sdl_gfx.c -@@ -331,17 +331,14 @@ static void sdl_gfx_check_window(sdl_video_t *vid) - - static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { -- char buf[128]; - static struct retro_perf_counter sdl_scale = {0}; - sdl_video_t *vid = (sdl_video_t*)data; - - if (!frame) - return true; - -- buf[0] = '\0'; -- - if (SDL_MUSTLOCK(vid->screen)) - SDL_LockSurface(vid->screen); - -@@ -370,8 +367,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, - if (SDL_MUSTLOCK(vid->screen)) - SDL_UnlockSurface(vid->screen); - -- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) -- SDL_WM_SetCaption(buf, NULL); -+ if (video_info->monitor_fps_enable) -+ SDL_WM_SetCaption(video_info->window_text, NULL); - - SDL_Flip(vid->screen); - -diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c -index da03c2333..c01cb7919 100644 ---- a/gfx/drivers/sunxi_gfx.c -+++ b/gfx/drivers/sunxi_gfx.c -@@ -763,7 +763,7 @@ static void sunxi_setup_scale (void *data, - - static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - struct sunxi_video *_dispvars = (struct sunxi_video*)data; - -@@ -781,11 +781,6 @@ static bool sunxi_gfx_frame(void *data, const void *frame, unsigned width, - - if (_dispvars->menu_active) - { -- char buf[128]; -- -- buf[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0); - ioctl(_dispvars->sunxi_disp->fd_fb, FBIO_WAITFORVSYNC, 0); - return true; - } -diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c -index 91451518d..7791b9b5e 100644 ---- a/gfx/drivers/vg.c -+++ b/gfx/drivers/vg.c -@@ -378,7 +378,7 @@ static void vg_copy_frame(void *data, const void *frame, - static bool vg_frame(void *data, const void *frame, - unsigned frame_width, unsigned frame_height, - uint64_t frame_count, unsigned pitch, const char *msg, -- video_frame_info_t video_info) -+ video_frame_info_t *video_info) - { - unsigned width, height; - vg_t *vg = (vg_t*)data; -diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c -index 6d01afac3..bf784591e 100644 ---- a/gfx/drivers/vita2d_gfx.c -+++ b/gfx/drivers/vita2d_gfx.c -@@ -133,54 +133,55 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita); - - static bool vita2d_gfx_frame(void *data, const void *frame, - unsigned width, unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - void *tex_p; - vita_video_t *vita = (vita_video_t *)data; -- -+ - if (frame) - { -- if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)){ -- unsigned i; -- unsigned int stride; -- -- if ((width != vita->width || height != vita->height) && vita->texture) -- { -- vita2d_free_texture(vita->texture); -- vita->texture = NULL; -- } -- -- if (!vita->texture) -- { -- RARCH_LOG("Creating texture: %ix%i\n", width, height); -- vita->width = width; -- vita->height = height; -- vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); -- vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); -- } -- tex_p = vita2d_texture_get_datap(vita->texture); -- stride = vita2d_texture_get_stride(vita->texture); -- -- if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) -- { -- stride /= 4; -- pitch /= 4; -- uint32_t *tex32 = tex_p; -- const uint32_t *frame32 = frame; -- -- for (i = 0; i < height; i++) -- memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); -- } -- else -- { -- stride /= 2; -- pitch /= 2; -- uint16_t *tex16 = tex_p; -- const uint16_t *frame16 = frame; -- -- for (i = 0; i < height; i++) -- memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); -- } -+ if(!(vita->texture&&vita2d_texture_get_datap(vita->texture)==frame)) -+ { -+ unsigned i; -+ unsigned int stride; -+ -+ if ((width != vita->width || height != vita->height) && vita->texture) -+ { -+ vita2d_free_texture(vita->texture); -+ vita->texture = NULL; -+ } -+ -+ if (!vita->texture) -+ { -+ RARCH_LOG("Creating texture: %ix%i\n", width, height); -+ vita->width = width; -+ vita->height = height; -+ vita->texture = vita2d_create_empty_texture_format(width, height, vita->format); -+ vita2d_texture_set_filters(vita->texture,vita->tex_filter,vita->tex_filter); -+ } -+ tex_p = vita2d_texture_get_datap(vita->texture); -+ stride = vita2d_texture_get_stride(vita->texture); -+ -+ if (vita->format == SCE_GXM_TEXTURE_FORMAT_X8U8U8U8_1RGB) -+ { -+ stride /= 4; -+ pitch /= 4; -+ uint32_t *tex32 = tex_p; -+ const uint32_t *frame32 = frame; -+ -+ for (i = 0; i < height; i++) -+ memcpy_neon(&tex32[i*stride],&frame32[i*pitch],pitch*sizeof(uint32_t)); -+ } -+ else -+ { -+ stride /= 2; -+ pitch /= 2; -+ uint16_t *tex16 = tex_p; -+ const uint16_t *frame16 = frame; -+ -+ for (i = 0; i < height; i++) -+ memcpy_neon(&tex16[i*stride],&frame16[i*pitch],width*sizeof(uint16_t)); -+ } - } - } - -@@ -188,9 +189,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, - vita2d_gfx_update_viewport(vita); - - vita2d_start_drawing(); -- -+ - vita2d_draw_rectangle(0,0,PSP_FB_WIDTH,PSP_FB_HEIGHT,vita2d_get_clear_color()); -- -+ - if (vita->texture) - { - if (vita->fullscreen) -@@ -205,21 +206,9 @@ static bool vita2d_gfx_frame(void *data, const void *frame, - float scalex = vita->vp.width / (float)vita->width; - float scaley = vita->vp.height / (float)vita->height; - vita2d_draw_texture_scale_rotate(vita->texture,vita->vp.x, -- vita->vp.y, scalex, scaley, rad); -+ vita->vp.y, scalex, scaley, rad); - } - } -- -- if (video_info.fps_show) -- { -- char buffer[128]; -- char buffer_fps[128]; -- -- buffer[0] = buffer_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buffer, sizeof(buffer), -- video_info.fps_show ? buffer_fps : NULL, sizeof(buffer_fps)); -- runloop_msg_queue_push(buffer_fps, 1, 1, false); -- } - - #ifdef HAVE_OVERLAY - if (vita->overlay_enable) -@@ -228,43 +217,39 @@ static bool vita2d_gfx_frame(void *data, const void *frame, - - if (vita->menu.active) - { -- menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); -- -- if(vita->menu.texture){ -- if (vita->fullscreen) -- vita2d_draw_texture_scale(vita->menu.texture, -- 0, 0, -- PSP_FB_WIDTH / (float)vita->menu.width, -- PSP_FB_HEIGHT / (float)vita->menu.height); -- else -- { -- if (vita->menu.width > vita->menu.height) -- { -- float scale = PSP_FB_HEIGHT / (float)vita->menu.height; -- float w = vita->menu.width * scale; -- vita2d_draw_texture_scale(vita->menu.texture, -- PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, -- scale, scale); -- } -- else -- { -- float scale = PSP_FB_WIDTH / (float)vita->menu.width; -- float h = vita->menu.height * scale; -- vita2d_draw_texture_scale(vita->menu.texture, -- 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, -- scale, scale); -- } -- } -- } -- -- -- -+ menu_driver_ctl(RARCH_MENU_CTL_FRAME, NULL); -+ -+ if(vita->menu.texture){ -+ if (vita->fullscreen) -+ vita2d_draw_texture_scale(vita->menu.texture, -+ 0, 0, -+ PSP_FB_WIDTH / (float)vita->menu.width, -+ PSP_FB_HEIGHT / (float)vita->menu.height); -+ else -+ { -+ if (vita->menu.width > vita->menu.height) -+ { -+ float scale = PSP_FB_HEIGHT / (float)vita->menu.height; -+ float w = vita->menu.width * scale; -+ vita2d_draw_texture_scale(vita->menu.texture, -+ PSP_FB_WIDTH / 2.0f - w/2.0f, 0.0f, -+ scale, scale); -+ } -+ else -+ { -+ float scale = PSP_FB_WIDTH / (float)vita->menu.width; -+ float h = vita->menu.height * scale; -+ vita2d_draw_texture_scale(vita->menu.texture, -+ 0.0f, PSP_FB_HEIGHT / 2.0f - h/2.0f, -+ scale, scale); -+ } -+ } -+ } - } -- -- -+ - if(!string_is_empty(msg)) -- font_driver_render_msg(NULL, msg, NULL); -- -+ font_driver_render_msg(NULL, msg, NULL); -+ - vita2d_end_drawing(); - vita2d_swap_buffers(); - -diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c -index 4f5cfd04c..a9c2e958a 100644 ---- a/gfx/drivers/vulkan.c -+++ b/gfx/drivers/vulkan.c -@@ -1463,7 +1463,7 @@ static void vulkan_readback(vk_t *vk) - VK_PIPELINE_STAGE_HOST_BIT); - } - --static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) -+static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info) - { - VkCommandBufferBeginInfo begin_info = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; -@@ -1520,7 +1520,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t video_info) - static bool vulkan_frame(void *data, const void *frame, - unsigned frame_width, unsigned frame_height, - uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - struct vk_per_frame *chain; - unsigned width, height; -@@ -1931,7 +1931,7 @@ static bool vulkan_frame(void *data, const void *frame, - /* Disable BFI during fast forward, slow-motion, - * and pause to prevent flicker. */ - if ( -- video_info.black_frame_insertion -+ video_info->black_frame_insertion - && !input_driver_is_nonblock_state() - && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) - && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) -diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c -index 2055b2d7f..928993e1e 100644 ---- a/gfx/drivers/wiiu_gfx.c -+++ b/gfx/drivers/wiiu_gfx.c -@@ -550,7 +550,7 @@ static void wiiu_gfx_free(void* data) - - static bool wiiu_gfx_frame(void* data, const void* frame, - unsigned width, unsigned height, uint64_t frame_count, -- unsigned pitch, const char* msg, video_frame_info_t video_info) -+ unsigned pitch, const char* msg, video_frame_info_t *video_info) - { - (void)msg; - int i; -diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c -index eeb99f5c1..97efef122 100644 ---- a/gfx/drivers/xenon360_gfx.c -+++ b/gfx/drivers/xenon360_gfx.c -@@ -192,7 +192,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * - } - - static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, unsigned height, -- uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t video_info) -+ uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - gl_t *vid = data; - -diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c -index 8bb8ec947..1a5704aee 100644 ---- a/gfx/drivers/xshm_gfx.c -+++ b/gfx/drivers/xshm_gfx.c -@@ -94,7 +94,7 @@ static void *xshm_gfx_init(const video_info_t *video, - - static bool xshm_gfx_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - xshm_t* xshm = (xshm_t*)data; - int y; -diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c -index d8fce331b..782771bda 100644 ---- a/gfx/drivers/xvideo.c -+++ b/gfx/drivers/xvideo.c -@@ -530,8 +530,8 @@ static void *xv_init(const video_info_t *video, - - video_driver_build_info(&video_info); - -- if (video_monitor_get_fps(video_info, buf, sizeof(buf), NULL, 0)) -- XStoreName(g_x11_dpy, g_x11_win, buf); -+ if (video_info.monitor_fps_enable) -+ XStoreName(g_x11_dpy, g_x11_win, video_info.window_text); - - x11_set_window_attr(g_x11_dpy, g_x11_win); - -@@ -784,7 +784,7 @@ static void xv_render_msg(xv_t *xv, const char *msg, - - static bool xv_frame(void *data, const void *frame, unsigned width, - unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - XWindowAttributes target; - xv_t *xv = (xv_t*)data; -@@ -811,7 +811,7 @@ static bool xv_frame(void *data, const void *frame, unsigned width, - true); - XSync(g_x11_dpy, False); - -- x11_update_window_title(NULL, video_info); -+ x11_update_title(NULL, video_info); - - return true; - } -diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c -index ee672c8b9..805849557 100644 ---- a/gfx/drivers_context/android_ctx.c -+++ b/gfx/drivers_context/android_ctx.c -@@ -314,21 +314,12 @@ static bool android_gfx_ctx_set_resize(void *data, - return false; - } - --static void android_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) -+static void android_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool android_gfx_ctx_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -493,7 +484,7 @@ dpi_fallback: - return true; - } - --static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) -+static void android_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) - { - android_ctx_data_t *and = (android_ctx_data_t*)data; - -@@ -618,7 +609,7 @@ const gfx_ctx_driver_t gfx_ctx_android = { - NULL, /* get_video_output_next */ - android_gfx_ctx_get_metrics, - NULL, -- android_gfx_ctx_update_window_title, -+ android_gfx_ctx_update_title, - android_gfx_ctx_check_window, - android_gfx_ctx_set_resize, - android_gfx_ctx_has_focus, -diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c -index b5412a189..6403d6ed3 100644 ---- a/gfx/drivers_context/cgl_ctx.c -+++ b/gfx/drivers_context/cgl_ctx.c -@@ -95,7 +95,7 @@ static void gfx_ctx_cgl_check_window(void *data, bool *quit, - } - } - --static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_cgl_swap_buffers(void *data, video_frame_info_t *video_info) - { - gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)data; - -@@ -110,22 +110,12 @@ static bool gfx_ctx_cgl_set_resize(void *data, unsigned width, unsigned height) - return false; - } - --static void gfx_ctx_cgl_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_cgl_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - -- - static bool gfx_ctx_cgl_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m -index 566869809..487638385 100644 ---- a/gfx/drivers_context/cocoa_gl_ctx.m -+++ b/gfx/drivers_context/cocoa_gl_ctx.m -@@ -330,7 +330,7 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state) - } - - static bool cocoagl_gfx_ctx_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, bool fullscreen) - { - #if defined(HAVE_COCOA) -@@ -416,27 +416,17 @@ static void cocoagl_gfx_ctx_get_video_size(void *data, unsigned* width, unsigned - *height = CGRectGetHeight(size) * screenscale; - } - --static void cocoagl_gfx_ctx_update_window_title(void *data, video_frame_info_t video_info) -+static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_info) - { - #if defined(HAVE_COCOA) - ui_window_cocoa_t view; -- const ui_window_t *window = NULL; --#endif -- static char buf_fps[128] = {0}; -- static char buf[128] = {0}; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- --#if defined(HAVE_COCOA) -- window = ui_companion_driver_get_window_ptr(); -+ const ui_window_t *window = ui_companion_driver_get_window_ptr(); -+ - view.data = (CocoaView*)nsview_get_ptr(); - -- if (window && *buf) -- window->set_title(&view, buf); -+ if (window && video_info->monitor_fps_enable) -+ window->set_title(&view, video_info->window_text); - #endif -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types type, -@@ -537,7 +527,7 @@ static bool cocoagl_gfx_ctx_has_windowed(void *data) - #endif - } - --static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t video_info) -+static void cocoagl_gfx_ctx_swap_buffers(void *data, video_frame_info_t *video_info) - { - if (!(--g_fast_forward_skips < 0)) - return; -diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp -index f5d4233bb..9c6acaaaf 100644 ---- a/gfx/drivers_context/d3d_ctx.cpp -+++ b/gfx/drivers_context/d3d_ctx.cpp -@@ -76,7 +76,7 @@ static bool gfx_ctx_d3d_set_resize(void *data, unsigned new_width, unsigned new_ - return true; - } - --static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t *video_info) - { - d3d_video_t *d3d = (d3d_video_t*)data; - LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; -@@ -84,25 +84,11 @@ static void gfx_ctx_d3d_swap_buffers(void *data, video_frame_info_t video_info) - d3d_swap(d3d, d3dr); - } - --static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buffer_fps[128]; -- const ui_window_t *window = ui_companion_driver_get_window_ptr(); -- -- buf[0] = buffer_fps[0] = '\0'; -- -- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), -- buffer_fps, sizeof(buffer_fps))) -- { --#ifndef _XBOX -- window->set_title(&main_window, buf); --#endif -- } -- -- if (video_info.fps_show) -- { - #ifdef _XBOX -+ if (video_info->fps_show) -+ { - MEMORYSTATUS stat; - char mem[128]; - -@@ -111,10 +97,15 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t video_info) - GlobalMemoryStatus(&stat); - snprintf(mem, sizeof(mem), "|| MEM: %.2f/%.2fMB", - stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f)); -- strlcat(buffer_fps, mem, sizeof(buffer_fps)); --#endif -- runloop_msg_queue_push(buffer_fps, 1, 1, false); -+ strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); - } -+#else -+ const ui_window_t *window = ui_companion_driver_get_window_ptr(); -+ -+ if (window && video_info->monitor_fps_enable) -+ window->set_title(&main_window, video_info->window_text); -+#endif -+ - } - - static void gfx_ctx_d3d_show_mouse(void *data, bool state) -@@ -197,7 +188,7 @@ static void gfx_ctx_d3d_input_driver(void *data, - } - - static bool gfx_ctx_d3d_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c -index b8738d316..2956e4762 100644 ---- a/gfx/drivers_context/drm_ctx.c -+++ b/gfx/drivers_context/drm_ctx.c -@@ -225,7 +225,7 @@ static bool gfx_ctx_drm_queue_flip(void) - return false; - } - --static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t *video_info) - { - gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; - -@@ -253,7 +253,7 @@ static void gfx_ctx_drm_swap_buffers(void *data, video_frame_info_t video_info) - waiting_for_flip = gfx_ctx_drm_queue_flip(); - - /* Triple-buffered page flips */ -- if (video_info.max_swapchain_images >= 3 && -+ if (video_info->max_swapchain_images >= 3 && - gbm_surface_has_free_buffers(g_gbm_surface)) - return; - -@@ -270,18 +270,8 @@ static bool gfx_ctx_drm_set_resize(void *data, - return false; - } - --static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_drm_update_window_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- -- if (video_info.fps_show) -- runloop_msg_queue_push( buf_fps, 1, 1, false); - } - - static void gfx_ctx_drm_get_video_size(void *data, -@@ -617,7 +607,7 @@ error: - #endif - - static bool gfx_ctx_drm_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -634,7 +624,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, - /* If we use black frame insertion, - * we fake a 60 Hz monitor for 120 Hz one, - * etc, so try to match that. */ -- refresh_mod = video_info.black_frame_insertion -+ refresh_mod = video_info->black_frame_insertion - ? 0.5f : 1.0f; - - /* Find desired video mode, and use that. -@@ -660,7 +650,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, - continue; - - diff = fabsf(refresh_mod * g_drm_connector->modes[i].vrefresh -- - video_info.refresh_rate); -+ - video_info->refresh_rate); - - if (!g_drm_mode || diff < minimum_fps_diff) - { -diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c -index 1b750a368..6e5c5eb85 100644 ---- a/gfx/drivers_context/emscriptenegl_ctx.c -+++ b/gfx/drivers_context/emscriptenegl_ctx.c -@@ -75,7 +75,7 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, - *quit = false; - } - --static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_emscripten_swap_buffers(void *data, video_frame_info_t *video_info) - { - (void)data; - /* no-op in emscripten, no way to force swap/wait for VSync in browsers */ -@@ -90,17 +90,8 @@ static bool gfx_ctx_emscripten_set_resize(void *data, - return false; - } - --static void gfx_ctx_emscripten_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_emscripten_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static void gfx_ctx_emscripten_get_video_size(void *data, -@@ -189,7 +180,7 @@ error: - } - - static bool gfx_ctx_emscripten_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -330,7 +321,7 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { - NULL, /* get_video_output_next */ - NULL, /* get_metrics */ - gfx_ctx_emscripten_translate_aspect, -- gfx_ctx_emscripten_update_window_title, -+ gfx_ctx_emscripten_update_title, - gfx_ctx_emscripten_check_window, - gfx_ctx_emscripten_set_resize, - gfx_ctx_emscripten_has_focus, -diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp -index 7f35a5a99..1c3d30cef 100644 ---- a/gfx/drivers_context/gdi_ctx.cpp -+++ b/gfx/drivers_context/gdi_ctx.cpp -@@ -87,19 +87,12 @@ static bool gfx_ctx_gdi_set_resize(void *data, - return false; - } - --static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_gdi_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; - const ui_window_t *window = ui_companion_driver_get_window_ptr(); - -- buf[0] = buf_fps[0] = '\0'; -- -- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps))) -- window->set_title(&main_window, buf); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); -+ if (window && video_info->monitor_fps_enable) -+ window->set_title(&main_window, video_info->window_text); - } - - static void gfx_ctx_gdi_get_video_size(void *data, -@@ -190,7 +183,7 @@ static void gfx_ctx_gdi_destroy(void *data) - } - - static bool gfx_ctx_gdi_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -287,7 +280,7 @@ static uint32_t gfx_ctx_gdi_get_flags(void *data) - return flags; - } - --static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_gdi_swap_buffers(void *data, video_frame_info_t *video_info) - { - (void)data; - -diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c -index f4cf4f63d..90b1cb2de 100644 ---- a/gfx/drivers_context/gfx_null_ctx.c -+++ b/gfx/drivers_context/gfx_null_ctx.c -@@ -35,7 +35,7 @@ static void gfx_ctx_null_check_window(void *data, bool *quit, - (void)resize; - } - --static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_null_swap_buffers(void *data, video_frame_info_t *video_info) - { - (void)data; - } -@@ -48,10 +48,8 @@ static bool gfx_ctx_null_set_resize(void *data, unsigned width, unsigned height) - return false; - } - --static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_null_update_window_title(void *data, video_frame_info_t *video_info) - { -- (void)data; -- (void)video_info; - } - - static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) -@@ -62,7 +60,7 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h - } - - static bool gfx_ctx_null_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c -index 80276bae1..c6fcd07e2 100644 ---- a/gfx/drivers_context/khr_display_ctx.c -+++ b/gfx/drivers_context/khr_display_ctx.c -@@ -110,21 +110,12 @@ static bool gfx_ctx_khr_display_set_resize(void *data, - return false; - } - --static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_khr_display_update_window_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool gfx_ctx_khr_display_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -201,7 +192,7 @@ static void gfx_ctx_khr_display_set_swap_interval(void *data, unsigned swap_inte - } - } - --static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_khr_display_swap_buffers(void *data, video_frame_info_t *video_info) - { - khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; - vulkan_present(&khr->vk, khr->vk.context.current_swapchain_index); -diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c -index de76f06ae..977919627 100644 ---- a/gfx/drivers_context/mali_fbdev_ctx.c -+++ b/gfx/drivers_context/mali_fbdev_ctx.c -@@ -158,21 +158,12 @@ static bool gfx_ctx_mali_fbdev_set_resize(void *data, - return false; - } - --static void gfx_ctx_mali_fbdev_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_mali_fbdev_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -269,7 +260,7 @@ static void gfx_ctx_mali_fbdev_set_swap_interval(void *data, unsigned swap_inter - #endif - } - --static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_mali_fbdev_swap_buffers(void *data, video_frame_info_t *video_info) - { - mali_ctx_data_t *mali = (mali_ctx_data_t*)data; - -@@ -319,7 +310,7 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { - NULL, /* get_video_output_next */ - NULL, /* get_metrics */ - NULL, -- gfx_ctx_mali_fbdev_update_window_title, -+ gfx_ctx_mali_fbdev_update_title, - gfx_ctx_mali_fbdev_check_window, - gfx_ctx_mali_fbdev_set_resize, - gfx_ctx_mali_fbdev_has_focus, -diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c -index bab164cad..d613c18a8 100644 ---- a/gfx/drivers_context/opendingux_fbdev_ctx.c -+++ b/gfx/drivers_context/opendingux_fbdev_ctx.c -@@ -141,21 +141,12 @@ static bool gfx_ctx_opendingux_set_resize(void *data, - return false; - } - --static void gfx_ctx_opendingux_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_opendingux_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool gfx_ctx_opendingux_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -232,7 +223,7 @@ static bool gfx_ctx_opendingux_has_windowed(void *data) - return false; - } - --static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_opendingux_swap_buffers(void *data, video_frame_info_t *video_info) - { - opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; - -diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c -index f6899ece1..829d6c38b 100644 ---- a/gfx/drivers_context/osmesa_ctx.c -+++ b/gfx/drivers_context/osmesa_ctx.c -@@ -238,7 +238,7 @@ static void osmesa_ctx_swap_interval(void *data, unsigned interval) - } - - static bool osmesa_ctx_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -306,20 +306,8 @@ static void osmesa_ctx_get_video_size(void *data, - *height = osmesa->height; - } - --static void osmesa_ctx_update_window_title(void *data, video_frame_info_t video_info) -+static void osmesa_ctx_update_title(void *data, video_frame_info_t *video_info) - { -- static char buf[128] = {0}; -- static char buf_fps[128] = {0}; -- gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; -- -- if (!osmesa) -- return; -- -- video_monitor_get_fps(video_info, buf, -- sizeof(buf), buf_fps, sizeof(buf_fps)); -- -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, -@@ -361,7 +349,7 @@ static bool osmesa_ctx_has_windowed(void *data) - return true; - } - --static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t video_info) -+static void osmesa_ctx_swap_buffers(void *data, video_frame_info_t *video_info) - { - gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; - osmesa_fifo_accept(osmesa); -@@ -417,7 +405,7 @@ const gfx_ctx_driver_t gfx_ctx_osmesa = - NULL, /* get_video_output_next */ - NULL, /* get_metrics */ - NULL, /* translate_aspect */ -- osmesa_ctx_update_window_title, -+ osmesa_ctx_update_title, - osmesa_ctx_check_window, - osmesa_ctx_set_resize, - osmesa_ctx_has_focus, -diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c -index fa34420ec..4a26e0b4c 100644 ---- a/gfx/drivers_context/ps3_ctx.c -+++ b/gfx/drivers_context/ps3_ctx.c -@@ -179,7 +179,7 @@ static bool gfx_ctx_ps3_has_windowed(void *data) - return false; - } - --static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_ps3_swap_buffers(void *data, video_frame_info_t *video_info) - { - (void)data; - #ifdef HAVE_LIBDBGFONT -@@ -199,19 +199,8 @@ static bool gfx_ctx_ps3_set_resize(void *data, - return false; - } - --static void gfx_ctx_ps3_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_ps3_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- (void)data; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static void gfx_ctx_ps3_get_video_size(void *data, -@@ -302,15 +291,10 @@ static void *gfx_ctx_ps3_init(video_frame_info_t video_info, void *video_driver) - } - - static bool gfx_ctx_ps3_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -- global_t *global = global_get_ptr(); -- -- if (!global) -- return false; -- - return true; - } - -@@ -438,7 +422,7 @@ const gfx_ctx_driver_t gfx_ctx_ps3 = { - gfx_ctx_ps3_get_video_output_next, - NULL, /* get_metrics */ - NULL, -- gfx_ctx_ps3_update_window_title, -+ gfx_ctx_ps3_update_title, - gfx_ctx_ps3_check_window, - gfx_ctx_ps3_set_resize, - gfx_ctx_ps3_has_focus, -diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c -index 31ffdbda4..8308f60fc 100644 ---- a/gfx/drivers_context/qnx_ctx.c -+++ b/gfx/drivers_context/qnx_ctx.c -@@ -319,21 +319,12 @@ static bool gfx_ctx_qnx_set_resize(void *data, - return false; - } - --static void gfx_ctx_qnx_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_qnx_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool gfx_ctx_qnx_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -444,7 +435,7 @@ static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned swap_interval) - #endif - } - --static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_qnx_swap_buffers(void *data, video_frame_info_t *video_info) - { - qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; - -@@ -493,7 +484,7 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { - NULL, /* get_video_output_next */ - gfx_ctx_qnx__get_metrics, - NULL, -- gfx_ctx_qnx_update_window_title, -+ gfx_ctx_qnx_update_title, - gfx_ctx_qnx_check_window, - gfx_ctx_qnx_set_resize, - gfx_ctx_qnx_has_focus, -diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c -index 50dd0c33a..e4c34a819 100644 ---- a/gfx/drivers_context/sdl_gl_ctx.c -+++ b/gfx/drivers_context/sdl_gl_ctx.c -@@ -163,7 +163,7 @@ static void sdl_ctx_swap_interval(void *data, unsigned interval) - } - - static bool sdl_ctx_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -177,7 +177,7 @@ static bool sdl_ctx_set_video_mode(void *data, - - if (fullscreen) - { -- if (video_info.windowed_fullscreen) -+ if (video_info->windowed_fullscreen) - fsflag = SDL_WINDOW_FULLSCREEN_DESKTOP; - else - fsflag = SDL_WINDOW_FULLSCREEN; -@@ -192,7 +192,7 @@ static bool sdl_ctx_set_video_mode(void *data, - } - else - { -- unsigned display = video_info.monitor_index; -+ unsigned display = video_info->monitor_index; - - sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), - SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), -@@ -268,27 +268,18 @@ static void sdl_ctx_get_video_size(void *data, - } - } - --static void sdl_ctx_update_window_title(void *data, video_frame_info_t video_info) -+static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- if (video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps))) -+ if (video_info->monitor_fps_enable) - { - #ifdef HAVE_SDL2 - gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; - if (sdl) -- SDL_SetWindowTitle(sdl->g_win, buf); -+ SDL_SetWindowTitle(sdl->g_win, video_info->window_text); - #else -- SDL_WM_SetCaption(buf, NULL); -+ SDL_WM_SetCaption(video_info->window_text, NULL); - #endif - } -- -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, -@@ -379,7 +370,7 @@ static bool sdl_ctx_has_windowed(void *data) - return true; - } - --static void sdl_ctx_swap_buffers(void *data, video_frame_info_t video_info) -+static void sdl_ctx_swap_buffers(void *data, video_frame_info_t *video_info) - { - #ifdef HAVE_SDL2 - gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; -@@ -435,7 +426,7 @@ const gfx_ctx_driver_t gfx_ctx_sdl_gl = - NULL, /* get_video_output_next */ - NULL, /* get_metrics */ - NULL, /* translate_aspect */ -- sdl_ctx_update_window_title, -+ sdl_ctx_update_title, - sdl_ctx_check_window, - sdl_ctx_set_resize, - sdl_ctx_has_focus, -diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c -index 959b0571e..090c507ec 100644 ---- a/gfx/drivers_context/vc_egl_ctx.c -+++ b/gfx/drivers_context/vc_egl_ctx.c -@@ -105,17 +105,8 @@ static bool gfx_ctx_vc_set_resize(void *data, unsigned width, unsigned height) - return false; - } - --static void gfx_ctx_vc_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_vc_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static void gfx_ctx_vc_get_video_size(void *data, -@@ -319,7 +310,7 @@ static void gfx_ctx_vc_set_swap_interval(void *data, unsigned swap_interval) - } - - static bool gfx_ctx_vc_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -608,7 +599,7 @@ error: - return false; - } - --static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_vc_swap_buffers(void *data, video_frame_info_t *video_info) - { - vc_ctx_data_t *vc = (vc_ctx_data_t*)data; - -@@ -659,7 +650,7 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { - NULL, /* get_video_output_next */ - NULL, /* get_metrics */ - gfx_ctx_vc_translate_aspect, -- gfx_ctx_vc_update_window_title, -+ gfx_ctx_vc_update_title, - gfx_ctx_vc_check_window, - gfx_ctx_vc_set_resize, - gfx_ctx_vc_has_focus, -diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c -index ac12fc7af..ea10357d0 100644 ---- a/gfx/drivers_context/vivante_fbdev_ctx.c -+++ b/gfx/drivers_context/vivante_fbdev_ctx.c -@@ -145,21 +145,12 @@ static bool gfx_ctx_vivante_set_resize(void *data, - return false; - } - --static void gfx_ctx_vivante_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_vivante_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; -- -- buf[0] = buf_fps[0] = '\0'; -- -- video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps)); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); - } - - static bool gfx_ctx_vivante_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -246,7 +237,7 @@ static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned swap_interval - #endif - } - --static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_vivante_swap_buffers(void *data, video_frame_info_t *video_info) - { - vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; - -@@ -297,7 +288,7 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { - NULL, /* get_video_output_next */ - NULL, /* get_metrics */ - NULL, -- gfx_ctx_vivante_update_window_title, -+ gfx_ctx_vivante_update_title, - gfx_ctx_vivante_check_window, - gfx_ctx_vivante_set_resize, - gfx_ctx_vivante_has_focus, -diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c -index a59e99f91..13a9990e9 100644 ---- a/gfx/drivers_context/wayland_ctx.c -+++ b/gfx/drivers_context/wayland_ctx.c -@@ -719,20 +719,12 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) - return true; - } - --static void gfx_ctx_wl_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - -- buf[0] = buf_fps[0] = '\0'; -- -- if (video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps))) -- wl_shell_surface_set_title(wl->shell_surf, buf); -- -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); -+ if (wl && video_info->monitor_fps_enable) -+ wl_shell_surface_set_title(wl->shell_surf, video_info->window_text); - } - - -@@ -1075,7 +1067,7 @@ static void gfx_ctx_wl_set_swap_interval(void *data, unsigned swap_interval) - } - - static bool gfx_ctx_wl_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -1557,7 +1549,7 @@ static void *gfx_ctx_wl_get_context_data(void *data) - } - #endif - --static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_wl_swap_buffers(void *data, video_frame_info_t *video_info) - { - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - -@@ -1676,7 +1668,7 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { - NULL, /* get_video_output_next */ - gfx_ctx_wl_get_metrics, - NULL, -- gfx_ctx_wl_update_window_title, -+ gfx_ctx_wl_update_title, - gfx_ctx_wl_check_window, - gfx_ctx_wl_set_resize, - gfx_ctx_wl_has_focus, -diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp -index fba99cf99..57c38441d 100644 ---- a/gfx/drivers_context/wgl_ctx.cpp -+++ b/gfx/drivers_context/wgl_ctx.cpp -@@ -331,7 +331,7 @@ static void gfx_ctx_wgl_check_window(void *data, bool *quit, - } - } - --static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_wgl_swap_buffers(void *data, video_frame_info_t *video_info) - { - (void)data; - -@@ -386,19 +386,12 @@ static bool gfx_ctx_wgl_set_resize(void *data, - return false; - } - --static void gfx_ctx_wgl_update_window_title(void *data, video_frame_info_t video_info) -+static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) - { -- char buf[128]; -- char buf_fps[128]; - const ui_window_t *window = ui_companion_driver_get_window_ptr(); - -- buf[0] = buf_fps[0] = '\0'; -- -- if (window && video_monitor_get_fps(video_info, buf, sizeof(buf), -- buf_fps, sizeof(buf_fps))) -- window->set_title(&main_window, buf); -- if (video_info.fps_show) -- runloop_msg_queue_push(buf_fps, 1, 1, false); -+ if (window && video_info->monitor_fps_enable) -+ window->set_title(&main_window, video_info->window_text); - } - - static void gfx_ctx_wgl_get_video_size(void *data, -@@ -525,7 +518,7 @@ static void gfx_ctx_wgl_destroy(void *data) - } - - static bool gfx_ctx_wgl_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -687,7 +680,7 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { - NULL, /* get_video_output_next */ - gfx_ctx_wgl_get_metrics, - NULL, -- gfx_ctx_wgl_update_window_title, -+ gfx_ctx_wgl_update_title, - gfx_ctx_wgl_check_window, - gfx_ctx_wgl_set_resize, - gfx_ctx_wgl_has_focus, -diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c -index 50a504abc..cb5cac058 100644 ---- a/gfx/drivers_context/x_ctx.c -+++ b/gfx/drivers_context/x_ctx.c -@@ -302,7 +302,7 @@ static void gfx_ctx_x_swap_interval(void *data, unsigned interval) - } - } - --static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) - { - gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; - -@@ -545,7 +545,7 @@ error: - } - - static bool gfx_ctx_x_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -565,7 +565,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, - if (!x) - return false; - -- windowed_full = video_info.windowed_fullscreen; -+ windowed_full = video_info->windowed_fullscreen; - true_full = false; - - switch (x_api) -@@ -613,8 +613,8 @@ static bool gfx_ctx_x_set_video_mode(void *data, - RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n"); - } - -- if (video_info.monitor_index) -- g_x11_screen = video_info.monitor_index - 1; -+ if (video_info->monitor_index) -+ g_x11_screen = video_info->monitor_index - 1; - - #ifdef HAVE_XINERAMA - if (fullscreen || g_x11_screen != 0) -@@ -662,7 +662,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, - - - x11_set_window_attr(g_x11_dpy, g_x11_win); -- x11_update_window_title(NULL, video_info); -+ x11_update_title(NULL, video_info); - - if (fullscreen) - x11_show_mouse(g_x11_dpy, g_x11_win, false); -@@ -1081,7 +1081,7 @@ const gfx_ctx_driver_t gfx_ctx_x = { - NULL, /* get_video_output_next */ - x11_get_metrics, - NULL, -- x11_update_window_title, -+ x11_update_title, - gfx_ctx_x_check_window, - gfx_ctx_x_set_resize, - x11_has_focus, -diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c -index 133736d84..c375a6861 100644 ---- a/gfx/drivers_context/xegl_ctx.c -+++ b/gfx/drivers_context/xegl_ctx.c -@@ -257,7 +257,7 @@ static EGLint *xegl_fill_attribs(xegl_ctx_data_t *xegl, EGLint *attr) - static void gfx_ctx_xegl_set_swap_interval(void *data, unsigned swap_interval); - - static bool gfx_ctx_xegl_set_video_mode(void *data, -- video_frame_info_t video_info, -+ video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) - { -@@ -298,7 +298,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, - ButtonPressMask | ButtonReleaseMask | KeyReleaseMask; - swa.override_redirect = fullscreen ? True : False; - -- if (fullscreen && !video_info.windowed_fullscreen) -+ if (fullscreen && !video_info->windowed_fullscreen) - { - if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height, &xegl->desktop_mode)) - { -@@ -309,8 +309,8 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, - RARCH_ERR("[X/EGL]: Entering true fullscreen failed. Will attempt windowed mode.\n"); - } - -- if (video_info.monitor_index) -- g_x11_screen = video_info.monitor_index - 1; -+ if (video_info->monitor_index) -+ g_x11_screen = video_info->monitor_index - 1; - - #ifdef HAVE_XINERAMA - if (fullscreen || g_x11_screen != 0) -@@ -352,7 +352,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, - goto error; - - x11_set_window_attr(g_x11_dpy, g_x11_win); -- x11_update_window_title(NULL, video_info); -+ x11_update_title(NULL, video_info); - - if (fullscreen) - x11_show_mouse(g_x11_dpy, g_x11_win, false); -@@ -490,7 +490,7 @@ static void gfx_ctx_xegl_show_mouse(void *data, bool state) - x11_show_mouse(g_x11_dpy, g_x11_win, state); - } - --static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t video_info) -+static void gfx_ctx_xegl_swap_buffers(void *data, video_frame_info_t *video_info) - { - xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; - -@@ -591,7 +591,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = - NULL, /* get_video_output_next */ - x11_get_metrics, - NULL, -- x11_update_window_title, -+ x11_update_title, - x11_check_window, - gfx_ctx_xegl_set_resize, - x11_has_focus, -diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c -index 9bf06e725..254961f58 100644 ---- a/gfx/video_context_driver.c -+++ b/gfx/video_context_driver.c -@@ -456,7 +456,7 @@ bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) - video_driver_build_info(&video_info); - - if (!current_video_context->set_video_mode( -- video_context_data, video_info, mode_info->width, -+ video_context_data, &video_info, mode_info->width, - mode_info->height, mode_info->fullscreen)) - return false; - return true; -diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h -index 55a150c17..9b85f6d31 100644 ---- a/gfx/video_context_driver.h -+++ b/gfx/video_context_driver.h -@@ -78,7 +78,7 @@ typedef struct gfx_ctx_driver - void (*swap_interval)(void *data, unsigned); - - /* Sets video mode. Creates a window, etc. */ -- bool (*set_video_mode)(void*, video_frame_info_t video_info, unsigned, unsigned, bool); -+ bool (*set_video_mode)(void*, video_frame_info_t *video_info, unsigned, unsigned, bool); - - /* Gets current window size. - * If not initialized yet, it returns current screen size. */ -@@ -101,7 +101,7 @@ typedef struct gfx_ctx_driver - float (*translate_aspect)(void*, unsigned, unsigned); - - /* Asks driver to update window title (FPS, etc). */ -- void (*update_window_title)(void*, video_frame_info_t video_info); -+ void (*update_window_title)(void*, video_frame_info_t *video_info); - - /* Queries for resize and quit events. - * Also processes events. */ -@@ -123,7 +123,7 @@ typedef struct gfx_ctx_driver - - /* Swaps buffers. VBlank sync depends on - * earlier calls to swap_interval. */ -- void (*swap_buffers)(void*, video_frame_info_t video_info); -+ void (*swap_buffers)(void*, video_frame_info_t *video_info); - - /* Most video backends will want to use a certain input driver. - * Checks for it here. */ -diff --git a/gfx/video_driver.c b/gfx/video_driver.c -index 9ad62c93b..7146ed805 100644 ---- a/gfx/video_driver.c -+++ b/gfx/video_driver.c -@@ -1057,89 +1057,6 @@ bool video_monitor_fps_statistics(double *refresh_rate, - } - - --/** -- * video_monitor_get_fps: -- * @buf : string suitable for Window title -- * @size : size of buffer. -- * @buf_fps : string of raw FPS only (optional). -- * @size_fps : size of raw FPS buffer. -- * -- * Get the amount of frames per seconds. -- * -- * Returns: true if framerate per seconds could be obtained, -- * otherwise false. -- * -- **/ --bool video_monitor_get_fps( -- video_frame_info_t video_info, -- char *buf, size_t size, -- char *buf_fps, size_t size_fps) --{ -- static retro_time_t curr_time; -- static retro_time_t fps_time; -- retro_time_t new_time = cpu_features_get_time_usec(); -- uint64_t frame_count = 0; -- -- video_driver_threaded_lock(); -- frame_count = video_driver_frame_count; -- video_driver_threaded_unlock(); -- -- *buf = '\0'; -- -- if (frame_count) -- { -- static float last_fps; -- bool ret = false; -- unsigned write_index = video_driver_frame_time_count++ & -- (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); -- -- video_driver_frame_time_samples[write_index] = new_time - fps_time; -- fps_time = new_time; -- -- if ((frame_count % FPS_UPDATE_INTERVAL) == 0) -- { -- char frames_text[64]; -- -- last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); -- curr_time = new_time; -- -- fill_pathname_noext(buf, -- video_driver_title_buf, -- " || ", -- size); -- -- if (video_info.fps_show) -- { -- char fps_text[64]; -- snprintf(fps_text, sizeof(fps_text), " FPS: %6.1f || ", last_fps); -- strlcat(buf, fps_text, size); -- } -- -- strlcat(buf, "Frames: ", size); -- -- snprintf(frames_text, sizeof(frames_text), STRING_REP_UINT64, -- (unsigned long long)frame_count); -- -- strlcat(buf, frames_text, size); -- ret = true; -- } -- -- if (buf_fps && video_info.fps_show) -- snprintf(buf_fps, size_fps, "FPS: %6.1f || %s: " STRING_REP_UINT64, -- last_fps, -- msg_hash_to_str(MSG_FRAMES), -- (unsigned long long)frame_count); -- -- return ret; -- } -- -- curr_time = fps_time = new_time; -- strlcpy(buf, video_driver_title_buf, size); -- if (buf_fps) -- strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps); -- -- return true; --} - - float video_driver_get_aspect_ratio(void) - { -@@ -2087,6 +2004,93 @@ unsigned video_pixel_get_alignment(unsigned pitch) - } - - /** -+ * video_monitor_get_fps: -+ * -+ * Get the amount of frames per seconds. -+ * -+ * Returns: true if framerate per seconds could be obtained, -+ * otherwise false. -+ * -+ **/ -+static bool video_monitor_get_fps(video_frame_info_t *video_info) -+{ -+ static retro_time_t curr_time; -+ static retro_time_t fps_time; -+ retro_time_t new_time = cpu_features_get_time_usec(); -+ -+ if (video_info->frame_count) -+ { -+ static float last_fps; -+ bool ret = false; -+ unsigned write_index = video_driver_frame_time_count++ & -+ (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); -+ -+ video_driver_frame_time_samples[write_index] = new_time - fps_time; -+ fps_time = new_time; -+ -+ if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) -+ { -+ char frames_text[64]; -+ -+ last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); -+ curr_time = new_time; -+ -+ fill_pathname_noext(video_info->window_text, -+ video_driver_title_buf, -+ " || ", -+ sizeof(video_info->window_text)); -+ -+ if (video_info->fps_show) -+ { -+ char fps_text[64]; -+ snprintf(video_info->fps_text, -+ sizeof(video_info->fps_text), -+ " FPS: %6.1f || ", last_fps); -+ strlcat(video_info->window_text, -+ fps_text, -+ sizeof(video_info->window_text)); -+ } -+ -+ strlcat(video_info->window_text, -+ "Frames: ", -+ sizeof(video_info->window_text)); -+ -+ snprintf(frames_text, -+ sizeof(frames_text), -+ STRING_REP_UINT64, -+ (unsigned long long)video_info->frame_count); -+ -+ strlcat(video_info->window_text, -+ frames_text, -+ sizeof(video_info->window_text)); -+ ret = true; -+ } -+ -+ if (video_info->fps_text && video_info->fps_show) -+ snprintf( -+ video_info->fps_text, -+ sizeof(video_info->fps_text), -+ "FPS: %6.1f || %s: " STRING_REP_UINT64, -+ last_fps, -+ msg_hash_to_str(MSG_FRAMES), -+ (unsigned long long)video_info->frame_count); -+ -+ return ret; -+ } -+ -+ curr_time = fps_time = new_time; -+ strlcpy(video_info->window_text, -+ video_driver_title_buf, -+ sizeof(video_info->window_text)); -+ if (video_info->fps_text) -+ strlcpy(video_info->fps_text, -+ msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), -+ sizeof(video_info->fps_text)); -+ -+ return true; -+} -+ -+/** - * video_driver_frame: - * @data : pointer to data of the video frame. - * @width : width of the video frame. -@@ -2131,6 +2135,13 @@ void video_driver_frame(const void *data, unsigned width, - - video_driver_build_info(&video_info); - -+ video_driver_threaded_lock(); -+ video_info.frame_count = video_driver_frame_count; -+ video_driver_frame_count++; -+ video_driver_threaded_unlock(); -+ -+ video_info.monitor_fps_enable = video_monitor_get_fps(&video_info); -+ - /* Slightly messy code, - * but we really need to do processing before blocking on VSync - * for best possible scheduling. -@@ -2161,16 +2172,14 @@ void video_driver_frame(const void *data, unsigned width, - && video_info.font_enable && msg) - strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); - -- video_driver_threaded_lock(); -- frame_count = video_driver_frame_count; -- video_driver_frame_count++; -- video_driver_threaded_unlock(); -- - if (!current_video || !current_video->frame( - video_driver_data, data, width, height, - frame_count, -- pitch, video_driver_msg, video_info)) -+ pitch, video_driver_msg, &video_info)) - video_driver_active = false; -+ -+ if (video_info.fps_show) -+ runloop_msg_queue_push(video_info.fps_text, 1, 1, false); - } - - void video_driver_display_type_set(enum rarch_display_type type) -@@ -2245,6 +2254,10 @@ void video_driver_build_info(video_frame_info_t *video_info) - video_info->monitor_index = settings->video.monitor_index; - video_info->shared_context = settings->video.shared_context; - video_info->font_enable = settings->video.font_enable; -+ -+ video_info->frame_count = 0; -+ video_info->window_text[0] = '\0'; -+ video_info->fps_text[0] = '\0'; - } - - /** -diff --git a/gfx/video_driver.h b/gfx/video_driver.h -index 768b89660..906deea80 100644 ---- a/gfx/video_driver.h -+++ b/gfx/video_driver.h -@@ -101,6 +101,10 @@ typedef struct video_frame_info - bool fullscreen; - unsigned monitor_index; - bool font_enable; -+ bool monitor_fps_enable; -+ char window_text[128]; -+ char fps_text[128]; -+ uint64_t frame_count; - } video_frame_info_t; - - /* Optionally implemented interface to poke more -@@ -163,7 +167,7 @@ typedef struct video_viewport - typedef bool (*video_driver_frame_t)(void *data, - const void *frame, unsigned width, - unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info); -+ unsigned pitch, const char *msg, video_frame_info_t *video_info); - - typedef struct video_driver - { -@@ -462,25 +466,6 @@ void video_monitor_set_refresh_rate(float hz); - bool video_monitor_fps_statistics(double *refresh_rate, - double *deviation, unsigned *sample_points); - --/** -- * video_monitor_get_fps: -- * @video_info : information about the video frame -- * @buf : string suitable for Window title -- * @size : size of buffer. -- * @buf_fps : string of raw FPS only (optional). -- * @size_fps : size of raw FPS buffer. -- * -- * Get the amount of frames per seconds. -- * -- * Returns: true if framerate per seconds could be obtained, -- * otherwise false. -- * -- **/ --bool video_monitor_get_fps( -- video_frame_info_t video_info, -- char *buf, size_t size, -- char *buf_fps, size_t size_fps); -- - unsigned video_pixel_get_alignment(unsigned pitch); - - const video_poke_interface_t *video_driver_get_poke(void); -diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c -index ed868fb1d..0e1bb2c6f 100644 ---- a/gfx/video_thread_wrapper.c -+++ b/gfx/video_thread_wrapper.c -@@ -619,7 +619,7 @@ static void video_thread_loop(void *data) - thr->frame.buffer, thr->frame.width, thr->frame.height, - thr->frame.count, - thr->frame.pitch, *thr->frame.msg ? thr->frame.msg : NULL, -- video_info); -+ &video_info); - } - - slock_unlock(thr->frame.lock); -@@ -706,7 +706,7 @@ static bool video_thread_has_windowed(void *data) - - static bool video_thread_frame(void *data, const void *frame_, - unsigned width, unsigned height, uint64_t frame_count, -- unsigned pitch, const char *msg, video_frame_info_t video_info) -+ unsigned pitch, const char *msg, video_frame_info_t *video_info) - { - unsigned copy_stride; - static struct retro_perf_counter thr_frame = {0}; -@@ -741,7 +741,7 @@ static bool video_thread_frame(void *data, const void *frame_, - { - - retro_time_t target_frame_time = (retro_time_t) -- roundf(1000000 / video_info.refresh_rate); -+ roundf(1000000 / video_info->refresh_rate); - retro_time_t target = thr->last_time + target_frame_time; - - /* Ideally, use absolute time, but that is only a good idea on POSIX. */ From 028d50ca50ca906dfaf208d5df2f66c982c7c8b8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 16:01:35 +0100 Subject: [PATCH 238/427] C89_BUILD fixes --- gfx/video_driver.c | 3 ++- intl/msg_hash_de.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index e3928f934c..554342fb98 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2251,8 +2251,9 @@ bool video_driver_texture_unload(uintptr_t *id) void video_driver_build_info(video_frame_info_t *video_info) { + settings_t *settings = NULL; video_driver_threaded_lock(); - settings_t *settings = config_get_ptr(); + settings = config_get_ptr(); video_info->refresh_rate = settings->video.refresh_rate; video_info->black_frame_insertion = settings->video.black_frame_insertion; diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 171dff7688..3ee8478b69 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -927,7 +927,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "Ändere Treiber für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, - "Ändere die Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") // This does not sound like a correct sentence. Suggestions are appreciated. + "Ändere die Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") /* This does not sound like a correct sentence. Suggestions are appreciated. */ MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -949,7 +949,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, "Lade Add-Ons, Komponenten und Inhalte für RetroArch herunter.") MSG_HASH(MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS, - "Ändere die Einstellungen des Display-Overlays, Bildschirmtastatur und Bildschirmbenachrichtigung.") // There is no Translation for display overlay. + "Ändere die Einstellungen des Display-Overlays, Bildschirmtastatur und Bildschirmbenachrichtigung.") /* There is no Translation for display overlay. */ MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pause gameplay when window focus is lost.") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, From eea139ca309a02a6437df60131149f7995143f8c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 16:03:59 +0100 Subject: [PATCH 239/427] Remove frame_count variable --- gfx/video_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 554342fb98..d23ddcc643 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2117,7 +2117,6 @@ void video_driver_frame(const void *data, unsigned width, unsigned output_width = 0; unsigned output_height = 0; unsigned output_pitch = 0; - uint64_t frame_count = 0; const char *msg = NULL; if (!video_driver_active) @@ -2187,7 +2186,7 @@ void video_driver_frame(const void *data, unsigned width, if (!current_video || !current_video->frame( video_driver_data, data, width, height, - frame_count, + video_info.frame_count, pitch, video_driver_msg, &video_info)) video_driver_active = false; From e0ff0541a20bf3bd65b6b0584bea5e8b43cbe086 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 16:30:40 +0100 Subject: [PATCH 240/427] Pass video_info pointer to font drivers --- gfx/drivers/caca_gfx.c | 8 ++-- gfx/drivers/ctr_gfx.c | 53 +++++++++++++++++---------- gfx/drivers/d3d.cpp | 9 +++-- gfx/drivers/gdi_gfx.c | 8 ++-- gfx/drivers/gl.c | 8 ++-- gfx/drivers/sdl2_gfx.c | 2 +- gfx/drivers/vita2d_gfx.c | 10 ++--- gfx/drivers/vulkan.c | 9 +++-- gfx/drivers_font/caca_font.c | 10 ++--- gfx/drivers_font/ctr_font.c | 23 ++++++------ gfx/drivers_font/gdi_font.c | 28 +++++++------- gfx/drivers_font/gl_raster_font.c | 17 ++++----- gfx/drivers_font/ps_libdbgfont.c | 7 ++-- gfx/drivers_font/vita2d_font.c | 22 +++++------ gfx/drivers_font/vulkan_raster_font.c | 18 ++++----- gfx/drivers_font/xdk1_xfonts.c | 10 ++--- gfx/drivers_font/xdk360_fonts.cpp | 4 +- gfx/font_driver.c | 8 ++-- gfx/font_driver.h | 9 ++++- gfx/video_driver.c | 10 +++-- gfx/video_driver.h | 11 ++++-- gfx/video_thread_wrapper.h | 1 + menu/menu_display.h | 1 + 23 files changed, 161 insertions(+), 125 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 815fcb09af..77758dda86 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -154,7 +154,7 @@ static bool caca_gfx_frame(void *data, const void *frame, #endif if (msg) - font_driver_render_msg(NULL, msg, NULL); + font_driver_render_msg(video_info, NULL, msg, NULL); if (draw) { @@ -291,9 +291,11 @@ static void caca_set_texture_frame(void *data, } static void caca_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { - font_driver_render_msg(font, msg, params); + video_frame_info_t video_info; + video_driver_build_info(&video_info); + font_driver_render_msg(&video_info, font, msg, params); } static const video_poke_interface_t caca_poke_interface = { diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index ca90959423..78f44b0e78 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -445,6 +445,10 @@ static void* ctr_init(const video_info_t* video, return ctr; } +#if 0 +#define CTR_INSPECT_MEMORY_USAGE +#endif + static bool ctr_frame(void* data, const void* frame, unsigned width, unsigned height, uint64_t frame_count, @@ -519,12 +523,16 @@ static bool ctr_frame(void* data, const void* frame, #ifndef HAVE_THREADS if(task_queue_ctl(TASK_QUEUE_CTL_FIND, &ctr_tasks_finder_data)) { -// ctr->vsync_event_pending = true; +#if 0 + ctr->vsync_event_pending = true; +#endif while(ctr->vsync_event_pending) { task_queue_ctl(TASK_QUEUE_CTL_CHECK, NULL); svcSleepThread(0); -// aptMainLoop(); +#if 0 + aptMainLoop(); +#endif } } #endif @@ -542,7 +550,6 @@ static bool ctr_frame(void* data, const void* frame, frames = 0; } -//#define CTR_INSPECT_MEMORY_USAGE #ifdef CTR_INSPECT_MEMORY_USAGE uint32_t ctr_get_stack_usage(void); @@ -562,12 +569,14 @@ static bool ctr_frame(void* data, const void* frame, if(query_addr == 0x1F000000) query_addr = 0x30000000; } -// static u32* dummy_pointer; -// if(total_frames == 500) -// dummy_pointer = malloc(0x2000000); -// if(total_frames == 1000) -// free(dummy_pointer); +#if 0 + static u32* dummy_pointer; + if(total_frames == 500) + dummy_pointer = malloc(0x2000000); + if(total_frames == 1000) + free(dummy_pointer); +#endif printf("========================================"); printf("0x%08X 0x%08X 0x%08X\n", __heap_size, gpuCmdBufOffset, (__linear_heap_size - linearSpaceFree())); @@ -620,10 +629,12 @@ static bool ctr_frame(void* data, const void* frame, && (pitch > 0x40)) { /* can copy the buffer directly with the GPU */ -// GSPGPU_FlushDataCache(frame, pitch * height); +#if 0 + GSPGPU_FlushDataCache(frame, pitch * height); +#endif ctrGuSetCommandList_First(true,(void*)frame, pitch * height,0,0,0,0); ctrGuCopyImage(true, frame, pitch / (ctr->rgb32? 4: 2), height, ctr->rgb32 ? CTRGU_RGBA8: CTRGU_RGB565, false, - ctr->texture_swizzled, ctr->texture_width, ctr->rgb32 ? CTRGU_RGBA8: CTRGU_RGB565, true); + ctr->texture_swizzled, ctr->texture_width, ctr->rgb32 ? CTRGU_RGBA8: CTRGU_RGB565, true); } else { @@ -661,7 +672,7 @@ static bool ctr_frame(void* data, const void* frame, ctr_check_3D_slider(ctr); -// /* ARGB --> RGBA */ + /* ARGB --> RGBA */ if (ctr->rgb32) { GPU_SetTexEnv(0, @@ -758,11 +769,11 @@ static bool ctr_frame(void* data, const void* frame, } if (msg) - font_driver_render_msg(NULL, msg, NULL); - -// font_driver_render_msg(NULL, "TEST: 123 ABC àüî", NULL); - + font_driver_render_msg(video_info, NULL, msg, NULL); +#if 0 + font_driver_render_msg(video_info, NULL, "TEST: 123 ABC àüî", NULL); +#endif GPU_FinishDrawing(); GPUCMD_Finalize(); @@ -783,7 +794,7 @@ static bool ctr_frame(void* data, const void* frame, gfxTopRightFramebuffers[ctr->current_buffer_top], 240,CTRGU_RGB8, CTRGU_MULTISAMPLE_NONE); - // Swap buffers : + /* Swap buffers : */ extern GSPGPU_FramebufferInfo topFramebufferInfo; extern u8* gfxSharedMemory; extern u8 gfxThreadID; @@ -1094,14 +1105,16 @@ static void ctr_unload_texture(void *data, uintptr_t handle) } static void ctr_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { + video_frame_info_t video_info; ctr_video_t* ctr = (ctr_video_t*)data; - if (ctr && ctr->msg_rendering_enabled) - font_driver_render_msg(font, msg, params); -} + video_driver_build_info(&video_info); + if (ctr && ctr->msg_rendering_enabled) + font_driver_render_msg(&video_info, font, msg, params); +} static const video_poke_interface_t ctr_poke_interface = { ctr_load_texture, diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 1ada4f5dd4..b1100266c4 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -950,14 +950,17 @@ static void d3d_apply_state_changes(void *data) } static void d3d_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { + video_frame_info_t video_info; d3d_video_t *d3d = (d3d_video_t*)data; + video_driver_build_info(&video_info); + if (d3d->renderchain_driver->set_font_rect && params) d3d->renderchain_driver->set_font_rect(d3d, params); - font_driver_render_msg(NULL, msg, params); + font_driver_render_msg(&video_info, NULL, msg, params); } /* Delay constructor due to lack of exceptions. */ @@ -1442,7 +1445,7 @@ static bool d3d_frame(void *data, const void *frame, if (msg) { struct font_params font_parms = {0}; - font_driver_render_msg(NULL, msg, &font_parms); + font_driver_render_msg(video_info, NULL, msg, &font_parms); } #ifdef HAVE_MENU diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 7733f05ab6..e9c3e4c866 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -253,7 +253,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, } if (msg) - font_driver_render_msg(NULL, msg, NULL); + font_driver_render_msg(video_info, NULL, msg, NULL); InvalidateRect(hwnd, NULL, false); @@ -391,9 +391,11 @@ static void gdi_set_texture_frame(void *data, } static void gdi_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { - font_driver_render_msg(font, msg, params); + video_frame_info_t video_info; + video_driver_build_info(&video_info); + font_driver_render_msg(&video_info, font, msg, params); } static void gdi_get_video_output_size(void *data, diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 55a89ff0a8..aa085d2c73 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -957,9 +957,11 @@ static void gl_set_texture_enable(void *data, bool state, bool full_screen) } static void gl_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { - font_driver_render_msg(font, msg, params); + video_frame_info_t video_info; + video_driver_build_info(&video_info); + font_driver_render_msg(&video_info, font, msg, params); } static void gl_show_mouse(void *data, bool state) @@ -1284,7 +1286,7 @@ static bool gl_frame(void *data, const void *frame, #endif if (msg) - font_driver_render_msg(NULL, msg, NULL); + font_driver_render_msg(video_info, NULL, msg, NULL); #ifdef HAVE_OVERLAY gl_render_overlay(gl, video_info); diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 6cc61b0a8c..5613a63131 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -729,7 +729,7 @@ static void sdl2_poke_texture_enable(void *data, bool enable, bool full_screen) } static void sdl2_poke_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { sdl2_video_t *vid = (sdl2_video_t*)data; sdl2_render_msg(vid, msg); diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index f16d669dcc..c4b0a32267 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -16,7 +16,6 @@ #include - #include #include #include @@ -250,7 +249,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame, } if(!string_is_empty(msg)) - font_driver_render_msg(NULL, msg, NULL); + font_driver_render_msg(video_info, NULL, msg, NULL); vita2d_end_drawing(); vita2d_swap_buffers(); @@ -725,10 +724,11 @@ static void vita_unload_texture(void *data, uintptr_t handle) } static void vita_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { - (void)data; - font_driver_render_msg(font, msg, params); + video_frame_info_t video_info; + video_driver_build_info(&video_info); + font_driver_render_msg(&video_info, font, msg, params); } static bool vita_get_current_sw_framebuffer(void *data, diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 5be806a7c9..701ccb1081 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1774,7 +1774,7 @@ static bool vulkan_frame(void *data, const void *frame, #endif if (msg) - font_driver_render_msg(NULL, msg, NULL); + font_driver_render_msg(video_info, NULL, msg, NULL); #ifdef HAVE_OVERLAY if (vk->overlay.enable) @@ -2140,10 +2140,11 @@ static void vulkan_set_texture_enable(void *data, bool state, bool full_screen) } static void vulkan_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { - (void)data; - font_driver_render_msg(font, msg, params); + video_frame_info_t video_info; + video_driver_build_info(&video_info); + font_driver_render_msg(&video_info, font, msg, params); } #endif diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index f7ab54f028..68ea5c0475 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -24,7 +24,6 @@ #endif #include "../font_driver.h" -#include "../../configuration.h" #include "../../verbosity.h" #include "../common/caca_common.h" @@ -74,7 +73,8 @@ static const struct font_glyph *caca_font_get_glyph( return NULL; } -static void caca_render_msg(void *data, const char *msg, +static void caca_render_msg(video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { float x, y; @@ -93,10 +93,8 @@ static void caca_render_msg(void *data, const char *msg, } else { - settings_t *settings = config_get_ptr(); - - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; } if (!font->caca || !font->caca->caca_cv || !font->caca->caca_display || diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 58a4e9878a..ecb9d7705d 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -351,23 +351,24 @@ static void ctr_font_render_message( } } -static void ctr_font_render_msg(void* data, const char* msg, - const void* userdata) +static void ctr_font_render_msg( + video_frame_info_t *video_info, + void* data, const char* msg, + const void* userdata) { float x, y, scale, drop_mod, drop_alpha; - unsigned width, height; int drop_x, drop_y; unsigned max_glyphs; enum text_alignment text_align; unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark; ctr_font_t * font = (ctr_font_t*)data; const struct font_params* params = (const struct font_params*)userdata; + unsigned width = video_info->width; + unsigned height = video_info->height; if (!font || !msg || !*msg) return; - video_driver_get_size(&width, &height); - if (params) { x = params->x; @@ -386,16 +387,14 @@ static void ctr_font_render_msg(void* data, const char* msg, } else { - settings_t* settings = config_get_ptr(); - - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; scale = 1.0f; text_align = TEXT_ALIGN_LEFT; - r = (settings->video.msg_color_r * 255); - g = (settings->video.msg_color_g * 255); - b = (settings->video.msg_color_b * 255); + r = (video_info->font_msg_color_r * 255); + g = (video_info->font_msg_color_g * 255); + b = (video_info->font_msg_color_b * 255); alpha = 255; color = COLOR_ABGR(r, g, b, alpha); diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index 8b84baaad2..592e208ba7 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -79,23 +79,23 @@ static const struct font_glyph *gdi_font_get_glyph( return NULL; } -static void gdi_render_msg(void *data, const char *msg, +static void gdi_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { - gdi_raster_t *font = (gdi_raster_t*)data; - float x, y; - unsigned width = 0, height = 0; - unsigned newX, newY, len; - settings_t *settings = config_get_ptr(); - const struct font_params *params = (const struct font_params*)userdata; HDC hdc; - HWND hwnd = win32_get_window(); + float x, y; + gdi_raster_t *font = (gdi_raster_t*)data; + unsigned newX, newY, len; + const struct font_params *params = (const struct font_params*)userdata; + HWND hwnd = win32_get_window(); + unsigned width = video_info->width; + unsigned height = video_info->height; if (!font || string_is_empty(msg)) return; - video_driver_get_size(&width, &height); - if (params) { x = params->x; @@ -103,18 +103,18 @@ static void gdi_render_msg(void *data, const char *msg, } else { - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; } if (!font->gdi) return; - len = utf8len(msg); + len = utf8len(msg); newX = x * width; newY = height - (y * height); + hdc = GetDC(hwnd); - hdc = GetDC(hwnd); SetBkMode(hdc, TRANSPARENT); SetTextColor(hdc, RGB(255,255,255)); TextOut(hdc, newX, newY, msg, len); diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index fb7d653a96..d282f60187 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -25,8 +25,6 @@ #include "../video_shader_driver.h" #include "../video_context_driver.h" -#include "../../configuration.h" - /* TODO: Move viewport side effects to the caller: it's a source of bugs. */ #define gl_raster_font_emit(c, vx, vy) do { \ @@ -424,7 +422,9 @@ static void gl_raster_font_restore_viewport(gl_t *gl, bool full_screen) video_driver_set_viewport(width, height, full_screen, true); } -static void gl_raster_font_render_msg(void *data, const char *msg, +static void gl_raster_font_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { GLfloat x, y, scale, drop_mod, drop_alpha; @@ -467,16 +467,15 @@ static void gl_raster_font_render_msg(void *data, const char *msg, } else { - settings_t *settings = config_get_ptr(); - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; scale = 1.0f; full_screen = true; text_align = TEXT_ALIGN_LEFT; - color[0] = settings->video.msg_color_r; - color[1] = settings->video.msg_color_g; - color[2] = settings->video.msg_color_b; + color[0] = video_info->font_msg_color_r; + color[1] = video_info->font_msg_color_g; + color[2] = video_info->font_msg_color_b; color[3] = 1.0f; drop_x = -2; diff --git a/gfx/drivers_font/ps_libdbgfont.c b/gfx/drivers_font/ps_libdbgfont.c index cf437ac82e..2f1d7e08eb 100644 --- a/gfx/drivers_font/ps_libdbgfont.c +++ b/gfx/drivers_font/ps_libdbgfont.c @@ -63,7 +63,9 @@ static void libdbg_font_free_font(void *data) DbgFontExit(); } -static void libdbg_font_render_msg(void *data, const char *msg, +static void libdbg_font_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { float x, y, scale; @@ -81,8 +83,7 @@ static void libdbg_font_render_msg(void *data, const char *msg, } else { - settings_t *settings = config_get_ptr(); - x = settings->video.msg_pos_x; + x = video_info->font_msg_pos_x; y = 0.90f; scale = 1.04f; color = SILVER; diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index 32c3511ebb..246305ab59 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -22,7 +22,6 @@ #include "../font_driver.h" -#include "../../configuration.h" #include "../../verbosity.h" typedef struct @@ -261,23 +260,24 @@ static void vita2d_font_render_message( } } -static void vita2d_font_render_msg(void *data, const char *msg, +static void vita2d_font_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { float x, y, scale, drop_mod, drop_alpha; - unsigned width, height; int drop_x, drop_y; unsigned max_glyphs; enum text_alignment text_align; unsigned color, color_dark, r, g, b, alpha, r_dark, g_dark, b_dark, alpha_dark; vita_font_t *font = (vita_font_t *)data; const struct font_params *params = (const struct font_params*)userdata; + unsigned width = video_info->width; + unsigned height = video_info->height; if (!font || !msg || !*msg) return; - video_driver_get_size(&width, &height); - if (params) { x = params->x; @@ -296,16 +296,14 @@ static void vita2d_font_render_msg(void *data, const char *msg, } else { - settings_t *settings = config_get_ptr(); - - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; scale = 1.0f; text_align = TEXT_ALIGN_LEFT; - r = (settings->video.msg_color_r * 255); - g = (settings->video.msg_color_g * 255); - b = (settings->video.msg_color_b * 255); + r = (video_info->font_msg_color_r * 255); + g = (video_info->font_msg_color_g * 255); + b = (video_info->font_msg_color_b * 255); alpha = 255; color = RGBA8(r,g,b,alpha); diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 84f071a0fc..0560ca4326 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -21,8 +21,6 @@ #include "../font_driver.h" -#include "../../configuration.h" - typedef struct { vk_t *vk; @@ -258,7 +256,9 @@ static void vulkan_raster_font_flush(vulkan_raster_t *font) vulkan_draw_triangles(font->vk, &call); } -static void vulkan_raster_font_render_msg(void *data, const char *msg, +static void vulkan_raster_font_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { float color[4], color_dark[4]; @@ -299,17 +299,15 @@ static void vulkan_raster_font_render_msg(void *data, const char *msg, } else { - settings_t *settings = config_get_ptr(); - - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; scale = 1.0f; full_screen = true; text_align = TEXT_ALIGN_LEFT; - color[0] = settings->video.msg_color_r; - color[1] = settings->video.msg_color_g; - color[2] = settings->video.msg_color_b; + color[0] = video_info->font_msg_color_r; + color[1] = video_info->font_msg_color_g; + color[2] = video_info->font_msg_color_b; color[3] = 1.0f; drop_x = -2; diff --git a/gfx/drivers_font/xdk1_xfonts.c b/gfx/drivers_font/xdk1_xfonts.c index bceffdf95e..2f04f5fbc0 100644 --- a/gfx/drivers_font/xdk1_xfonts.c +++ b/gfx/drivers_font/xdk1_xfonts.c @@ -63,7 +63,9 @@ static void xfonts_free_font(void *data) font = NULL; } -static void xfonts_render_msg(void *data, const char *msg, +static void xfonts_render_msg( + video_frame_info_t *video_info, + void *data, const char *msg, const void *userdata) { wchar_t str[PATH_MAX_LENGTH]; @@ -78,10 +80,8 @@ static void xfonts_render_msg(void *data, const char *msg, } else { - settings_t *settings = config_get_ptr(); - - x = settings->video.msg_pos_x; - y = settings->video.msg_pos_y; + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; } xfonts->d3d->dev->GetBackBuffer(-1, D3DBACKBUFFER_TYPE_MONO, &xfonts->surf); diff --git a/gfx/drivers_font/xdk360_fonts.cpp b/gfx/drivers_font/xdk360_fonts.cpp index e0e00ebc57..2e7114f28c 100644 --- a/gfx/drivers_font/xdk360_fonts.cpp +++ b/gfx/drivers_font/xdk360_fonts.cpp @@ -803,7 +803,9 @@ static void xdk360_draw_text(xdk360_video_font_t *font, d3dr->EndVertices(); } -static void xdk360_render_msg(void *data, const char *str_msg, +static void xdk360_render_msg( + video_frame_info_t *video_info, + void *data, const char *str_msg, const void *userdata) { float x, y; diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 5fd85f93d0..58c2df00b3 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -346,12 +346,14 @@ static bool font_init_first( return false; } -void font_driver_render_msg(void *font_data, - const char *msg, const struct font_params *params) +void font_driver_render_msg( + video_frame_info_t *video_info, + void *font_data, + const char *msg, const void *params) { font_data_t *font = (font_data_t*)(font_data ? font_data : video_font_driver); if (font && font->renderer && font->renderer->render_msg) - font->renderer->render_msg(font->renderer_data, msg, params); + font->renderer->render_msg(video_info, font->renderer_data, msg, params); } void font_driver_bind_block(void *font_data, void *block) diff --git a/gfx/font_driver.h b/gfx/font_driver.h index f2484db51f..c78e591ad5 100644 --- a/gfx/font_driver.h +++ b/gfx/font_driver.h @@ -22,6 +22,8 @@ #include #include +#include "video_driver.h" + RETRO_BEGIN_DECLS enum font_driver_render_api @@ -100,7 +102,9 @@ typedef struct font_renderer { void *(*init)(void *data, const char *font_path, float font_size); void (*free)(void *data); - void (*render_msg)(void *data, const char *msg, + void (*render_msg)( + video_frame_info_t *video_info, + void *data, const char *msg, const void *params); const char *ident; @@ -140,7 +144,8 @@ typedef struct int font_renderer_create_default(const void **driver, void **handle, const char *font_path, unsigned font_size); -void font_driver_render_msg(void *font_data, const char *msg, const struct font_params *params); +void font_driver_render_msg(video_frame_info_t *video_info, + void *font_data, const char *msg, const void *params); void font_driver_bind_block(void *font_data, void *block); diff --git a/gfx/video_driver.c b/gfx/video_driver.c index d23ddcc643..e3d3bc9ade 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -900,11 +900,10 @@ bool video_driver_get_video_output_size(unsigned *width, unsigned *height) return true; } -void video_driver_set_osd_msg(const char *msg, - const struct font_params *params, void *font) +void video_driver_set_osd_msg(const char *msg, const void *data, void *font) { if (video_driver_poke && video_driver_poke->set_osd_msg) - video_driver_poke->set_osd_msg(video_driver_data, msg, params, font); + video_driver_poke->set_osd_msg(video_driver_data, msg, data, font); } void video_driver_set_texture_enable(bool enable, bool fullscreen) @@ -2268,6 +2267,11 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->monitor_index = settings->video.monitor_index; video_info->shared_context = settings->video.shared_context; video_info->font_enable = settings->video.font_enable; + video_info->font_msg_pos_x = settings->video.msg_pos_x; + video_info->font_msg_pos_y = settings->video.msg_pos_y; + video_info->font_msg_color_r = settings->video.msg_color_r; + video_info->font_msg_color_g = settings->video.msg_color_g; + video_info->font_msg_color_b = settings->video.msg_color_b; video_info->frame_count = 0; video_info->fps_text[0] = '\0'; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 479cb77cf7..93a3147830 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -32,7 +32,6 @@ #include "../input/input_overlay.h" #endif -#include "font_driver.h" #include "video_defines.h" #include "video_filter.h" #include "video_shader_parse.h" @@ -107,6 +106,12 @@ typedef struct video_frame_info unsigned width; unsigned height; + + float font_msg_pos_x; + float font_msg_pos_y; + float font_msg_color_r; + float font_msg_color_g; + float font_msg_color_b; } video_frame_info_t; /* Optionally implemented interface to poke more @@ -142,7 +147,7 @@ typedef struct video_poke_interface /* Enable or disable rendering. */ void (*set_texture_enable)(void *data, bool enable, bool full_screen); void (*set_osd_msg)(void *data, const char *msg, - const struct font_params *params, void *font); + const void *params, void *font); void (*show_mouse)(void *data, bool state); void (*grab_mouse_toggle)(void *data); @@ -376,7 +381,7 @@ bool video_driver_get_video_output_size( unsigned *width, unsigned *height); void video_driver_set_osd_msg(const char *msg, - const struct font_params *params, void *font); + const void *params, void *font); void video_driver_set_texture_enable(bool enable, bool full_screen); diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 190b5f2226..9722cc78db 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -23,6 +23,7 @@ #include #include "video_driver.h" +#include "font_driver.h" RETRO_BEGIN_DECLS diff --git a/menu/menu_display.h b/menu/menu_display.h index 5310dc4097..9bf0bb0ab1 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -26,6 +26,7 @@ #include #include "../file_path_special.h" +#include "../gfx/font_driver.h" #include "../gfx/video_context_driver.h" #include "../gfx/video_coord_array.h" From 586654846af294e0c031a7587476ca692eeb4ecb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 16:33:02 +0100 Subject: [PATCH 241/427] Buildfix --- gfx/drivers_font/ctr_font.c | 1 - gfx/video_thread_wrapper.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index ecb9d7705d..e1e0580b60 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -27,7 +27,6 @@ #include "../drivers/ctr_gu.h" #include "../../ctr/gpu_old.h" -#include "../../configuration.h" #include "../../verbosity.h" /* FIXME: this is just a workaround to avoid diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 0e1bb2c6f6..d69130c5c5 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -1193,7 +1193,7 @@ static void thread_set_texture_enable(void *data, bool state, bool full_screen) } static void thread_set_osd_msg(void *data, const char *msg, - const struct font_params *params, void *font) + const void *params, void *font) { thread_video_t *thr = (thread_video_t*)data; From a42748f90fbc6b951bf99e2f549d9b2e07e75144 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 16:40:20 +0100 Subject: [PATCH 242/427] Get rid of more function invocations of video_driver_get_size --- gfx/drivers_font/ctr_font.c | 53 +++++++++++++-------------- gfx/drivers_font/gl_raster_font.c | 26 ++++++------- gfx/drivers_font/vita2d_font.c | 25 ++++++------- gfx/drivers_font/vulkan_raster_font.c | 7 ++-- 4 files changed, 55 insertions(+), 56 deletions(-) diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index e1e0580b60..17462bc3e3 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -150,33 +150,31 @@ static int ctr_font_get_message_width(void* data, const char* msg, } static void ctr_font_render_line( - ctr_font_t* font, const char* msg, unsigned msg_len, - float scale, const unsigned int color, float pos_x, - float pos_y, unsigned text_align) + video_frame_info_t *video_info, + ctr_font_t* font, const char* msg, unsigned msg_len, + float scale, const unsigned int color, float pos_x, + float pos_y, unsigned text_align) { - int x, y, delta_x, delta_y; - unsigned width, height; unsigned i; + ctr_vertex_t* v = NULL; ctr_video_t* ctr = (ctr_video_t*)video_driver_get_ptr(false); - ctr_vertex_t* v; - video_driver_get_size(&width, &height); - - x = roundf(pos_x * width); - y = roundf((1.0f - pos_y) * height); - delta_x = 0; - delta_y = 0; - + unsigned width = video_info->width; + unsigned height = video_info->height; + int x = roundf(pos_x * width); + int y = roundf((1.0f - pos_y) * height); + int delta_x = 0; + int delta_y = 0; switch (text_align) { - case TEXT_ALIGN_RIGHT: - x -= ctr_font_get_message_width(font, msg, msg_len, scale); - break; + case TEXT_ALIGN_RIGHT: + x -= ctr_font_get_message_width(font, msg, msg_len, scale); + break; - case TEXT_ALIGN_CENTER: - x -= ctr_font_get_message_width(font, msg, msg_len, scale) / 2; - break; + case TEXT_ALIGN_CENTER: + x -= ctr_font_get_message_width(font, msg, msg_len, scale) / 2; + break; } if ((ctr->vertex_cache.size - (ctr->vertex_cache.current - ctr->vertex_cache.buffer)) < msg_len) @@ -305,9 +303,10 @@ static void ctr_font_render_line( } static void ctr_font_render_message( - ctr_font_t* font, const char* msg, float scale, - const unsigned int color, float pos_x, float pos_y, - unsigned text_align) + video_frame_info_t *video_info, + ctr_font_t* font, const char* msg, float scale, + const unsigned int color, float pos_x, float pos_y, + unsigned text_align) { int lines = 0; float line_height; @@ -318,7 +317,7 @@ static void ctr_font_render_message( /* If the font height is not supported just draw as usual */ if (!font->font_driver->get_line_height) { - ctr_font_render_line(font, msg, strlen(msg), + ctr_font_render_line(video_info, font, msg, strlen(msg), scale, color, pos_x, pos_y, text_align); return; } @@ -333,7 +332,7 @@ static void ctr_font_render_message( if (delim) { unsigned msg_len = delim - msg; - ctr_font_render_line(font, msg, msg_len, + ctr_font_render_line(video_info, font, msg, msg_len, scale, color, pos_x, pos_y - (float)lines * line_height, text_align); msg += msg_len + 1; @@ -342,7 +341,7 @@ static void ctr_font_render_message( else { unsigned msg_len = strlen(msg); - ctr_font_render_line(font, msg, msg_len, + ctr_font_render_line(video_info, font, msg, msg_len, scale, color, pos_x, pos_y - (float)lines * line_height, text_align); break; @@ -416,12 +415,12 @@ static void ctr_font_render_msg( alpha_dark = alpha * drop_alpha; color_dark = COLOR_ABGR(r_dark, g_dark, b_dark, alpha_dark); - ctr_font_render_message(font, msg, scale, color_dark, + ctr_font_render_message(video_info, font, msg, scale, color_dark, x + scale * drop_x / width, y + scale * drop_y / height, text_align); } - ctr_font_render_message(font, msg, scale, + ctr_font_render_message(video_info, font, msg, scale, color, x, y, text_align); } diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index d282f60187..06e181551f 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -388,13 +388,11 @@ static void gl_raster_font_render_message( } } -static void gl_raster_font_setup_viewport(gl_raster_t *font, bool full_screen) +static void gl_raster_font_setup_viewport(unsigned width, unsigned height, + gl_raster_t *font, bool full_screen) { - unsigned width, height; video_shader_ctx_info_t shader_info; - video_driver_get_size(&width, &height); - video_driver_set_viewport(width, height, full_screen, false); glEnable(GL_BLEND); @@ -410,12 +408,9 @@ static void gl_raster_font_setup_viewport(gl_raster_t *font, bool full_screen) video_shader_driver_use(shader_info); } -static void gl_raster_font_restore_viewport(gl_t *gl, bool full_screen) +static void gl_raster_font_restore_viewport(unsigned width, unsigned height, + gl_t *gl, bool full_screen) { - unsigned width, height; - - video_driver_get_size(&width, &height); - glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); glDisable(GL_BLEND); @@ -434,6 +429,8 @@ static void gl_raster_font_render_msg( bool full_screen = false ; gl_t *gl = NULL; gl_raster_t *font = (gl_raster_t*)data; + unsigned width = video_info->width; + unsigned height = video_info->height; const struct font_params *params = (const struct font_params*)userdata; if (!font || string_is_empty(msg)) @@ -487,7 +484,7 @@ static void gl_raster_font_render_msg( if (font && font->block) font->block->fullscreen = full_screen; else - gl_raster_font_setup_viewport(font, full_screen); + gl_raster_font_setup_viewport(width, height, font, full_screen); if (drop_x || drop_y) { @@ -506,7 +503,7 @@ static void gl_raster_font_render_msg( gl_raster_font_render_message(font, msg, scale, color, x, y, text_align); if (!font->block) - gl_raster_font_restore_viewport(gl, false); + gl_raster_font_restore_viewport(width, height, gl, false); } static const struct font_glyph *gl_raster_font_get_glyph( @@ -523,15 +520,18 @@ static const struct font_glyph *gl_raster_font_get_glyph( static void gl_raster_font_flush_block(void *data) { + unsigned width, height; gl_raster_t *font = (gl_raster_t*)data; video_font_raster_block_t *block = font ? font->block : NULL; if (!font || !block || !block->carr.coords.vertices) return; - gl_raster_font_setup_viewport(font, block->fullscreen); + video_driver_get_size(&width, &height); + + gl_raster_font_setup_viewport(width, height, font, block->fullscreen); gl_raster_font_draw_vertices(font, (video_coords_t*)&block->carr.coords); - gl_raster_font_restore_viewport(font->gl, block->fullscreen); + gl_raster_font_restore_viewport(width, height, font->gl, block->fullscreen); } static void gl_raster_font_bind_block(void *data, void *userdata) diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index 246305ab59..b8bc7a5045 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -139,20 +139,18 @@ static int vita2d_font_get_message_width(void *data, const char *msg, } static void vita2d_font_render_line( + video_frame_info_t *video_info, vita_font_t *font, const char *msg, unsigned msg_len, float scale, const unsigned int color, float pos_x, float pos_y, unsigned text_align) { - int x, y, delta_x, delta_y; - unsigned width, height; unsigned i; - - video_driver_get_size(&width, &height); - - x = roundf(pos_x * width); - y = roundf((1.0f - pos_y) * height); - delta_x = 0; - delta_y = 0; + unsigned width = video_info->width; + unsigned height = video_info->height; + int x = roundf(pos_x * width); + int y = roundf((1.0f - pos_y) * height); + int delta_x = 0; + int delta_y = 0; switch (text_align) { @@ -221,6 +219,7 @@ static void vita2d_font_render_line( } static void vita2d_font_render_message( + video_frame_info_t *video_info, vita_font_t *font, const char *msg, float scale, const unsigned int color, float pos_x, float pos_y, unsigned text_align) @@ -234,7 +233,7 @@ static void vita2d_font_render_message( /* If the font height is not supported just draw as usual */ if (!font->font_driver->get_line_height) { - vita2d_font_render_line(font, msg, strlen(msg), + vita2d_font_render_line(video_info, font, msg, strlen(msg), scale, color, pos_x, pos_y, text_align); return; } @@ -247,7 +246,7 @@ static void vita2d_font_render_message( const char *delim = strchr(msg, '\n'); unsigned msg_len = (delim) ? (delim - msg) : strlen(msg); - vita2d_font_render_line(font, msg, msg_len, + vita2d_font_render_line(video_info, font, msg, msg_len, scale, color, pos_x, pos_y - (float)lines * line_height, text_align); @@ -326,12 +325,12 @@ static void vita2d_font_render_msg( alpha_dark = alpha * drop_alpha; color_dark = RGBA8(r_dark,g_dark,b_dark,alpha_dark); - vita2d_font_render_message(font, msg, scale, color_dark, + vita2d_font_render_message(video_info, font, msg, scale, color_dark, x + scale * drop_x / width, y + scale * drop_y / height, text_align); } - vita2d_font_render_message(font, msg, scale, + vita2d_font_render_message(video_info, font, msg, scale, color, x, y, text_align); } diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 0560ca4326..d94708811b 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -234,10 +234,9 @@ static void vulkan_raster_font_render_message( } static void vulkan_raster_font_setup_viewport( + unsigned width, unsigned height, vulkan_raster_t *font, bool full_screen) { - unsigned width, height; - video_driver_get_size(&width, &height); video_driver_set_viewport(width, height, full_screen, false); } @@ -269,6 +268,8 @@ static void vulkan_raster_font_render_msg( float x, y, scale, drop_mod, drop_alpha; vk_t *vk = NULL; vulkan_raster_t *font = (vulkan_raster_t*)data; + unsigned width = video_info->width; + unsigned height = video_info->height; const struct font_params *params = (const struct font_params*)userdata; if (!font || !msg || !*msg) @@ -316,7 +317,7 @@ static void vulkan_raster_font_render_msg( drop_alpha = 1.0f; } - vulkan_raster_font_setup_viewport(font, full_screen); + vulkan_raster_font_setup_viewport(width, height, font, full_screen); max_glyphs = strlen(msg); if (drop_x || drop_y) From 0d33888a249c945a6f539dbee5b23e6b0ea3b7c9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 16:50:09 +0100 Subject: [PATCH 243/427] (dispmanx_gfx.c) Cleanups --- gfx/drivers/dispmanx_gfx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index fe3698a47a..3a828a1c7c 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -25,7 +25,6 @@ #include "../../menu/menu_driver.h" #endif -#include "../../configuration.h" #include "../../driver.h" #include "../../retroarch.h" #include "../../runloop.h" @@ -321,8 +320,6 @@ static void dispmanx_surface_update(void *data, const void *frame, struct dispmanx_video *_dispvars = data; struct dispmanx_page *page = NULL; - settings_t *settings = config_get_ptr(); - /* Dispmanx doesn't support more than one pending pageflip. * It causes lockups. */ slock_lock(_dispvars->pending_mutex); @@ -450,8 +447,6 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, if (width == 0 || height == 0) return true; - settings_t *settings = config_get_ptr(); - _dispvars->core_width = width; _dispvars->core_height = height; _dispvars->core_pitch = pitch; @@ -470,7 +465,7 @@ static bool dispmanx_gfx_frame(void *data, const void *frame, unsigned width, _dispvars->rgb32 ? VC_IMAGE_XRGB8888 : VC_IMAGE_RGB565, 255, _dispvars->aspect_ratio, - settings->video.max_swapchain_images, + video_info->max_swapchain_images, 0, &_dispvars->main_surface); From 27ae782a8e5eb19f88dbeaf9b5c870c1b39ee408 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 17:17:20 +0100 Subject: [PATCH 244/427] (CTR) Add this header --- gfx/drivers/ctr_gfx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 78f44b0e78..eaf921e7c8 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -30,6 +30,7 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" #include "../../ctr/gpu_old.h" #include "ctr_gu.h" From fe843123403b0247bbc6effdbf421d8f008c47cf Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 17:20:42 +0100 Subject: [PATCH 245/427] Add some header includes --- gfx/drivers/caca_gfx.c | 2 ++ gfx/drivers/d3d.cpp | 2 ++ gfx/drivers/dispmanx_gfx.c | 2 ++ gfx/drivers/gdi_gfx.c | 2 ++ gfx/drivers/gx_gfx.c | 2 ++ gfx/drivers/nullgfx.c | 3 ++- gfx/drivers/omap_gfx.c | 4 ++-- gfx/drivers/psp1_gfx.c | 2 ++ gfx/drivers/sdl2_gfx.c | 3 ++- gfx/drivers/sdl_gfx.c | 3 ++- gfx/drivers/sunxi_gfx.c | 3 ++- gfx/drivers/vg.c | 3 ++- gfx/drivers/vita2d_gfx.c | 2 ++ gfx/drivers/vulkan.c | 3 ++- gfx/drivers/wiiu_gfx.c | 2 ++ gfx/drivers/xenon360_gfx.c | 2 ++ gfx/drivers/xshm_gfx.c | 2 ++ gfx/drivers/xvideo.c | 3 ++- 18 files changed, 36 insertions(+), 9 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 77758dda86..7d7106be21 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -25,6 +25,8 @@ #include "../common/caca_common.h" +#include "../font_driver.h" + #include "../../driver.h" #include "../../verbosity.h" diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index b1100266c4..603749ba7e 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -47,6 +47,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../../core.h" #include "../../performance_counters.h" diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index 3a828a1c7c..7ba3883185 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -25,6 +25,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../../driver.h" #include "../../retroarch.h" #include "../../runloop.h" diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index e9c3e4c866..748c9dac30 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -25,6 +25,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../../driver.h" #include "../../configuration.h" #include "../../verbosity.h" diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index b131268973..a68889b483 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -36,6 +36,8 @@ #include "../../memory/wii/mem2_manager.h" #endif +#include "../font_driver.h" + #include "../drivers_font_renderer/bitmap.h" #include "../../defines/gx_defines.h" #include "../../configuration.h" diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c index 30708f4dfd..fac6f4fdfa 100644 --- a/gfx/drivers/nullgfx.c +++ b/gfx/drivers/nullgfx.c @@ -14,8 +14,9 @@ * If not, see . */ +#include "../video_driver.h" + #include "../../driver.h" -#include "../../configuration.h" #include "../../verbosity.h" static void *null_gfx_init(const video_info_t *video, diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index fbc25df83b..e2c8554539 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -42,6 +42,8 @@ #include #include +#include "../font_driver.h" + #include "../../configuration.h" #include "../../driver.h" #include "../../retroarch.h" @@ -49,8 +51,6 @@ #include "../video_context_driver.h" -#include "../font_driver.h" - typedef struct omapfb_page { unsigned yoffset; diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 1185064407..c4dff6d424 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -32,6 +32,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../../defines/psp_defines.h" #include "../../runloop.h" diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 5613a63131..d4cc2c439f 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -35,13 +35,14 @@ #include "SDL.h" #include "SDL_syswm.h" +#include "../font_driver.h" + #include "../../configuration.h" #include "../../retroarch.h" #include "../../runloop.h" #include "../../performance_counters.h" #include "../../verbosity.h" #include "../video_context_driver.h" -#include "../font_driver.h" typedef struct sdl2_tex { diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index e79fd926a9..f4cb032517 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -38,12 +38,13 @@ #include "SDL.h" #include "SDL_syswm.h" +#include "../font_driver.h" + #include "../../configuration.h" #include "../../runloop.h" #include "../../performance_counters.h" #include "../video_context_driver.h" -#include "../font_driver.h" typedef struct sdl_menu_frame { diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index 3c290fa22c..25ee4eb3e0 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -32,9 +32,10 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../../retroarch.h" #include "../../runloop.h" -#include "../font_driver.h" #define NUMPAGES 2 diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 700e1997a2..7016da0567 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -35,12 +35,13 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" #include "../video_context_driver.h" + #include "../../retroarch.h" #include "../../runloop.h" #include "../../driver.h" #include "../../performance_counters.h" -#include "../font_driver.h" #include "../../content.h" #include "../../runloop.h" #include "../../verbosity.h" diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index c4b0a32267..428f51ce47 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -28,6 +28,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../common/vita2d_common.h" #include "../../driver.h" #include "../../runloop.h" diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 701ccb1081..675ecbac9a 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -34,6 +34,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../common/vulkan_common.h" #include "../../driver.h" @@ -45,7 +47,6 @@ #include "../../runloop.h" #include "../../verbosity.h" -#include "../font_driver.h" #include "../video_context_driver.h" #include "../video_coord_array.h" diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index c1fb356e5f..53c91e564f 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -37,6 +37,8 @@ #include "wiiu_dbg.h" +#include "../font_driver.h" + #define _X 0x00 #define _Y 0x01 #define _Z 0x02 diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index da74eac58b..8bf7f146b7 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -26,6 +26,8 @@ #include "../../config.h" #endif +#include "../font_driver.h" + #include "../../driver.h" #include "../../runloop.h" diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index 31bf833df0..042d23f605 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -32,6 +32,8 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../common/x11_common.h" typedef struct xshm diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 463e1f28c2..734de98dc5 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -38,10 +38,11 @@ #include "../../menu/menu_driver.h" #endif +#include "../font_driver.h" + #include "../../configuration.h" #include "../../frontend/frontend_driver.h" #include "../../verbosity.h" -#include "../font_driver.h" #include "../common/x11_common.h" From 7cce305c06079d1e1cfadbe492be2ea6e40c1c95 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 17:48:03 +0100 Subject: [PATCH 246/427] Add header for sdl_gfx.c --- gfx/drivers/sdl_gfx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index f4cb032517..402ae86278 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -39,6 +39,7 @@ #include "SDL_syswm.h" #include "../font_driver.h" +#include "../video_driver.h" #include "../../configuration.h" #include "../../runloop.h" From 6c108a8d271a604c61524eb10279946d5df38021 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 17:58:00 +0100 Subject: [PATCH 247/427] Shows titlebar text again with X11 --- gfx/common/x11_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 2ed94fc1d7..a8300953f0 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -722,7 +722,7 @@ void x11_update_title(void *data, video_frame_info_t *video_info) video_driver_get_window_title(title, sizeof(title)); - if (title[0] && video_info->monitor_fps_enable) + if (title[0]) XStoreName(g_x11_dpy, g_x11_win, title); } From 849315e844ebd7ca3865087ca1e9bd57d81bd01e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 18:07:01 +0100 Subject: [PATCH 248/427] Prevent some minor computations in video_monitor_get_fps --- gfx/video_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index e3d3bc9ade..7ecb2ca023 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2037,9 +2037,6 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) { char frames_text[64]; - last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); - curr_time = new_time; - fill_pathname_noext(video_driver_window_title, video_driver_title_buf, " || ", @@ -2047,6 +2044,7 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) if (video_info->fps_show) { + last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); snprintf(video_info->fps_text, sizeof(video_info->fps_text), " FPS: %6.1f || ", last_fps); @@ -2055,6 +2053,8 @@ static bool video_monitor_get_fps(video_frame_info_t *video_info) sizeof(video_driver_window_title)); } + curr_time = new_time; + strlcat(video_driver_window_title, "Frames: ", sizeof(video_driver_window_title)); From c0e55cba37f69cf3ef123a8566b62c4d0b9539bd Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 19 Jan 2017 17:51:22 +0000 Subject: [PATCH 249/427] window title fix for SDL --- gfx/drivers/sdl_gfx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 402ae86278..422a0688ac 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -341,10 +341,15 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, { static struct retro_perf_counter sdl_scale = {0}; sdl_video_t *vid = (sdl_video_t*)data; + char title[128]; if (!frame) return true; + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + if (SDL_MUSTLOCK(vid->screen)) SDL_LockSurface(vid->screen); @@ -377,8 +382,8 @@ static bool sdl_gfx_frame(void *data, const void *frame, unsigned width, if (SDL_MUSTLOCK(vid->screen)) SDL_UnlockSurface(vid->screen); - if (video_info->monitor_fps_enable) - SDL_WM_SetCaption(video_info->window_text, NULL); + if (title[0]) + SDL_WM_SetCaption(title, NULL); SDL_Flip(vid->screen); From a54ea9ad88ad2598d5ffae07d0c60122da4c658d Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 19 Jan 2017 18:08:39 +0000 Subject: [PATCH 250/427] show titlebar again for remaining drivers --- gfx/drivers/sdl2_gfx.c | 14 +++++--------- gfx/drivers/xvideo.c | 14 ++++---------- gfx/drivers_context/cocoa_gl_ctx.m | 2 +- gfx/drivers_context/d3d_ctx.cpp | 2 +- gfx/drivers_context/gdi_ctx.cpp | 14 +++++--------- gfx/drivers_context/sdl_gl_ctx.c | 13 +++++-------- gfx/drivers_context/wayland_ctx.c | 2 +- gfx/drivers_context/wgl_ctx.cpp | 2 +- 8 files changed, 23 insertions(+), 40 deletions(-) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index d4cc2c439f..313b7bb044 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -502,6 +502,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, unsigned pitch, const char *msg, video_frame_info_t *video_info) { sdl2_video_t *vid = (sdl2_video_t*)data; + char title[128]; if (vid->should_resize) sdl_refresh_viewport(vid); @@ -534,17 +535,12 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, SDL_RenderPresent(vid->renderer); - if (video_info->monitor_fps_enable) - { - char title[128]; + title[0] = '\0'; - title[0] = '\0'; + video_driver_get_window_title(title, sizeof(title)); - video_driver_get_window_title(title, sizeof(title)); - - if (title[0]) - SDL_SetWindowTitle(vid->window, title); - } + if (title[0]) + SDL_SetWindowTitle(vid->window, title); return true; } diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 734de98dc5..a70f8f8771 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -423,6 +423,7 @@ static void *xv_init(const video_info_t *video, XWindowAttributes target; video_frame_info_t video_info; char buf[128] = {0}; + char title[128] = {0}; XSetWindowAttributes attributes = {0}; XVisualInfo visualtemplate = {0}; unsigned width = 0; @@ -539,17 +540,10 @@ static void *xv_init(const video_info_t *video, video_driver_build_info(&video_info); - if (video_info.monitor_fps_enable) - { - char title[128]; + video_driver_get_window_title(title, sizeof(title)); - title[0] = '\0'; - - video_driver_get_window_title(title, sizeof(title)); - - if (title[0]) - XStoreName(g_x11_dpy, g_x11_win, title); - } + if (title[0]) + XStoreName(g_x11_dpy, g_x11_win, title); x11_set_window_attr(g_x11_dpy, g_x11_win); diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index e3a49f8ab3..5a26887b66 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -424,7 +424,7 @@ static void cocoagl_gfx_ctx_update_title(void *data, video_frame_info_t *video_i view.data = (CocoaView*)nsview_get_ptr(); - if (window && video_info->monitor_fps_enable) + if (window) { char title[128]; diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 98f65be158..473fcddafa 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -101,7 +101,7 @@ static void gfx_ctx_d3d_update_title(void *data, video_frame_info_t *video_info) #else const ui_window_t *window = ui_companion_driver_get_window_ptr(); - if (window && video_info->monitor_fps_enable) + if (window) { char title[128]; diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index dea9050840..1bf674b2d6 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -89,18 +89,14 @@ static bool gfx_ctx_gdi_set_resize(void *data, static void gfx_ctx_gdi_update_window_title(void *data, video_frame_info_t *video_info) { const ui_window_t *window = ui_companion_driver_get_window_ptr(); + char title[128]; - if (window && video_info->monitor_fps_enable) - { - char title[128]; + title[0] = '\0'; - title[0] = '\0'; + video_driver_get_window_title(title, sizeof(title)); - video_driver_get_window_title(title, sizeof(title)); - - if (title[0]) - window->set_title(&main_window, title); - } + if (window && title[0]) + window->set_title(&main_window, title); } static void gfx_ctx_gdi_get_video_size(void *data, diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 8b1847e44c..57191042fd 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -274,18 +274,15 @@ static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) video_driver_get_window_title(title, sizeof(title)); - if (video_info->monitor_fps_enable) - { #ifdef HAVE_SDL2 - gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; + gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; - if (sdl && title[0]) - SDL_SetWindowTitle(sdl->g_win, title); + if (sdl && title[0]) + SDL_SetWindowTitle(sdl->g_win, title); #else - if (title[0]) - SDL_WM_SetCaption(title, NULL); + if (title[0]) + SDL_WM_SetCaption(title, NULL); #endif - } } static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 70100b88a3..35c79da765 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -725,7 +725,7 @@ static void gfx_ctx_wl_update_title(void *data, video_frame_info_t *video_info) video_driver_get_window_title(title, sizeof(title)); - if (wl && title[0] && video_info->monitor_fps_enable) + if (wl && title[0]) wl_shell_surface_set_title(wl->shell_surf, title); } diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 18b83ba5c0..d6320c2224 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -389,7 +389,7 @@ static void gfx_ctx_wgl_update_title(void *data, video_frame_info_t *video_info) { const ui_window_t *window = ui_companion_driver_get_window_ptr(); - if (window && video_info->monitor_fps_enable) + if (window) { char title[128]; From 8a6565029808b8a6ef81354c685160c14727726c Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 19 Jan 2017 13:46:04 -0500 Subject: [PATCH 251/427] Windows buildfix --- gfx/drivers_font/d3d_w32_font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_font/d3d_w32_font.cpp b/gfx/drivers_font/d3d_w32_font.cpp index 593dee0bff..d4639ac5d7 100644 --- a/gfx/drivers_font/d3d_w32_font.cpp +++ b/gfx/drivers_font/d3d_w32_font.cpp @@ -93,7 +93,7 @@ static void d3dfonts_w32_free_font(void *data) d3dfonts = NULL; } -static void d3dfonts_w32_render_msg(void *data, const char *msg, +static void d3dfonts_w32_render_msg(video_frame_info_t *video_info, void *data, const char *msg, const void *userdata) { const struct font_params *params = (const struct font_params*)userdata; From 917b369df8e5fed881355423a040f42abbede0ad Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Thu, 19 Jan 2017 20:08:34 +0100 Subject: [PATCH 252/427] Changed some texts and added some translations for the videosettings --- intl/msg_hash_de.h | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 171dff7688..3987b3779f 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -197,7 +197,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_FALSE, MSG_HASH(MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, "Maximale Ausführungsgeschwindigkeit") MSG_HASH(MENU_ENUM_LABEL_VALUE_FPS_SHOW, - "Zeige Bildwiederholungsrate") + "Zeige Bildwiederholrate") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE, "Begrenze maximale Ausführungsgeschwindigkeit") MSG_HASH(MENU_ENUM_LABEL_VALUE_FRONTEND_COUNTERS, @@ -617,7 +617,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, MSG_HASH(MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "stdin-Befehle") MSG_HASH(MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, - "Bildschirmschoner aussetzen") + "Bildschirmschoner ausschalten") MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEM_BGM_ENABLE, "Aktiviere System-BGM") MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEM_DIRECTORY, @@ -795,7 +795,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "Automatisches Bildseitenverhältnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, - "Bildseitenverhältnis") + "Video-Seitenverhältnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "Setze schwarze Frames ein") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, @@ -823,7 +823,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_SRGB_DISABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "Bildverzögerung") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN, - "Verwende Vollbildmodus") + "Vollbildmodus") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_GAMMA, "Gamma") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD, @@ -834,12 +834,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC, "Synchronisiere GPU und CPU") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES, "Synchronisiere Frames fest mit GPU") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, + "Maximale Anzahl der Wechselkettenbilder") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_X, "X-Position der OSD-Nachrichten") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_Y, "Y-Position der OSD-Nachrichten") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MONITOR_INDEX, - "Monitor-Index") + "Monitorindex") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, "Aktiviere Aufnahme von Post-Filtern") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE, @@ -892,6 +894,10 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_VI_WIDTH, "Kalibriere VI-Bildbreite") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC, "Vertikale Synchronisation (VSync)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT, + "Fensterhöhe") +MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH, + "Fensterbreite") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN, "Unechter Vollbild-Modus (Windowed Fullscreen)") MSG_HASH(MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, @@ -928,6 +934,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "Ändere Treiber für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, "Ändere die Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") // This does not sound like a correct sentence. Suggestions are appreciated. +MSG_HASH(MENU_ENUM_SUBLABEL_FPS_SHOW, + "Zeigt die aktuelle Bildwiederholrate auf dem Bildschirm an.") MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -960,6 +968,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, "Ändere die Einstellungen der Errungenschaften.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVING_SETTINGS, "Ändere die Einstellungen der Spielstände.") +MSG_HASH(MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE, + "Haltet dein System davon ab den Bildschirmschoner zu aktivieren.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, "Ändere die Einstellungen der Benutzeroberfläche.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, @@ -968,8 +978,28 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, + "Hartsynchronisierung des CPU und der GPU. Reduziert Latenz, braucht aber mehr Leistung.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES, + "Zwingt den Videotreiber explizit einen bestimmten Puffer zu verwenden.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MONITOR_INDEX, + "Wählt den Monitor aus welcher RetroArch anzeigen soll.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE, + "Vertikale Bildwiederholrate des Monitors. " + "Wird verwendet um die passende Audioinputrate zu berechnen. " + "WICHTIG: Diese Option wird ignoriert wenn du 'Threaded Video' aktiviert hast.") // TODO: Any way to inject the reference in the .h file? +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, + "Die genau geschätzte Bildwiederholrate des Monitors in Hz.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, "Einstellungen zur Videoausgabe.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_THREADED, + "Verbessert die Leistung, führt aber zu grösserer Latenz und Videoproblemen. " + "Verwende dies nur wenn du sonst die gewünschte Leistung erbringst.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_VSYNC, + "Synchronisiert den Video-Output der Grafikkarte zu der Bildwiederholrate des Monitors. Empfohlen.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE, + "Setzt die Fenstergrösse relativ zu der Core-Fenstergrösse. " + "Alternativ kannst du die Fenstergrösse weiter unten setzten für eine konstante Grösse.") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK, "Zurück") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_CONFIRM, From f4020aa011a8365934ed2ef18798190f9c383fa7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:28:00 +0100 Subject: [PATCH 253/427] (Xbox 360) Buildfixes --- libretro-common/include/compat/intrinsics.h | 2 +- menu/drivers/xui.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro-common/include/compat/intrinsics.h b/libretro-common/include/compat/intrinsics.h index 0601dffadc..128f9f6d38 100644 --- a/libretro-common/include/compat/intrinsics.h +++ b/libretro-common/include/compat/intrinsics.h @@ -30,7 +30,7 @@ #include #include -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(_XBOX) #if (_MSC_VER > 1310) #include #endif diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index 909efd21e8..d4bf4e8f51 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -43,7 +43,7 @@ #include "../../runloop.h" -#include "../../gfx/d3d/d3d.h" +#include "../../gfx/drivers/d3d.h" #define XUI_CONTROL_NAVIGATE_OK (XUI_CONTROL_NAVIGATE_RIGHT + 1) From fd8cdc389f57afc9a6c4985f6654cbc4d74fc1a1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:31:33 +0100 Subject: [PATCH 254/427] (Xbox 360) More buildfixes --- gfx/drivers_shader/shader_hlsl.c | 2 +- menu/drivers/xui.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 6f8e471bb9..249f14d7a7 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -23,7 +23,7 @@ #include "shader_hlsl.h" #include "../video_shader_parse.h" -#include "../d3d/d3d.h" +#include "../drivers/d3d.h" #include "../../managers/state_manager.h" #include "../drivers/d3d_shaders/opaque.hlsl.d3d9.h" diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index d4bf4e8f51..f4a149ce24 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -41,6 +41,7 @@ #include "../../gfx/video_context_driver.h" +#include "../../configuration.h" #include "../../runloop.h" #include "../../gfx/drivers/d3d.h" From 23afaa879978128944d1eb5b827e43ed7ec0f2dd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:34:07 +0100 Subject: [PATCH 255/427] (Xbox 360) Buildfixes --- gfx/drivers_font/xdk360_fonts.cpp | 2 +- menu/drivers/xui.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_font/xdk360_fonts.cpp b/gfx/drivers_font/xdk360_fonts.cpp index 2e7114f28c..e206d35512 100644 --- a/gfx/drivers_font/xdk360_fonts.cpp +++ b/gfx/drivers_font/xdk360_fonts.cpp @@ -18,7 +18,7 @@ #include -#include "../d3d/d3d.h" +#include "../drivers/d3d.h" #include "../font_driver.h" #include "../drivers/d3d_shaders/font.hlsl.d3d9.h" diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index f4a149ce24..f386f4b484 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -39,6 +39,7 @@ #include "../menu_setting.h" #include "../menu_display.h" +#include "../../gfx/video_driver.h" #include "../../gfx/video_context_driver.h" #include "../../configuration.h" From 0b8037d89381a85809f88a961ffe6589a42e02ff Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:35:23 +0100 Subject: [PATCH 256/427] (360) Fix typo --- gfx/drivers/d3d_renderchains/render_chain_xdk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp b/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp index cea5814bc1..8e42fd6393 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp +++ b/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp @@ -59,7 +59,7 @@ static void renderchain_set_mvp(void *data, unsigned vp_width, mvp.data = d3d; mvp.matrix = NULL; - video_shadser_driver_set_mvp(mvp); + video_shader_driver_set_mvp(mvp); #elif defined(HAVE_D3D8) D3DXMATRIX p_out, p_rotate, mat; D3DXMatrixOrthoOffCenterLH(&mat, 0, vp_width, vp_height, 0, 0.0f, 1.0f); From 7c652932c87080ad5c1875237d9f6767c8ba6148 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:36:59 +0100 Subject: [PATCH 257/427] (360) More buildfixes --- menu/drivers/xui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index f386f4b484..b62ba8d5bf 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -38,6 +38,7 @@ #include "../menu_navigation.h" #include "../menu_setting.h" #include "../menu_display.h" +#include "../widgets/menu_input_dialog.h" #include "../../gfx/video_driver.h" #include "../../gfx/video_context_driver.h" @@ -594,7 +595,7 @@ static void xui_render(void *data) const char *label = menu_input_dialog_get_label_buffer(); snprintf(msg, sizeof(msg), "%s\n%s", label, str); - xui_render_messagebox(msg); + xui_render_messagebox(NULL, msg); } } From b4f88f142028ab1f18bc39ad3bbc50ac2ccf3a3a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:45:01 +0100 Subject: [PATCH 258/427] (XUI) Buildfix --- menu/drivers/xui.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index b62ba8d5bf..29ea9eed8b 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -66,7 +66,7 @@ HXUIOBJ m_background; HXUIOBJ m_back; HXUIOBJ root_menu; HXUIOBJ current_menu; -static msg_queue_t *xui_msg_queue; +static msg_queue_t *xui_msg_queue = NULL; class CRetroArch : public CXuiModule { @@ -599,7 +599,8 @@ static void xui_render(void *data) } } -static void xui_populate_entries(const char *path, +static void xui_populate_entries(void *data, + const char *path, const char *label, unsigned i) { size_t selection; @@ -648,7 +649,8 @@ static void xui_list_insert(void *data, XuiListSetText(m_menulist, list_size, buf); } -static void xui_list_free(file_list_t *list, size_t idx, +static void xui_list_free( + file_list_t *list, size_t idx, size_t list_size) { int x = XuiListGetItemCount( m_menulist ); From 539728b3f298f5fb96bc5e6b1a29d6e71739f9a0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:47:34 +0100 Subject: [PATCH 259/427] (XUI) Style nits --- menu/drivers/xui.cpp | 60 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index 29ea9eed8b..39b73f22b7 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -163,7 +163,7 @@ HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) if (XuiHandleIsValid(m_menutitlebottom)) { - char str[PATH_MAX_LENGTH] = {0}; + char str[PATH_MAX_LENGTH] = {0}; if (menu_entries_get_core_title(str, sizeof(str)) == 0) { @@ -295,7 +295,7 @@ static void* xui_init(void **userdata) video_info.rgb32 = false; d3d_make_d3dpp(d3d, &video_info, &d3dpp); - + hr = app.InitShared(d3d->dev, &d3dpp, (PFN_XUITEXTURELOADER)XuiTextureLoader); @@ -344,7 +344,7 @@ static void* xui_init(void **userdata) } video_driver_set_texture_frame(NULL, - true, 0, 0, 1.0f); + true, 0, 0, 1.0f); xui_msg_queue = msg_queue_new(16); @@ -374,7 +374,7 @@ static void xui_render_message(const char *msg) if (!d3d) return; - + list = string_split(msg, "\n"); if (!list) @@ -411,7 +411,7 @@ static void xui_frame(void *data, video_frame_info_t *video_info) const char *message = NULL; D3DVIEWPORT vp_full = {0}; d3d_video_t *d3d = (d3d_video_t*)video_driver_get_ptr(false); - + if (!d3d) return; @@ -458,9 +458,9 @@ static void blit_line(int x, int y, const char *message, bool green) static void xui_render_background(void) { if (menu_display_libretro_running()) - XuiElementSetShow(m_background, FALSE); - else - XuiElementSetShow(m_background, TRUE); + XuiElementSetShow(m_background, FALSE); + else + XuiElementSetShow(m_background, TRUE); } static void xui_render_messagebox(void *data, const char *message) @@ -528,11 +528,11 @@ static void xui_set_list_text(int index, const wchar_t* leftText, static void xui_render(void *data) { - size_t end, i, selection; - char title[PATH_MAX_LENGTH] = {0}; - const char *dir = NULL; + size_t end, i, selection; + char title[PATH_MAX_LENGTH] = {0}; + const char *dir = NULL; const char *label = NULL; - unsigned menu_type = 0; + unsigned menu_type = 0; uint64_t *frame_count = video_driver_get_frame_count_ptr(); unsigned fb_width = menu_display_get_width(); bool msg_force = menu_display_get_msg_force(); @@ -542,33 +542,33 @@ static void xui_render(void *data) && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !msg_force ) - return; + return; menu_display_unset_framebuffer_dirty_flag(); menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL); - xui_render_background(); + xui_render_background(); - if (XuiHandleIsValid(m_menutitle)) - { + if (XuiHandleIsValid(m_menutitle)) + { menu_entries_get_title(title, sizeof(title)); - mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t)); - XuiTextElementSetText(m_menutitle, strw_buffer); - menu_animation_ticker_str(title, RXUI_TERM_WIDTH(fb_width) - 3, + mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t)); + XuiTextElementSetText(m_menutitle, strw_buffer); + menu_animation_ticker_str(title, RXUI_TERM_WIDTH(fb_width) - 3, (unsigned int)*frame_count / 15, title, true); - } + } - if (XuiHandleIsValid(m_menutitle)) - { + if (XuiHandleIsValid(m_menutitle)) + { if (menu_entries_get_core_title(title, sizeof(title)) == 0) { mbstowcs(strw_buffer, title, sizeof(strw_buffer) / sizeof(wchar_t)); XuiTextElementSetText(m_menutitlebottom, strw_buffer); } - } + } - end = menu_entries_get_end(); - for (i = 0; i < end; i++) + end = menu_entries_get_end(); + for (i = 0; i < end; i++) { char entry_path[PATH_MAX_LENGTH] = {0}; char entry_value[PATH_MAX_LENGTH] = {0}; @@ -586,17 +586,17 @@ static void xui_render(void *data) if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection)) return; - XuiListSetCurSelVisible(m_menulist, selection); + XuiListSetCurSelVisible(m_menulist, selection); if (menu_input_dialog_get_display_kb()) - { - char msg[1024] = {0}; + { + char msg[1024] = {0}; const char *str = menu_input_dialog_get_buffer(); const char *label = menu_input_dialog_get_label_buffer(); snprintf(msg, sizeof(msg), "%s\n%s", label, str); - xui_render_messagebox(NULL, msg); - } + xui_render_messagebox(NULL, msg); + } } static void xui_populate_entries(void *data, From 98f0422b200de976f57d95409f8670cc597fcc39 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:50:00 +0100 Subject: [PATCH 260/427] (HLSL) Fix typo --- gfx/drivers_shader/shader_hlsl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 249f14d7a7..3524545973 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -304,7 +304,7 @@ static bool hlsl_load_plain(hlsl_shader_data_t *hlsl, void *data, const char *pa path, sizeof(hlsl->cg_shader->pass[0].source.path)); hlsl->d3d = (d3d_video_t*)data; - if (!hlsl_compile_program(hlsl, data, 1, &hlsl->prg[1], &progarm_info)) + if (!hlsl_compile_program(hlsl, data, 1, &hlsl->prg[1], &program_info)) return false; } else From 057af3c31083d44789dc608987ed2ede7b72a24c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:53:27 +0100 Subject: [PATCH 261/427] (360) Another buildfix --- frontend/drivers/platform_xdk.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/drivers/platform_xdk.cpp b/frontend/drivers/platform_xdk.cpp index 8d996136b3..fe3e88bd86 100644 --- a/frontend/drivers/platform_xdk.cpp +++ b/frontend/drivers/platform_xdk.cpp @@ -1028,7 +1028,8 @@ static HRESULT xbox_io_mount(const char* szDrive, char* szDevice) STRING DeviceName, LinkName; char szDestinationDrive[PATH_MAX_LENGTH]; - snprintf(szDestinationDrive, sizeof(szDestinationDrive), PATH_MAX_LENGTH, "\\??\\%s", szDrive); + snprintf(szDestinationDrive, sizeof(szDestinationDrive), + "\\??\\%s", szDrive); RtlInitAnsiString(&DeviceName, szDevice); RtlInitAnsiString(&LinkName, (CHAR)szDestinationDrive); ObDeleteSymbolicLink(&LinkName); From 0edbf8d5c910ba405c783937001709b3cd591158 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 20:56:07 +0100 Subject: [PATCH 262/427] (shader_hlslc.) Another buildfix --- gfx/drivers_shader/shader_hlsl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 3524545973..eb739f396c 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -534,6 +534,7 @@ const shader_backend_t hlsl_backend = { hlsl_deinit, hlsl_set_params, hlsl_set_uniform_parameter, + NULL, /* compile_program */ hlsl_use, hlsl_num, hlsl_filter_type, From 861ad8b3ab790555f00366c529699c6b02101ed1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:05:04 +0100 Subject: [PATCH 263/427] (XDK360) Another buildfix --- gfx/drivers_shader/shader_hlsl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index eb739f396c..4f91c5d757 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -274,7 +274,7 @@ static bool hlsl_load_shader(hlsl_shader_data_t *hlsl, hlsl->d3d = (d3d_video_t*)data; - if (!hlsl_compile_program(hlsl, data, i + 1, &hlsl->prg[i + 1], &program_info)) + if (!hlsl_compile_program(hlsl, i + 1, &hlsl->prg[i + 1], &program_info)) return false; return true; @@ -304,7 +304,7 @@ static bool hlsl_load_plain(hlsl_shader_data_t *hlsl, void *data, const char *pa path, sizeof(hlsl->cg_shader->pass[0].source.path)); hlsl->d3d = (d3d_video_t*)data; - if (!hlsl_compile_program(hlsl, data, 1, &hlsl->prg[1], &program_info)) + if (!hlsl_compile_program(hlsl, 1, &hlsl->prg[1], &program_info)) return false; } else From 9e063318dac335737a672b3a49cf649122815199 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:09:44 +0100 Subject: [PATCH 264/427] (XDK360) Fix --- frontend/drivers/platform_xdk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/drivers/platform_xdk.cpp b/frontend/drivers/platform_xdk.cpp index fe3e88bd86..0df8ce99f0 100644 --- a/frontend/drivers/platform_xdk.cpp +++ b/frontend/drivers/platform_xdk.cpp @@ -1031,7 +1031,7 @@ static HRESULT xbox_io_mount(const char* szDrive, char* szDevice) snprintf(szDestinationDrive, sizeof(szDestinationDrive), "\\??\\%s", szDrive); RtlInitAnsiString(&DeviceName, szDevice); - RtlInitAnsiString(&LinkName, (CHAR)szDestinationDrive); + RtlInitAnsiString(&LinkName, (PCHAR)szDestinationDrive); ObDeleteSymbolicLink(&LinkName); return (HRESULT)ObCreateSymbolicLink(&LinkName, &DeviceName); } From 3ab4d817221d6d06505d673ad8e10094d76beab2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:10:46 +0100 Subject: [PATCH 265/427] (XDK) Fix --- menu/drivers/xui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index 39b73f22b7..8d3274454e 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -676,7 +676,7 @@ static void xui_list_set_selection(void *data, file_list_t *list) file_list_get_directory_ptr(list)); } -static int xui_environ(enum menu_environ_cb type, void *data) +static int xui_environ(enum menu_environ_cb type, void *data, void *userdata) { switch (type) { From 47b6efd2261a9aae02f4cd2100050db93311d11f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:16:22 +0100 Subject: [PATCH 266/427] (XUI) Buildfix --- menu/drivers/xui.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index 8d3274454e..a92d79344c 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -696,10 +696,10 @@ menu_ctx_driver_t menu_ctx_xui = { xui_frame, xui_init, xui_free, - NULL, - NULL, + NULL, /* context_reset */ + NULL, /* context_destroy */ xui_populate_entries, - NULL, + NULL, /* toggle */ xui_navigation_clear, xui_navigation_set_visible, xui_navigation_set_visible, @@ -709,19 +709,23 @@ menu_ctx_driver_t menu_ctx_xui = { xui_navigation_alphabet, generic_menu_init_list, xui_list_insert, + NULL, /* list_prepend */ xui_list_free, xui_list_clear, - NULL, - NULL, - NULL, - NULL, - NULL, + NULL, /* list_cache */ + NULL, /* list_push */ + NULL, /* list_get_selection */ + NULL, /* list_get_size */ + NULL, /* list_get_entry */ xui_list_set_selection, - NULL, - NULL, + NULL, /* bind_init */ + NULL, /* load_image */ "xui", xui_environ, - NULL, - NULL, - NULL + NULL, /* pointer_tap */ + NULL, /* update_thumbnail_path */ + NULL, /* update_thumbnail_image */ + NULL, /* osk_ptr_at_pos */ + NULL, /* update_savestate_thumbnail_path */ + NULL /* update_savestate_thumbnail_image */ }; From 28195ee517e61301324a2accdcb077e57071b83d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:20:05 +0100 Subject: [PATCH 267/427] (HLSL) Buildfixes --- gfx/drivers_shader/shader_hlsl.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 4f91c5d757..541896a22b 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -63,8 +63,8 @@ struct hlsl_shader_data void hlsl_set_proj_matrix(void *data, XMMATRIX rotation_value) { hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)data; - if (hlsl_data) - hlsl_data->prg[hlsl_data->active_idx].mvp_val = rotation_value; + if (hlsl) + hlsl->prg[hlsl_data->active_idx].mvp_val = rotation_value; } static void hlsl_set_uniform_parameter( @@ -126,12 +126,12 @@ static void hlsl_set_params(void *data, void *shader_data, const void *_feedback_info, const void *_fbo_info, unsigned fbo_info_cnt) { - d3d_video_t *d3d = (d3d_video_t*)data; - LPDIRECT3DDEVICE d3d_device_ptr = (LPDIRECT3DDEVICE)d3d->dev; - const struct video_tex_info *info = (const struct video_tex_info*)_info; + d3d_video_t *d3d = (d3d_video_t*)data; + LPDIRECT3DDEVICE d3d_device_ptr = (LPDIRECT3DDEVICE)d3d->dev; + const struct video_tex_info *info = (const struct video_tex_info*)_info; const struct video_tex_info *prev_info = (const struct video_tex_info*)_prev_info; - const struct video_tex_info *fbo_info = (const struct video_tex_info*)_fbo_info; - hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)shader_data; + const struct video_tex_info *fbo_info = (const struct video_tex_info*)_fbo_info; + hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)shader_data; if (!hlsl) return; @@ -165,15 +165,15 @@ static bool hlsl_compile_program( void *program_data, struct shader_program_info *program_info) { - hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)data; - d3d_video_t *d3d = (d3d_video_t*)hlsl->d3d; - struct shader_program_hlsl_data *program = (struct shader_program_hlsl_data*)program_data; - LPDIRECT3DDEVICE d3d_device_ptr = (LPDIRECT3DDEVICE)d3d->dev; HRESULT ret, ret_fp, ret_vp; - ID3DXBuffer *listing_f = NULL; - ID3DXBuffer *listing_v = NULL; - ID3DXBuffer *code_f = NULL; - ID3DXBuffer *code_v = NULL; + hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)data; + d3d_video_t *d3d = (d3d_video_t*)hlsl->d3d; + struct shader_program_hlsl_data *program = (struct shader_program_hlsl_data*)program_data; + LPDIRECT3DDEVICE d3d_device_ptr = (LPDIRECT3DDEVICE)d3d->dev; + ID3DXBuffer *listing_f = NULL; + ID3DXBuffer *listing_v = NULL; + ID3DXBuffer *code_f = NULL; + ID3DXBuffer *code_v = NULL; if (!program) program = &hlsl->prg[idx]; From 219a07f70953c3d5b52e08047f31c4ca55a87470 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:21:53 +0100 Subject: [PATCH 268/427] (hlsl) Fix --- gfx/drivers_shader/shader_hlsl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 541896a22b..009a2b6a52 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -64,7 +64,7 @@ void hlsl_set_proj_matrix(void *data, XMMATRIX rotation_value) { hlsl_shader_data_t *hlsl = (hlsl_shader_data_t*)data; if (hlsl) - hlsl->prg[hlsl_data->active_idx].mvp_val = rotation_value; + hlsl->prg[hlsl->active_idx].mvp_val = rotation_value; } static void hlsl_set_uniform_parameter( @@ -454,9 +454,7 @@ static void hlsl_use(void *data, void *shader_data, unsigned idx, bool set_activ if (hlsl_data && hlsl_data->prg[idx].vprg && hlsl_data->prg[idx].fprg) { if (set_active) - { hlsl_data->active_idx = idx; - } d3d_set_vertex_shader(d3dr, idx, hlsl_data->prg[idx].vprg); #ifdef _XBOX From dd2839686b0c105c6295b6ec973867a08a9b693c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 21:37:13 +0100 Subject: [PATCH 269/427] (XMB) Fix OSK --- menu/drivers/xmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 0a46fced2e..3727494d28 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -712,7 +712,7 @@ static void xmb_render_keyboard(xmb_handle_t *xmb, { unsigned i; int ptr_width, ptr_height; - unsigned width = video_info->height; + unsigned width = video_info->width; unsigned height = video_info->height; float dark[16] = { 0.00, 0.00, 0.00, 0.85, From 2f175f1a15285e522bda50d8fe87ba1e29e21954 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 22:03:59 +0100 Subject: [PATCH 270/427] Remove video_driver_get_size call in gfx/drivers_font --- gfx/drivers_font/caca_font.c | 3 ++- gfx/drivers_font/ctr_font.c | 2 +- gfx/drivers_font/gdi_font.c | 2 +- gfx/drivers_font/gl_raster_font.c | 6 ++---- gfx/drivers_font/vita2d_font.c | 3 ++- gfx/drivers_font/vulkan_raster_font.c | 3 ++- gfx/font_driver.c | 4 ++-- gfx/font_driver.h | 4 ++-- menu/drivers/materialui.c | 4 ++-- menu/drivers/xmb.c | 4 ++-- menu/drivers/zarch.c | 3 ++- menu/menu_display.c | 5 +++-- menu/menu_display.h | 2 +- 13 files changed, 24 insertions(+), 21 deletions(-) diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index 68ea5c0475..555d28fdc7 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -115,7 +115,8 @@ static void caca_render_msg(video_frame_info_t *video_info, caca_refresh_display(*font->caca->caca_display); } -static void caca_font_flush_block(void* data) +static void caca_font_flush_block(unsigned width, unsigned height, + void* data) { (void)data; } diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 17462bc3e3..f7f13e4e43 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -438,7 +438,7 @@ static const struct font_glyph* ctr_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void ctr_font_flush_block(void* data) +static void ctr_font_flush_block(unsigned width, unsigned height, void* data) { (void)data; } diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index 592e208ba7..b9244a337c 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -121,7 +121,7 @@ static void gdi_render_msg( ReleaseDC(hwnd, hdc); } -static void gdi_font_flush_block(void* data) +static void gdi_font_flush_block(unsigned width, unsigned height, void* data) { (void)data; } diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index 06e181551f..84e85c323c 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -518,17 +518,15 @@ static const struct font_glyph *gl_raster_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void gl_raster_font_flush_block(void *data) +static void gl_raster_font_flush_block(unsigned width, unsigned height, + void *data) { - unsigned width, height; gl_raster_t *font = (gl_raster_t*)data; video_font_raster_block_t *block = font ? font->block : NULL; if (!font || !block || !block->carr.coords.vertices) return; - video_driver_get_size(&width, &height); - gl_raster_font_setup_viewport(width, height, font, block->fullscreen); gl_raster_font_draw_vertices(font, (video_coords_t*)&block->carr.coords); gl_raster_font_restore_viewport(width, height, font->gl, block->fullscreen); diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index b8bc7a5045..30781f160d 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -344,7 +344,8 @@ static const struct font_glyph *vita2d_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void vita2d_font_flush_block(void *data) +static void vita2d_font_flush_block(unsigned width, unsigned height, + void *data) { (void)data; } diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index d94708811b..56ad623432 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -359,7 +359,8 @@ static const struct font_glyph *vulkan_raster_font_get_glyph( return font->font_driver->get_glyph((void*)font->font_driver, code); } -static void vulkan_raster_font_flush_block(void *data) +static void vulkan_raster_font_flush_block(unsigned width, unsigned height, + void *data) { (void)data; } diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 58c2df00b3..b0b74068fd 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -364,11 +364,11 @@ void font_driver_bind_block(void *font_data, void *block) font->renderer->bind_block(font->renderer_data, block); } -void font_driver_flush(void *font_data) +void font_driver_flush(unsigned width, unsigned height, void *font_data) { font_data_t *font = (font_data_t*)(font_data ? font_data : video_font_driver); if (font && font->renderer && font->renderer->flush) - font->renderer->flush(font->renderer_data); + font->renderer->flush(width, height, font->renderer_data); } int font_driver_get_message_width(void *font_data, diff --git a/gfx/font_driver.h b/gfx/font_driver.h index c78e591ad5..65bd028965 100644 --- a/gfx/font_driver.h +++ b/gfx/font_driver.h @@ -110,7 +110,7 @@ typedef struct font_renderer const struct font_glyph *(*get_glyph)(void *data, uint32_t code); void (*bind_block)(void *data, void *block); - void (*flush)(void *data); + void (*flush)(unsigned width, unsigned height, void *data); int (*get_message_width)(void *data, const char *msg, unsigned msg_len_full, float scale); } font_renderer_t; @@ -151,7 +151,7 @@ void font_driver_bind_block(void *font_data, void *block); int font_driver_get_message_width(void *font_data, const char *msg, unsigned len, float scale); -void font_driver_flush(void *font_data); +void font_driver_flush(unsigned width, unsigned height, void *font_data); void font_driver_free(void *font_data); diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index cc0a7897c9..b3beea073d 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1300,8 +1300,8 @@ static void mui_frame(void *data, video_frame_info_t *video_info) &active_tab_marker_color[0] ); - menu_display_font_flush_block(mui->font); - menu_display_font_flush_block(mui->font2); + menu_display_font_flush_block(video_info->width, video_info->height, mui->font); + menu_display_font_flush_block(video_info->width, video_info->height, mui->font2); menu_animation_ctl(MENU_ANIMATION_CTL_SET_ACTIVE, NULL); /* header */ diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 3727494d28..109c65f068 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2839,8 +2839,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) width, height); - menu_display_font_flush_block(xmb->font); - menu_display_font_flush_block(xmb->font2); + menu_display_font_flush_block(video_info->width, video_info->height, xmb->font); + menu_display_font_flush_block(video_info->width, video_info->height, xmb->font2); if (xmb->savestate_thumbnail) xmb_draw_thumbnail(menu_disp_info, diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 1b967fd0d2..2581eb7a6f 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -982,7 +982,8 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) zui->rendering = false; - menu_display_font_flush_block((font_data_t*)zui->font); + menu_display_font_flush_block(video_info->width, video_info->height, + (font_data_t*)zui->font); menu_display_unset_viewport(video_info->width, video_info->height); } diff --git a/menu/menu_display.c b/menu/menu_display.c index ca003a4f46..38171cdd5f 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -240,9 +240,10 @@ void menu_display_font_bind_block(font_data_t *font, void *block) font_driver_bind_block(font, block); } -bool menu_display_font_flush_block(font_data_t *font) +bool menu_display_font_flush_block(unsigned width, unsigned height, + font_data_t *font) { - font_driver_flush(font); + font_driver_flush(width, height, font); font_driver_bind_block(font, NULL); return true; } diff --git a/menu/menu_display.h b/menu/menu_display.h index 9bf0bb0ab1..0f4f5a300b 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -200,7 +200,7 @@ void menu_display_blend_end(void); void menu_display_font_free(font_data_t *font); font_data_t *menu_display_font_main_init(menu_display_ctx_font_t *font); void menu_display_font_bind_block(font_data_t *font, void *block); -bool menu_display_font_flush_block(font_data_t *font); +bool menu_display_font_flush_block(unsigned width, unsigned height, font_data_t *font); void menu_display_framebuffer_deinit(void); From bde244645e35e12b71b68cfd3526f4f2a152dc01 Mon Sep 17 00:00:00 2001 From: fr500 Date: Thu, 19 Jan 2017 17:01:50 -0500 Subject: [PATCH 271/427] switch to the new sqlite backend instead of a plain text file --- menu/cbs/menu_cbs_ok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 7cd975c3e1..0a61d3fc03 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3382,7 +3382,7 @@ finish: static int action_ok_push_netplay_refresh_rooms(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - char url [2048] = "http://lobby.libretro.com/registry.lpl"; + char url [2048] = "http://lobby.libretro.com/"; task_push_http_transfer(url, true, NULL, netplay_refresh_rooms_cb, NULL); return 0; } From bc5c2c13f8f3cc0d35f01e740a36a1b5ff9be9ab Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 23:09:50 +0100 Subject: [PATCH 272/427] Remove unused member --- gfx/video_driver.c | 2 +- gfx/video_driver.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 7ecb2ca023..22327d4429 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2151,7 +2151,7 @@ void video_driver_frame(const void *data, unsigned width, video_driver_frame_count++; video_driver_threaded_unlock(); - video_info.monitor_fps_enable = video_monitor_get_fps(&video_info); + video_monitor_get_fps(&video_info); /* Slightly messy code, * but we really need to do processing before blocking on VSync diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 93a3147830..0b745c8380 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -100,7 +100,6 @@ typedef struct video_frame_info bool fullscreen; unsigned monitor_index; bool font_enable; - bool monitor_fps_enable; char fps_text[128]; uint64_t frame_count; From 5b89c852375631736f79be332615c49661f5561a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 23:12:18 +0100 Subject: [PATCH 273/427] Fix performance inefficiency (Coverity) --- gfx/video_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 22327d4429..b6c1a89ce3 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1075,7 +1075,7 @@ void video_driver_set_aspect_ratio_value(float value) static bool video_driver_frame_filter( const void *data, - video_frame_info_t video_info, + video_frame_info_t *video_info, unsigned width, unsigned height, size_t pitch, unsigned *output_width, unsigned *output_height, @@ -1096,7 +1096,7 @@ static bool video_driver_frame_filter( data, width, height, pitch); performance_counter_stop(&softfilter_process); - if (video_info.post_filter_record && recording_data) + if (video_info->post_filter_record && recording_data) recording_dump_frame(video_driver_state_buffer, *output_width, *output_height, *output_pitch); @@ -2168,7 +2168,7 @@ void video_driver_frame(const void *data, unsigned width, recording_dump_frame(data, width, height, pitch); if (data && video_driver_state_filter && - video_driver_frame_filter(data, video_info, width, height, pitch, + video_driver_frame_filter(data, &video_info, width, height, pitch, &output_width, &output_height, &output_pitch)) { data = video_driver_state_buffer; From 913d2362e81db808e906898d00c7523b5b709c22 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Jan 2017 23:22:45 +0100 Subject: [PATCH 274/427] Prevent null pointer dereference --- menu/drivers/rgui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index ba677413b6..1c9ca7a1a5 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -403,7 +403,7 @@ static void rgui_render(void *data) bool msg_force = false; settings_t *settings = config_get_ptr(); rgui_t *rgui = (rgui_t*)data; - uint64_t frame_count = rgui->frame_count; + uint64_t frame_count = rgui ? rgui->frame_count : 0; msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0'; From b8f7d69923583f720fd798f5c9e05c406e53fe6e Mon Sep 17 00:00:00 2001 From: fr500 Date: Thu, 19 Jan 2017 18:11:02 -0500 Subject: [PATCH 275/427] add sublabels --- menu/cbs/menu_cbs_sublabel.c | 24 ++++++++++++++++++++++++ menu/menu_driver.h | 1 + 2 files changed, 25 insertions(+) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 4544e51cfe..b4b22f1c7d 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -21,6 +21,7 @@ #ifdef HAVE_CHEEVOS #include "../../cheevos.h" #endif +#include "../../verbosity.h" #ifndef BIND_ACTION_SUBLABEL #define BIND_ACTION_SUBLABEL(cbs, name) \ @@ -28,6 +29,11 @@ cbs->action_sublabel_ident = #name; #endif +#ifdef HAVE_NETWORKING +#include "../../network/netplay/netplay.h" +#include "../../network/netplay/netplay_discovery.h" +#endif + #define default_sublabel_macro(func_name, lbl) \ static int (func_name)(file_list_t *list, unsigned type, unsigned i, const char *label, const char *path, char *s, size_t len) \ { \ @@ -117,6 +123,8 @@ default_sublabel_macro(action_bind_sublabel_content_history_size, MENU_ default_sublabel_macro(action_bind_sublabel_menu_input_unified_controls, MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS) default_sublabel_macro(action_bind_sublabel_onscreen_notifications_enable, MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE) +/* MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM*/ + static int action_bind_sublabel_cheevos_entry( file_list_t *list, unsigned type, unsigned i, @@ -136,6 +144,19 @@ static int action_bind_sublabel_cheevos_entry( return 0; } +static int action_bind_sublabel_netplay_room( + file_list_t *list, + unsigned type, unsigned i, + const char *label, const char *path, + char *s, size_t len) +{ + if (i < 1) + return 0; + + strlcpy(s, netplay_room_list[i - 1].corename, len); + return 0; +} + static int action_bind_sublabel_generic( file_list_t *list, unsigned type, unsigned i, @@ -233,6 +254,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_entry); break; + case MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_room); + break; case MENU_ENUM_LABEL_CHEEVOS_ENABLE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_enable); break; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 3429cac4f6..15edc1e702 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -50,6 +50,7 @@ RETRO_BEGIN_DECLS #define MENU_SETTINGS_CORE_OPTION_START 0x10000 #define MENU_SETTINGS_PLAYLIST_ASSOCIATION_START 0x20000 #define MENU_SETTINGS_CHEEVOS_START 0x40000 +#define MENU_SETTINGS_NETPLAY_ROOMS_START 0x80000 enum menu_image_type { From 90f0dc994258cd85fcc78f9b00dfa4b81a961bac Mon Sep 17 00:00:00 2001 From: fr500 Date: Thu, 19 Jan 2017 18:14:33 -0500 Subject: [PATCH 276/427] add more info --- menu/cbs/menu_cbs_sublabel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index b4b22f1c7d..6486ca9809 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -153,7 +153,9 @@ static int action_bind_sublabel_netplay_room( if (i < 1) return 0; - strlcpy(s, netplay_room_list[i - 1].corename, len); + snprintf(s,len, "%s - %s\n%s", netplay_room_list[i - 1].corename, + netplay_room_list[i - 1].coreversion, netplay_room_list[i - 1].gamename); + //strlcpy(s, netplay_room_list[i - 1].corename, len); return 0; } From f979ff58a7bfb1957ccd7514188e1843d7d19c3a Mon Sep 17 00:00:00 2001 From: fr500 Date: Thu, 19 Jan 2017 20:39:05 -0500 Subject: [PATCH 277/427] clean this up a bit --- menu/cbs/menu_cbs_sublabel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 6486ca9809..352a801e70 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -153,9 +153,9 @@ static int action_bind_sublabel_netplay_room( if (i < 1) return 0; - snprintf(s,len, "%s - %s\n%s", netplay_room_list[i - 1].corename, - netplay_room_list[i - 1].coreversion, netplay_room_list[i - 1].gamename); - //strlcpy(s, netplay_room_list[i - 1].corename, len); + snprintf(s,len, "Core:%s %s\nGame: %s", + netplay_room_list[i - 1].corename, netplay_room_list[i - 1].coreversion, + netplay_room_list[i - 1].gamename); return 0; } From 930cde21a24c20167a2ea94da9282bd0a20c4c37 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 21:43:46 -0500 Subject: [PATCH 278/427] crc is announced now (for cores that don't have needs_fullpath set) --- menu/cbs/menu_cbs_ok.c | 4 ++-- menu/cbs/menu_cbs_sublabel.c | 5 +++-- network/netplay/netplay_frontend.c | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 0a61d3fc03..9cb41d26ff 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3334,7 +3334,7 @@ finish: netplay_room_list[i].gamecrc = atoi(room_data->elems[j + 6].data); netplay_room_list[i].timestamp = atoi(room_data->elems[j + 7].data); - RARCH_LOG("Room Data: \n" + RARCH_LOG("Room Data: %d\n" "Nickname: %s\n" "Address: %s\n" "Port: %d\n" @@ -3342,7 +3342,7 @@ finish: "Core Version: %s\n" "Game: %s\n" "Game CRC: %d\n" - "Timestamp: %d\n", + "Timestamp: %d\n", room_data->elems[j + 6].data, netplay_room_list[i].nickname, netplay_room_list[i].address, netplay_room_list[i].port, diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 6486ca9809..ff86e30ce9 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -153,8 +153,9 @@ static int action_bind_sublabel_netplay_room( if (i < 1) return 0; - snprintf(s,len, "%s - %s\n%s", netplay_room_list[i - 1].corename, - netplay_room_list[i - 1].coreversion, netplay_room_list[i - 1].gamename); + snprintf(s,len, "%s (%s)\n%s (%08x)", + netplay_room_list[i - 1].corename, netplay_room_list[i - 1].coreversion, + netplay_room_list[i - 1].gamename, netplay_room_list[i - 1].gamecrc); //strlcpy(s, netplay_room_list[i - 1].corename, len); return 0; } diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 1181c0eaab..dca6133334 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -405,6 +405,8 @@ static void netplay_announce() { rarch_system_info_t *system = NULL; settings_t *settings = config_get_ptr(); + uint32_t *content_crc_ptr = NULL; + content_get_crc(&content_crc_ptr); runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); char url [2048] = "http://lobby.libretro.com/?"; @@ -412,10 +414,10 @@ static void netplay_announce() buf[0] = '\0'; snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s&" - "gamename=%s&gamecrc=%08x&port=%d", + "gamename=%s&gamecrc=%d&port=%d", url, settings->username, system->info.library_name, system->info.library_version, - path_basename(path_get(RARCH_PATH_BASENAME)),0, + path_basename(path_get(RARCH_PATH_BASENAME)),*content_crc_ptr, settings->netplay.port); task_push_http_transfer(buf, true, NULL, netplay_announce_cb, NULL); From 8a1fb24fe98c3a228e91fa8950f6ee13ad950040 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 23:21:22 -0500 Subject: [PATCH 279/427] update url --- menu/cbs/menu_cbs_ok.c | 2 +- network/netplay/netplay_frontend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 9cb41d26ff..d4c74f44b1 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3382,7 +3382,7 @@ finish: static int action_ok_push_netplay_refresh_rooms(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - char url [2048] = "http://lobby.libretro.com/"; + char url [2048] = "http://lobby.libretro.com/raw/"; task_push_http_transfer(url, true, NULL, netplay_refresh_rooms_cb, NULL); return 0; } diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index dca6133334..715fec24bf 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -409,7 +409,7 @@ static void netplay_announce() content_get_crc(&content_crc_ptr); runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); - char url [2048] = "http://lobby.libretro.com/?"; + char url [2048] = "http://lobby.libretro.com/raw/?"; char buf [2048]; buf[0] = '\0'; From 8d25b2b0a33bbf2c209d13a232bf9925393467d7 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 23:44:10 -0500 Subject: [PATCH 280/427] add stub connection handler --- menu/cbs/menu_cbs_ok.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d4c74f44b1..8e68d20457 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3115,6 +3115,12 @@ static int action_ok_netplay_lan_scan_list(const char *path, entry_idx, ACTION_OK_DL_NETPLAY_LAN_SCAN_SETTINGS_LIST); } +static int action_ok_netplay_connect_room(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + RARCH_LOG("Connect %s %d\n", netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); + return 0; +} static int action_ok_lakka_services(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -4218,6 +4224,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS: BIND_ACTION_OK(cbs, action_ok_netplay_lan_scan_list); break; + case MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM: + BIND_ACTION_OK(cbs, action_ok_netplay_connect_room); + break; case MENU_ENUM_LABEL_LAKKA_SERVICES: BIND_ACTION_OK(cbs, action_ok_lakka_services); break; From b5357493adca45b04cac135250723e4dded4f378 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 19 Jan 2017 23:53:45 -0500 Subject: [PATCH 281/427] log crc properly --- menu/cbs/menu_cbs_ok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 8e68d20457..2b9883d19f 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3347,7 +3347,7 @@ finish: "Core: %s\n" "Core Version: %s\n" "Game: %s\n" - "Game CRC: %d\n" + "Game CRC: %08x\n" "Timestamp: %d\n", room_data->elems[j + 6].data, netplay_room_list[i].nickname, netplay_room_list[i].address, From 58a47e860a899f0a8a8380ead804f20836b973f0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 14:04:50 +0100 Subject: [PATCH 282/427] Add use_rgba member to video_frame_info_t --- gfx/drivers/gl.c | 4 +--- gfx/video_driver.c | 1 + gfx/video_driver.h | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index aa085d2c73..6f289b4ccd 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -737,13 +737,11 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame, else #endif { - bool use_rgba = video_driver_supports_rgba(); - glPixelStorei(GL_UNPACK_ALIGNMENT, video_pixel_get_alignment(width * gl->base_size)); /* Fallback for GLES devices without GL_BGRA_EXT. */ - if (gl->base_size == 4 && use_rgba) + if (gl->base_size == 4 && video_info->use_rgba) { video_frame_convert_argb8888_to_abgr8888( &gl->scaler, diff --git a/gfx/video_driver.c b/gfx/video_driver.c index b6c1a89ce3..55e6729382 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2279,6 +2279,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->width = video_driver_width; video_info->height = video_driver_height; + video_info->use_rgba = video_driver_supports_rgba(); video_driver_threaded_unlock(); } diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 0b745c8380..b08039dabd 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -111,6 +111,7 @@ typedef struct video_frame_info float font_msg_color_r; float font_msg_color_g; float font_msg_color_b; + bool use_rgba; } video_frame_info_t; /* Optionally implemented interface to poke more From 526072ccdf8c4029c48fa3ed0c5109904f61df3b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 14:25:00 +0100 Subject: [PATCH 283/427] Cut down on menu_display_libretro_running usage --- gfx/video_driver.c | 9 +++++++++ gfx/video_driver.h | 2 ++ menu/drivers/materialui.c | 18 ++++++++---------- menu/drivers/nuklear.c | 2 +- menu/drivers/xmb.c | 8 ++++---- menu/drivers/zarch.c | 6 +++--- menu/menu_display.c | 10 ++++++---- menu/menu_display.h | 9 +++++++-- 8 files changed, 40 insertions(+), 24 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 55e6729382..effc8edecf 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2280,6 +2280,15 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->height = video_driver_height; video_info->use_rgba = video_driver_supports_rgba(); + + video_info->libretro_running = false; +#ifdef HAVE_MENU + video_info->menu_wallpaper_opacity = settings->menu.wallpaper.opacity; + + if (!settings->menu.pause_libretro) + video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL) + && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)); +#endif video_driver_threaded_unlock(); } diff --git a/gfx/video_driver.h b/gfx/video_driver.h index b08039dabd..5dd0e66cfb 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -86,6 +86,7 @@ typedef struct video_info typedef struct video_frame_info { + float menu_wallpaper_opacity; float refresh_rate; bool shared_context; bool black_frame_insertion; @@ -112,6 +113,7 @@ typedef struct video_frame_info float font_msg_color_g; float font_msg_color_b; bool use_rgba; + bool libretro_running; } video_frame_info_t; /* Optionally implemented interface to poke more diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index b3beea073d..6def8f3047 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -924,7 +924,8 @@ static int mui_get_core_title(char *s, size_t len) return 0; } -static void mui_draw_bg(menu_display_ctx_draw_t *draw) +static void mui_draw_bg(menu_display_ctx_draw_t *draw, + video_frame_info_t *video_info) { menu_display_blend_begin(); @@ -933,7 +934,7 @@ static void mui_draw_bg(menu_display_ctx_draw_t *draw) draw->pipeline.id = 0; draw->pipeline.active = false; - menu_display_draw_bg(draw, false); + menu_display_draw_bg(draw, video_info, false); menu_display_draw(draw); menu_display_blend_end(); } @@ -1039,7 +1040,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) uint64_t frame_count = video_info->frame_count; settings_t *settings = config_get_ptr(); bool background_rendered = false; - bool libretro_running = menu_display_libretro_running(); + bool libretro_running = video_info->libretro_running; /* Default is blue theme */ float *header_bg_color = NULL; @@ -1226,10 +1227,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) draw.vertex_count = 4; draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP; - if (!menu_display_libretro_running() && draw.texture) - draw.color = &white_bg[0]; - - mui_draw_bg(&draw); + mui_draw_bg(&draw, video_info); } else { @@ -1252,10 +1250,10 @@ static void mui_frame(void *data, video_frame_info_t *video_info) draw.vertex_count = 4; draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP; - if (!menu_display_libretro_running() && draw.texture) - draw.color = &white_bg[0]; + if (draw.texture) + draw.color = &white_bg[0]; - mui_draw_bg(&draw); + mui_draw_bg(&draw, video_info); /* Restore opacity of transposed white background */ menu_display_set_alpha(white_transp_bg, 0.90); diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 618385a713..77c0020076 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -316,7 +316,7 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info) settings_t *settings = config_get_ptr(); unsigned width = video_info->width; unsigned height = video_info->height; - bool libretro_running = menu_display_libretro_running(); + bool libretro_running = video_info->libretro_running; float white_bg[16] = { 0.98, 0.98, 0.98, 1, 0.98, 0.98, 0.98, 1, diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 109c65f068..7c6c8fc956 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -2424,7 +2424,7 @@ static void xmb_draw_bg( RARCH_LOG("DRAW BG %d %d \n",width,height); #endif - bool running = menu_display_libretro_running(); + bool running = video_info->libretro_running; draw.x = 0; draw.y = 0; @@ -2454,7 +2454,7 @@ static void xmb_draw_bg( else menu_display_set_alpha(draw.color, coord_white[3]); - menu_display_draw_gradient(&draw); + menu_display_draw_gradient(&draw, video_info); draw.pipeline.id = VIDEO_SHADER_MENU_2; @@ -2492,7 +2492,7 @@ static void xmb_draw_bg( menu_display_set_alpha(draw.color, coord_white[3]); if (settings->menu.xmb.menu_color_theme != XMB_THEME_WALLPAPER) - menu_display_draw_gradient(&draw); + menu_display_draw_gradient(&draw, video_info); { bool add_opacity = false; @@ -2505,7 +2505,7 @@ static void xmb_draw_bg( if (settings->menu.xmb.menu_color_theme == XMB_THEME_WALLPAPER) add_opacity = true; - menu_display_draw_bg(&draw, add_opacity); + menu_display_draw_bg(&draw, video_info, add_opacity); } } diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 2581eb7a6f..0d47a9719f 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -970,13 +970,13 @@ static void zarch_frame(void *data, video_frame_info_t *video_info) draw.vertex_count = 4; draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP; - if (!menu_display_libretro_running() && draw.texture) - draw.color = &coord_color2[0]; + if (!video_info->libretro_running && draw.texture) + draw.color = &coord_color2[0]; menu_display_blend_begin(); draw.x = 0; draw.y = 0; - menu_display_draw_bg(&draw, false); + menu_display_draw_bg(&draw, video_info, false); menu_display_draw(&draw); menu_display_blend_end(); diff --git a/menu/menu_display.c b/menu/menu_display.c index 38171cdd5f..025957f8ee 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -495,7 +495,8 @@ void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw) menu_disp->draw_pipeline(draw); } -void menu_display_draw_bg(menu_display_ctx_draw_t *draw, bool add_opacity_to_wallpaper) +void menu_display_draw_bg(menu_display_ctx_draw_t *draw, + video_frame_info_t *video_info, bool add_opacity_to_wallpaper) { static struct video_coords coords; const float *new_vertex = NULL; @@ -519,7 +520,7 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw, bool add_opacity_to_wal draw->coords = &coords; - if (!menu_display_libretro_running() && !draw->pipeline.active) + if (!video_info->libretro_running && !draw->pipeline.active) add_opacity_to_wallpaper = true; if (add_opacity_to_wallpaper) @@ -534,13 +535,14 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw, bool add_opacity_to_wal draw->matrix_data = (math_matrix_4x4*)menu_disp->get_default_mvp(); } -void menu_display_draw_gradient(menu_display_ctx_draw_t *draw) +void menu_display_draw_gradient(menu_display_ctx_draw_t *draw, + video_frame_info_t *video_info) { draw->texture = 0; draw->x = 0; draw->y = 0; - menu_display_draw_bg(draw, false); + menu_display_draw_bg(draw, video_info, false); menu_display_draw(draw); } diff --git a/menu/menu_display.h b/menu/menu_display.h index 0f4f5a300b..93b926b944 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -240,8 +240,13 @@ void menu_display_clear_color(menu_display_ctx_clearcolor_t *color); void menu_display_draw(menu_display_ctx_draw_t *draw); void menu_display_draw_pipeline(menu_display_ctx_draw_t *draw); -void menu_display_draw_bg(menu_display_ctx_draw_t *draw, bool add_opacity); -void menu_display_draw_gradient(menu_display_ctx_draw_t *draw); +void menu_display_draw_bg( + menu_display_ctx_draw_t *draw, + video_frame_info_t *video_info, + bool add_opacity); +void menu_display_draw_gradient( + menu_display_ctx_draw_t *draw, + video_frame_info_t *video_info); void menu_display_draw_quad(int x, int y, unsigned w, unsigned h, unsigned width, unsigned height, float *color); From 7a309faf6d971f07812ec062886a3e4ff75e6eb9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 14:26:49 +0100 Subject: [PATCH 284/427] Don't grab settings pointer inside menu_display_draw_bg --- menu/menu_display.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/menu/menu_display.c b/menu/menu_display.c index 025957f8ee..51b75329d2 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -524,10 +524,7 @@ void menu_display_draw_bg(menu_display_ctx_draw_t *draw, add_opacity_to_wallpaper = true; if (add_opacity_to_wallpaper) - { - settings_t *settings = config_get_ptr(); - menu_display_set_alpha(draw->color, settings->menu.wallpaper.opacity); - } + menu_display_set_alpha(draw->color, video_info->menu_wallpaper_opacity); if (!draw->texture) draw->texture = menu_display_white_texture; From 30c775402975af27fcfb6d1a0b707aa5cb25a1f2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 14:37:02 +0100 Subject: [PATCH 285/427] Buildfix --- gfx/drivers/gl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 6f289b4ccd..4fda106a17 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -683,7 +683,9 @@ static void gl_init_textures(gl_t *gl, const video_info_t *video) glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); } -static INLINE void gl_copy_frame(gl_t *gl, const void *frame, +static INLINE void gl_copy_frame(gl_t *gl, + video_frame_info_t *video_info, + const void *frame, unsigned width, unsigned height, unsigned pitch) { static struct retro_perf_counter copy_frame = {0}; @@ -1172,7 +1174,7 @@ static bool gl_frame(void *data, const void *frame, #endif { gl_update_input_size(gl, frame_width, frame_height, pitch, true); - gl_copy_frame(gl, frame, frame_width, frame_height, pitch); + gl_copy_frame(gl, video_info, frame, frame_width, frame_height, pitch); } /* No point regenerating mipmaps From 0be62647968c5e1cd8e69c949135449acf83931f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 15:33:47 +0100 Subject: [PATCH 286/427] Get rid of more settings pointer grabbing --- gfx/video_driver.c | 16 +++++++++ gfx/video_driver.h | 9 +++++ menu/drivers/xmb.c | 82 ++++++++++++++++++++++------------------------ 3 files changed, 64 insertions(+), 43 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index effc8edecf..f865645098 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2283,11 +2283,27 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->libretro_running = false; #ifdef HAVE_MENU + video_info->menu_shader_pipeline = settings->menu.xmb.shader_pipeline; + video_info->xmb_theme = settings->menu.xmb.theme; + video_info->xmb_color_theme = settings->menu.xmb.menu_color_theme; + video_info->timedate_enable = settings->menu.timedate_enable; + video_info->battery_level_enable = settings->menu.battery_level_enable; + video_info->xmb_shadows_enable = settings->menu.xmb.shadows_enable; + video_info->xmb_alpha_factor = settings->menu.xmb.alpha_factor; video_info->menu_wallpaper_opacity = settings->menu.wallpaper.opacity; if (!settings->menu.pause_libretro) video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)); +#else + video_info->menu_shader_pipeline = 0; + video_info->xmb_color_theme = 0; + video_info->xmb_theme = 0; + video_info->timedate_enable = false; + video_info->battery_level_enable = false; + video_info->xmb_shadows_enable = false; + video_info->xmb_alpha_factor = 0.0f; + video_info->menu_wallpaper_opacity = 0.0f; #endif video_driver_threaded_unlock(); } diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 5dd0e66cfb..2ff547f48e 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -114,6 +114,15 @@ typedef struct video_frame_info float font_msg_color_b; bool use_rgba; bool libretro_running; + + bool xmb_shadows_enable; + float xmb_alpha_factor; + unsigned xmb_theme; + unsigned xmb_color_theme; + unsigned menu_shader_pipeline; + + bool battery_level_enable; + bool timedate_enable; } video_frame_info_t; /* Optionally implemented interface to poke more diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 7c6c8fc956..e0f4efcc31 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -421,11 +421,9 @@ static const char *xmb_thumbnails_ident(void) return msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF); } -static float *xmb_gradient_ident(void) +static float *xmb_gradient_ident(video_frame_info_t *video_info) { - settings_t *settings = config_get_ptr(); - - switch (settings->menu.xmb.menu_color_theme) + switch (video_info->xmb_color_theme) { case XMB_THEME_DARK_PURPLE: return &gradient_dark_purple[0]; @@ -2398,11 +2396,11 @@ static void xmb_render(void *data) menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL); } -static bool xmb_shader_pipeline_active(settings_t *settings) +static bool xmb_shader_pipeline_active(video_frame_info_t *video_info) { if (!string_is_equal(menu_driver_ident(), "xmb")) return false; - if (settings->menu.xmb.shader_pipeline == XMB_SHADER_PIPELINE_WALLPAPER) + if (video_info->menu_shader_pipeline == XMB_SHADER_PIPELINE_WALLPAPER) return false; return true; } @@ -2418,7 +2416,6 @@ static void xmb_draw_bg( float *coord_white) { menu_display_ctx_draw_t draw; - settings_t *settings = config_get_ptr(); #if 0 RARCH_LOG("DRAW BG %d %d \n",width,height); @@ -2437,17 +2434,17 @@ static void xmb_draw_bg( draw.vertex_count = 4; draw.prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP; draw.pipeline.id = 0; - draw.pipeline.active = xmb_shader_pipeline_active(settings); + draw.pipeline.active = xmb_shader_pipeline_active(video_info); menu_display_blend_begin(); menu_display_set_viewport(video_info->width, video_info->height); #ifdef HAVE_SHADERPIPELINE - if (settings->menu.xmb.shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER + if (video_info->menu_shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER && - (settings->menu.xmb.menu_color_theme != XMB_THEME_WALLPAPER)) + (video_info->xmb_color_theme != XMB_THEME_WALLPAPER)) { - draw.color = xmb_gradient_ident(); + draw.color = xmb_gradient_ident(video_info); if (running) menu_display_set_alpha(draw.color, coord_black[3]); @@ -2458,7 +2455,7 @@ static void xmb_draw_bg( draw.pipeline.id = VIDEO_SHADER_MENU_2; - switch (settings->menu.xmb.shader_pipeline) + switch (video_info->menu_shader_pipeline) { case XMB_SHADER_PIPELINE_RIBBON: draw.pipeline.id = VIDEO_SHADER_MENU; @@ -2483,15 +2480,15 @@ static void xmb_draw_bg( { uintptr_t texture = draw.texture; - if (settings->menu.xmb.menu_color_theme != XMB_THEME_WALLPAPER) - draw.color = xmb_gradient_ident(); + if (video_info->xmb_color_theme != XMB_THEME_WALLPAPER) + draw.color = xmb_gradient_ident(video_info); if (running) menu_display_set_alpha(draw.color, coord_black[3]); else menu_display_set_alpha(draw.color, coord_white[3]); - if (settings->menu.xmb.menu_color_theme != XMB_THEME_WALLPAPER) + if (video_info->xmb_color_theme != XMB_THEME_WALLPAPER) menu_display_draw_gradient(&draw, video_info); { @@ -2502,7 +2499,7 @@ static void xmb_draw_bg( if (!running && draw.texture) draw.color = &coord_white[0]; - if (settings->menu.xmb.menu_color_theme == XMB_THEME_WALLPAPER) + if (video_info->xmb_color_theme == XMB_THEME_WALLPAPER) add_opacity = true; menu_display_draw_bg(&draw, video_info, add_opacity); @@ -2567,13 +2564,12 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) bool render_background = false; file_list_t *selection_buf = NULL; file_list_t *menu_stack = NULL; - settings_t *settings = config_get_ptr(); xmb_handle_t *xmb = (xmb_handle_t*)data; if (!xmb) return; - menu_disp_info.shadows_enable = settings->menu.xmb.shadows_enable; + menu_disp_info.shadows_enable = video_info->xmb_shadows_enable; msg[0] = '\0'; title_msg[0] = '\0'; @@ -2593,7 +2589,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) } menu_display_set_alpha(coord_black, MIN( - (float)settings->menu.xmb.alpha_factor/100, xmb->alpha)); + (float)video_info->xmb_alpha_factor/100, xmb->alpha)); menu_display_set_alpha(coord_white, xmb->alpha); xmb_draw_bg( @@ -2637,7 +2633,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) /* Clock image */ menu_display_set_alpha(coord_white, MIN(xmb->alpha, 1.00f)); - if (settings->menu.battery_level_enable) + if (video_info->battery_level_enable) { char msg[12]; static retro_time_t last_time = 0; @@ -2690,34 +2686,34 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) } } - if (settings->menu.timedate_enable && coord_white[3] != 0) - { - int x_pos = 0; - - if (percent_width) - x_pos = percent_width + (xmb->icon.size / 2.5); - - xmb_draw_icon( - menu_disp_info, - xmb->icon.size, - &mymat, - xmb->textures.list[XMB_TEXTURE_CLOCK], - width - xmb->icon.size - x_pos, - xmb->icon.size,width, - height, - 1, - 0, - 1, - &coord_white[0], - xmb->shadow_offset); - } - - if (settings->menu.timedate_enable) + if (video_info->timedate_enable) { menu_display_ctx_datetime_t datetime; char timedate[255]; int x_pos = 0; + if (coord_white[3] != 0) + { + int x_pos = 0; + + if (percent_width) + x_pos = percent_width + (xmb->icon.size / 2.5); + + xmb_draw_icon( + menu_disp_info, + xmb->icon.size, + &mymat, + xmb->textures.list[XMB_TEXTURE_CLOCK], + width - xmb->icon.size - x_pos, + xmb->icon.size,width, + height, + 1, + 0, + 1, + &coord_white[0], + xmb->shadow_offset); + } + timedate[0] = '\0'; datetime.s = timedate; From 927e4b6be061dc87a0454892822b60e2b3a7c04e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 15:38:20 +0100 Subject: [PATCH 287/427] Less settings pointer grabbing --- gfx/video_driver.c | 6 ++++++ gfx/video_driver.h | 5 +++++ menu/drivers/materialui.c | 7 +++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index f865645098..984cbeeb47 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2283,6 +2283,9 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->libretro_running = false; #ifdef HAVE_MENU + video_info->menu_footer_opacity = settings->menu.footer.opacity; + video_info->menu_header_opacity = settings->menu.header.opacity; + video_info->materialui_color_theme = settings->menu.materialui.menu_color_theme; video_info->menu_shader_pipeline = settings->menu.xmb.shader_pipeline; video_info->xmb_theme = settings->menu.xmb.theme; video_info->xmb_color_theme = settings->menu.xmb.menu_color_theme; @@ -2296,6 +2299,9 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)); #else + video_info->menu_footer_opacity = 0.0f; + video_info->menu_header_opacity = 0.0f; + video_info->materialui_color_theme = 0; video_info->menu_shader_pipeline = 0; video_info->xmb_color_theme = 0; video_info->xmb_theme = 0; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 2ff547f48e..fa00c68e34 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -115,12 +115,17 @@ typedef struct video_frame_info bool use_rgba; bool libretro_running; + float menu_header_opacity; + float menu_footer_opacity; + bool xmb_shadows_enable; float xmb_alpha_factor; unsigned xmb_theme; unsigned xmb_color_theme; unsigned menu_shader_pipeline; + unsigned materialui_color_theme; + bool battery_level_enable; bool timedate_enable; } video_frame_info_t; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 6def8f3047..bd16dae705 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1038,7 +1038,6 @@ static void mui_frame(void *data, video_frame_info_t *video_info) size_t title_margin = 0; mui_handle_t *mui = (mui_handle_t*)data; uint64_t frame_count = video_info->frame_count; - settings_t *settings = config_get_ptr(); bool background_rendered = false; bool libretro_running = video_info->libretro_running; @@ -1059,7 +1058,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info) msg[0] = title[0] = title_buf[0] = title_msg[0] = '\0'; - switch (settings->menu.materialui.menu_color_theme) + switch (video_info->materialui_color_theme) { case MATERIALUI_THEME_BLUE: hex32_to_rgba_normalized(0x2196F3, blue_500, 1.00); @@ -1208,8 +1207,8 @@ static void mui_frame(void *data, video_frame_info_t *video_info) break; } - menu_display_set_alpha(header_bg_color_real, settings->menu.header.opacity); - menu_display_set_alpha(footer_bg_color_real, settings->menu.footer.opacity); + menu_display_set_alpha(header_bg_color_real, video_info->menu_header_opacity); + menu_display_set_alpha(footer_bg_color_real, video_info->menu_footer_opacity); menu_display_set_viewport(video_info->width, video_info->height); header_height = menu_display_get_header_height(); From a8232f1b46d207af6b12a5ce0634d39e18e816bd Mon Sep 17 00:00:00 2001 From: xhp-creations Date: Fri, 20 Jan 2017 10:29:53 -0500 Subject: [PATCH 288/427] (WIIU) add rotation support (WIIU) add rotation support --- gfx/drivers/wiiu_gfx.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index 53c91e564f..0d800a7f07 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -138,16 +138,16 @@ static wiiu_set_position(position_t* position, GX2ColorBuffer* draw_buffer, floa GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, position, 4 * sizeof(*position)); } -static void wiiu_set_tex_coords(tex_coord_t* tex_coord, GX2Texture* texture, float u0, float v0, float u1, float v1) +static void wiiu_set_tex_coords(tex_coord_t* tex_coord, GX2Texture* texture, float u0, float v0, float u1, float v1, unsigned rotation) { - tex_coord[0].u = u0 / texture->surface.width; - tex_coord[0].v = (v1 / texture->surface.height); - tex_coord[1].u = u1 / texture->surface.width; - tex_coord[1].v = (v1 / texture->surface.height); - tex_coord[2].u = u1 / texture->surface.width; - tex_coord[2].v = (v0 / texture->surface.height); - tex_coord[3].u = u0 / texture->surface.width; - tex_coord[3].v = (v0 / texture->surface.height); + tex_coord[((0 + rotation) % 4)].u = u0 / texture->surface.width; + tex_coord[((0 + rotation) % 4)].v = (v1 / texture->surface.height); + tex_coord[((1 + rotation) % 4)].u = u1 / texture->surface.width; + tex_coord[((1 + rotation) % 4)].v = (v1 / texture->surface.height); + tex_coord[((2 + rotation) % 4)].u = u1 / texture->surface.width; + tex_coord[((2 + rotation) % 4)].v = (v0 / texture->surface.height); + tex_coord[((3 + rotation) % 4)].u = u0 / texture->surface.width; + tex_coord[((3 + rotation) % 4)].v = (v0 / texture->surface.height); GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, tex_coord, 4 * sizeof(*tex_coord)); } @@ -407,7 +407,7 @@ static void* wiiu_gfx_init(const video_info_t* video, wiiu->tex_coord = MEM2_alloc(4 * sizeof(*wiiu->tex_coord), GX2_VERTEX_BUFFER_ALIGNMENT); wiiu_set_tex_coords(wiiu->tex_coord, &wiiu->texture, 0, 0, - wiiu->texture.surface.width, wiiu->texture.surface.height); + wiiu->texture.surface.width, wiiu->texture.surface.height, wiiu->rotation); GX2SetAttribBuffer(0, 4 * sizeof(*wiiu->position), sizeof(*wiiu->position), wiiu->position); GX2SetAttribBuffer(1, 4 * sizeof(*wiiu->tex_coord), sizeof(*wiiu->tex_coord), wiiu->tex_coord); @@ -418,7 +418,7 @@ static void* wiiu_gfx_init(const video_info_t* video, wiiu->menu.tex_coord = MEM2_alloc(4 * sizeof(*wiiu->menu.tex_coord), GX2_VERTEX_BUFFER_ALIGNMENT); wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, - wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height); + wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height, wiiu->rotation); /* init frame texture */ memset(&wiiu->texture, 0, sizeof(GX2Texture)); @@ -667,7 +667,7 @@ static bool wiiu_gfx_frame(void* data, const void* frame, GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, wiiu->texture.surface.image, wiiu->texture.surface.imageSize); - wiiu_set_tex_coords(wiiu->tex_coord, &wiiu->texture, 0, 0, width, height); + wiiu_set_tex_coords(wiiu->tex_coord, &wiiu->texture, 0, 0, width, height, wiiu->rotation); } GX2SetAttribBuffer(0, 4 * sizeof(*wiiu->position), sizeof(*wiiu->position), wiiu->position); @@ -836,8 +836,8 @@ static void wiiu_gfx_set_texture_frame(void* data, const void* frame, bool rgb32 GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, wiiu->menu.texture.surface.image, wiiu->menu.texture.surface.imageSize); - wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, width, height); -// wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height); + wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, width, height, wiiu->rotation); +// wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height, wiiu->rotation); } static void wiiu_gfx_set_texture_enable(void* data, bool state, bool full_screen) From 577ee0972705ee9494e9c9f26b53ce6bd3c4005d Mon Sep 17 00:00:00 2001 From: xhp-creations Date: Fri, 20 Jan 2017 11:22:30 -0500 Subject: [PATCH 289/427] (WIIU) fix rotation of menu (WIIU) fix rotation of menu --- gfx/drivers/wiiu_gfx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index 0d800a7f07..f0ff79aba8 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -418,7 +418,7 @@ static void* wiiu_gfx_init(const video_info_t* video, wiiu->menu.tex_coord = MEM2_alloc(4 * sizeof(*wiiu->menu.tex_coord), GX2_VERTEX_BUFFER_ALIGNMENT); wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, - wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height, wiiu->rotation); + wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height, 0); /* init frame texture */ memset(&wiiu->texture, 0, sizeof(GX2Texture)); @@ -836,8 +836,8 @@ static void wiiu_gfx_set_texture_frame(void* data, const void* frame, bool rgb32 GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, wiiu->menu.texture.surface.image, wiiu->menu.texture.surface.imageSize); - wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, width, height, wiiu->rotation); -// wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height, wiiu->rotation); + wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, width, height, 0); +// wiiu_set_tex_coords(wiiu->menu.tex_coord, &wiiu->menu.texture, 0, 0, wiiu->menu.texture.surface.width, wiiu->menu.texture.surface.height, 0); } static void wiiu_gfx_set_texture_enable(void* data, bool state, bool full_screen) From 4c8062ba8ec37a70adb485d3a6fb8425b8ca614e Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Fri, 20 Jan 2017 17:52:12 +0100 Subject: [PATCH 290/427] Add last videosettings translations for german --- intl/msg_hash_de.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index fe1f084975..4d408b1c65 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -797,7 +797,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, "Video-Seitenverhältnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, - "Setze schwarze Frames ein") + "Setze schwarzes Bild zwischen Frames ein") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "Bildränder (Overscan) zuschneiden (Neustart erforderlich)") MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION, @@ -974,12 +974,18 @@ MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, "Ändere die Einstellungen der Benutzeroberfläche.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, "Ändere das Konto, Benutzername, und die Sprache.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, + "Zeigt ein schwarzes Bild zwischen Frames an. Nützlich für 120 Hz Monitore welche 60 Hz mit weniger 'ghosting' möchten.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, + "Reduziert Latenz, kann aber zu Anzeigefehlern führen. Fügt einen Unterbruch bei V-Sync hinzu (in ms).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, "Hartsynchronisierung des CPU und der GPU. Reduziert Latenz, braucht aber mehr Leistung.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC_FRAMES, + "Anzahl Bilder welche die CPU der GPU voraus sein darf wenn die 'Hartsynchronisierung' verwendet wird.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES, "Zwingt den Videotreiber explizit einen bestimmten Puffer zu verwenden.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MONITOR_INDEX, @@ -987,7 +993,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_MONITOR_INDEX, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE, "Vertikale Bildwiederholrate des Monitors. " "Wird verwendet um die passende Audioinputrate zu berechnen. " - "WICHTIG: Diese Option wird ignoriert wenn du 'Threaded Video' aktiviert hast.") // TODO: Any way to inject the reference in the .h file? + "WICHTIG: Diese Option wird ignoriert wenn du 'Threaded Video' aktiviert hast.") /* TODO: Any way to inject the reference in the .h file? */ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, "Die genau geschätzte Bildwiederholrate des Monitors in Hz.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, From e040e974e9a5adfc1cb8abfdc70910399620f72c Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Fri, 20 Jan 2017 18:00:05 +0100 Subject: [PATCH 291/427] Add some translations for audio settings --- intl/msg_hash_de.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 4d408b1c65..ac64ea9b5e 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -918,8 +918,18 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO, "Zeige Videos") MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, "Ja") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE, + "Aktiviert den Audioausgang.") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_LATENCY, + "Gewünschte Audiolatenz in Millisekunden. Je nach Audiotreiber kann die gewünschte Latenz nicht erzielt werden.") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MUTE, + "Audio Stummschalten.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, "Einstellungen zur Audioausgabe.") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SYNC, + "Synchronisiert Audio. Empfohlen.") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_VOLUME, + "Lautstärkeverstärkung in dB.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, "Ändere die Standardeinstellungen für Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, From 2c6a509cd9c21cf49d6b67b6a8fb5ee3c8f7e5af Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Fri, 20 Jan 2017 18:08:13 +0100 Subject: [PATCH 292/427] Added missing audio settings translations for german --- intl/msg_hash_de.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index ac64ea9b5e..ab21943774 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -922,8 +922,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE, "Aktiviert den Audioausgang.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_LATENCY, "Gewünschte Audiolatenz in Millisekunden. Je nach Audiotreiber kann die gewünschte Latenz nicht erzielt werden.") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MAX_TIMING_SKEW, + "Die maximale Änderung der Audioeingangsleistung. " + "Wenn du PAL Cores auf NTSC Monitoren spielen willst, kannst du diesen Wert erhöhen um bessere Timings zu erreichen, " + "als Nebeneffekt kann es zu unechten Tonhöhen kommen.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_MUTE, "Audio Stummschalten.") +MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, + "Hilft Fehler bei der Audio- und Videosynchronisierung auszubügeln. " + "Wenn deaktiviert, ist eine brauchbare Synchronisation nahezu unmöglich.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, "Einstellungen zur Audioausgabe.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SYNC, From dcca2f813111adb142025f83e951088a5461b44b Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 20 Jan 2017 14:33:57 -0500 Subject: [PATCH 293/427] only announce if host --- network/netplay/netplay_frontend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 715fec24bf..7157f2375e 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -28,9 +28,9 @@ #include "../../input/input_driver.h" #include "../../runloop.h" -#include "tasks/tasks_internal.h" +#include "../../tasks/tasks_internal.h" #include -#include "file_path_special.h" +#include "../../file_path_special.h" #include "paths.h" /* Only used before init_netplay */ @@ -553,7 +553,7 @@ bool netplay_pre_frame(netplay_t *netplay) { bool sync_stalled; reannounce ++; - if (reannounce % 3600 == 0) + if (netplay->is_server && (reannounce % 3600 == 0)) netplay_announce(); retro_assert(netplay); From e6c4327a1caf87b7795a9e8b7d521d803e2f15d1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 20 Jan 2017 21:05:25 +0100 Subject: [PATCH 294/427] (GL) Fix lockup at startup --- gfx/video_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 984cbeeb47..5768cf6fd5 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2279,7 +2279,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->width = video_driver_width; video_info->height = video_driver_height; - video_info->use_rgba = video_driver_supports_rgba(); + video_info->use_rgba = video_driver_use_rgba; video_info->libretro_running = false; #ifdef HAVE_MENU From 0acf34dcdde856294a6ec4405d2da93e101b8895 Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 20 Jan 2017 15:13:38 -0500 Subject: [PATCH 295/427] now we can connect (if the game is already loaded --- menu/cbs/menu_cbs_ok.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 2b9883d19f..367db662d8 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3118,9 +3118,36 @@ static int action_ok_netplay_lan_scan_list(const char *path, static int action_ok_netplay_connect_room(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - RARCH_LOG("Connect %s %d\n", netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); +#ifdef HAVE_NETWORKING + settings_t *settings = config_get_ptr(); + + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); + + /* If we haven't yet started, this will load on its own */ + if (!content_is_inited()) + { + runloop_msg_queue_push( + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED), + 1, 480, true); + return 0; + } + + char tmp_hostname[512]; + strlcpy(tmp_hostname, "192.168.1.241", sizeof(tmp_hostname)); + + /* Enable Netplay itself */ + if (!command_event(CMD_EVENT_NETPLAY_INIT, (void *) tmp_hostname)) + return -1; + +#else + return -1; + +#endif return 0; } + static int action_ok_lakka_services(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { From 42dc8c7e1560a4227592eab37fb9c09ac2324086 Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 20 Jan 2017 15:14:30 -0500 Subject: [PATCH 296/427] woops fix hardcoded address --- menu/cbs/menu_cbs_ok.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 367db662d8..10f126ddeb 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3135,7 +3135,7 @@ static int action_ok_netplay_connect_room(const char *path, } char tmp_hostname[512]; - strlcpy(tmp_hostname, "192.168.1.241", sizeof(tmp_hostname)); + strlcpy(tmp_hostname, netplay_room_list[idx - 1].address, sizeof(tmp_hostname)); /* Enable Netplay itself */ if (!command_event(CMD_EVENT_NETPLAY_INIT, (void *) tmp_hostname)) From 0de43b954edd6eb06d256e5b537c74841359d638 Mon Sep 17 00:00:00 2001 From: radius Date: Fri, 20 Jan 2017 16:04:10 -0500 Subject: [PATCH 297/427] can now connect when starting a game too --- command.c | 15 +++++++++++++++ command.h | 2 ++ menu/cbs/menu_cbs_ok.c | 24 ++++++++++++++++-------- network/netplay/netplay.h | 2 ++ network/netplay/netplay_frontend.c | 24 +++++++++++++++++++++++- 5 files changed, 58 insertions(+), 9 deletions(-) diff --git a/command.c b/command.c index c5ec6d3e7a..c40d703ea5 100644 --- a/command.c +++ b/command.c @@ -2441,6 +2441,20 @@ bool command_event(enum event_command cmd, void *data) } } break; + case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED: + { + char *hostname = (char *) data; + + settings_t *settings = config_get_ptr(); + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + if (!init_netplay_deferred( + hostname, settings->netplay.port)) + { + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + return false; + } + } + break; case CMD_EVENT_NETPLAY_FLIP_PLAYERS: netplay_driver_ctl(RARCH_NETPLAY_CTL_FLIP_PLAYERS, NULL); break; @@ -2453,6 +2467,7 @@ bool command_event(enum event_command cmd, void *data) case CMD_EVENT_NETWORK_INIT: case CMD_EVENT_NETPLAY_INIT: case CMD_EVENT_NETPLAY_INIT_DIRECT: + case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED: case CMD_EVENT_NETPLAY_FLIP_PLAYERS: case CMD_EVENT_NETPLAY_GAME_WATCH: return false; diff --git a/command.h b/command.h index 19d8009c86..f15b108388 100644 --- a/command.h +++ b/command.h @@ -171,6 +171,8 @@ enum event_command CMD_EVENT_NETPLAY_INIT, /* Initializes netplay system with a direct host specified. */ CMD_EVENT_NETPLAY_INIT_DIRECT, + /* Initializes netplay system with a direct host specified after loading content. */ + CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, /* Deinitializes netplay system. */ CMD_EVENT_NETPLAY_DEINIT, /* Flip netplay players. */ diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 10f126ddeb..cbfdbc6e6b 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3125,21 +3125,29 @@ static int action_ok_netplay_connect_room(const char *path, command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); + char tmp_hostname[512]; + + /* For testing purposes + strlcpy(tmp_hostname, "192.168.1.241", sizeof(tmp_hostname));*/ + strlcpy(tmp_hostname, netplay_room_list[idx - 1].address, sizeof(tmp_hostname)); + /* If we haven't yet started, this will load on its own */ if (!content_is_inited()) { runloop_msg_queue_push( msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED), 1, 480, true); - return 0; + /* Enable Netplay itself */ + + if (!command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, (void *) tmp_hostname)) + return -1; + } + else + { + /* Enable Netplay itself */ + if (!command_event(CMD_EVENT_NETPLAY_INIT, (void *) tmp_hostname)) + return -1; } - - char tmp_hostname[512]; - strlcpy(tmp_hostname, netplay_room_list[idx - 1].address, sizeof(tmp_hostname)); - - /* Enable Netplay itself */ - if (!command_event(CMD_EVENT_NETPLAY_INIT, (void *) tmp_hostname)) - return -1; #else return -1; diff --git a/network/netplay/netplay.h b/network/netplay/netplay.h index c7e27def05..5d285cb4d9 100644 --- a/network/netplay/netplay.h +++ b/network/netplay/netplay.h @@ -57,6 +57,8 @@ void audio_sample_net(int16_t left, int16_t right); size_t audio_sample_batch_net(const int16_t *data, size_t frames); +bool init_netplay_deferred(const char* server, unsigned port); + /** * init_netplay * @direct_host : Host to connect to directly, if applicable (client only) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 7157f2375e..619d7f3ca4 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "netplay_private.h" @@ -43,6 +44,11 @@ static netplay_t *netplay_data = NULL; /* Used to avoid recursive netplay calls */ static bool in_netplay = false; +/* Used for deferred netplay initialization */ +static bool netplay_client_deferred = false; +static char server_address_deferred[512] = ""; +static unsigned server_port_deferred = 0; + /** * netplay_is_alive: * @netplay : pointer to netplay object @@ -156,6 +162,22 @@ static bool get_self_input_state(netplay_t *netplay) return true; } +bool init_netplay_deferred(const char* server, unsigned port) +{ + + RARCH_LOG("deferred! %s\n", server); + if (!string_is_empty(server) && port != 0) + { + strlcpy(server_address_deferred, server, sizeof(server_address_deferred)); + server_port_deferred = port; + netplay_client_deferred = true; + } + else + netplay_client_deferred = false; + return netplay_client_deferred; +} + + /** * netplay_poll: * @netplay : pointer to netplay object @@ -924,7 +946,7 @@ bool init_netplay(void *direct_host, const char *server, unsigned port) netplay_data = (netplay_t*)netplay_new( netplay_is_client ? direct_host : NULL, - netplay_is_client ? server : NULL, + netplay_is_client ? (!netplay_client_deferred ? server : server_address_deferred) : NULL, port ? port : RARCH_DEFAULT_PORT, settings->netplay.stateless_mode, settings->netplay.check_frames, &cbs, settings->netplay.nat_traversal, settings->username, From 1d3e1a6962ba50e53d707741974aa1683710177c Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Fri, 20 Jan 2017 18:23:45 -0500 Subject: [PATCH 298/427] DOS/DJGPP buildfix --- command.c | 6 ++++-- input/connect/joypad_connection.h | 4 ++-- libretro-common/features/features_cpu.c | 4 ++-- libretro-common/include/math/float_minmax.h | 4 ++-- libretro-common/include/retro_miscellaneous.h | 20 +++++++++++++++++++ qb/config.libs.sh | 5 +++++ qb/qb.system.sh | 1 + 7 files changed, 36 insertions(+), 8 deletions(-) diff --git a/command.c b/command.c index bbfdffdc4f..8326787a9e 100644 --- a/command.c +++ b/command.c @@ -35,8 +35,10 @@ #endif #ifdef HAVE_COMMAND -#include -#include + #ifdef HAVE_NETWORKING + #include + #include + #endif #include #endif diff --git a/input/connect/joypad_connection.h b/input/connect/joypad_connection.h index 1b5c70d768..fd8d5584c7 100644 --- a/input/connect/joypad_connection.h +++ b/input/connect/joypad_connection.h @@ -63,10 +63,10 @@ joypad_connection_t *pad_connection_init(unsigned pads); void pad_connection_destroy(joypad_connection_t *joyconn); void pad_connection_pad_deinit(joypad_connection_t *joyconn, - unsigned idx); + uint32_t idx); void pad_connection_packet(joypad_connection_t *joyconn, - unsigned idx, uint8_t* data, uint32_t length); + uint32_t idx, uint8_t* data, uint32_t length); uint64_t pad_connection_get_buttons(joypad_connection_t *joyconn, unsigned idx); diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index ddaa01f9ce..72fc208a99 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -44,7 +44,7 @@ #endif #elif defined(_XBOX360) #include -#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(ANDROID) || defined(__QNX__) +#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(ANDROID) || defined(__QNX__) || defined(DJGPP) /* POSIX_MONOTONIC_CLOCK is not being defined in Android headers despite support being present. */ #include #endif @@ -215,7 +215,7 @@ retro_time_t cpu_features_get_time_usec(void) return tv.tv_sec * INT64_C(1000000) + (tv.tv_nsec + 500) / 1000; #elif defined(EMSCRIPTEN) return emscripten_get_now() * 1000; -#elif defined(__mips__) +#elif defined(__mips__) || defined(DJGPP) struct timeval tv; gettimeofday(&tv,NULL); return (1000000 * tv.tv_sec + tv.tv_usec); diff --git a/libretro-common/include/math/float_minmax.h b/libretro-common/include/math/float_minmax.h index f89cdc5bd5..ea7ceda474 100644 --- a/libretro-common/include/math/float_minmax.h +++ b/libretro-common/include/math/float_minmax.h @@ -39,7 +39,7 @@ static INLINE float float_min(float a, float b) #ifdef __SSE2__ _mm_store_ss( &a, _mm_min_ss(_mm_set_ss(a),_mm_set_ss(b)) ); return a; -#elif defined(__STDC_C99__) || defined(__STDC_C11__) +#elif !defined(DJGPP) && (defined(__STDC_C99__) || defined(__STDC_C11__)) return fminf(a, b); #else return MIN(a, b); @@ -51,7 +51,7 @@ static INLINE float float_max(float a, float b) #ifdef __SSE2__ _mm_store_ss( &a, _mm_max_ss(_mm_set_ss(a),_mm_set_ss(b)) ); return a; -#elif defined(__STDC_C99__) || defined(__STDC_C11__) +#elif !defined(DJGPP) && (defined(__STDC_C99__) || defined(__STDC_C11__)) return fmaxf(a, b); #else return MAX(a, b); diff --git a/libretro-common/include/retro_miscellaneous.h b/libretro-common/include/retro_miscellaneous.h index 83d004b8a0..eb1d665333 100644 --- a/libretro-common/include/retro_miscellaneous.h +++ b/libretro-common/include/retro_miscellaneous.h @@ -83,6 +83,26 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define RARCH_SCALE_BASE 256 +#ifdef DJGPP +#define timespec timeval +#define tv_nsec tv_usec +#include + +extern int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); + +static int nanosleepDOS(const struct timespec *rqtp, struct timespec *rmtp) +{ + usleep(1000000 * rqtp->tv_sec + rqtp->tv_nsec / 1000); + + if (rmtp) + rmtp->tv_sec = rmtp->tv_nsec=0; + + return 0; +} + +#define nanosleep nanosleepDOS +#endif + /** * retro_sleep: * @msec : amount in milliseconds to sleep diff --git a/qb/config.libs.sh b/qb/config.libs.sh index f000fe40b4..f02696e57b 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -152,6 +152,11 @@ else add_define_make MAN_DIR "${PREFIX}/share/man" fi +if [ "$OS" = 'DOS' ]; then + HAVE_SHADERPIPELINE=no + HAVE_LANGEXTRA=no +fi + if [ "$OS" = 'Win32' ]; then HAVE_THREADS=yes HAVE_THREAD_STORAGE=yes diff --git a/qb/qb.system.sh b/qb/qb.system.sh index 63d465e44d..0589126905 100644 --- a/qb/qb.system.sh +++ b/qb/qb.system.sh @@ -2,6 +2,7 @@ if [ -n "$CROSS_COMPILE" ]; then case "$CROSS_COMPILE" in *'-mingw32'*) OS='Win32';; + *'-msdosdjgpp'*) OS='DOS';; *);; esac fi From c8141123d6fb252d5dd147e4f4f2c70a5dc265a4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 Jan 2017 00:55:21 +0100 Subject: [PATCH 299/427] (GX) Cleanup warnings --- gfx/drivers/gx_gfx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index a68889b483..9fd86ffda6 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1445,13 +1445,12 @@ static bool gx_frame(void *data, const void *frame, const char *msg, video_frame_info_t *video_info) { - char fps_txt[128]; char fps_text_buf[128]; static struct retro_perf_counter gx_frame = {0}; gx_video_t *gx = (gx_video_t*)data; u8 clear_efb = GX_FALSE; - fps_txt[0] = fps_text_buf[0] = '\0'; + fps_text_buf[0] = '\0'; performance_counter_init(&gx_frame, "gx_frame"); performance_counter_start(&gx_frame); From dd1fa96321a542591f4474f19a8c4acb276b7afb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 Jan 2017 01:46:35 +0100 Subject: [PATCH 300/427] Fix --- libretro-common/gfx/gl_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretro-common/gfx/gl_capabilities.c b/libretro-common/gfx/gl_capabilities.c index 2eb0b2febd..b964a8c546 100644 --- a/libretro-common/gfx/gl_capabilities.c +++ b/libretro-common/gfx/gl_capabilities.c @@ -311,6 +311,8 @@ bool gl_check_capability(enum gl_capability_enum enum_idx) if (major >= 3) return true; #else + if (strstr(vendor, "ATI Technologies")) + return false; if (gl_query_extension("ARB_texture_storage")) return true; #endif From b97b40af75ca72425a76124d3366315d1a6feb57 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 Jan 2017 18:54:13 +0100 Subject: [PATCH 301/427] (vg.c) Buildfix --- gfx/drivers/vg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 7016da0567..d1f2baad13 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -288,8 +288,8 @@ static void vg_free(void *data) static void vg_calculate_quad(vg_t *vg, video_frame_info_t *video_info) { - unsigned width = video_info->width; - unsigned heigh = video_info->height; + unsigned width = video_info->width; + unsigned height = video_info->height; /* set viewport for aspect ratio, taken from the OpenGL driver. */ if (vg->keep_aspect) From 8c304dfda76bf1930aee18fbcae19fd570aad124 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sat, 21 Jan 2017 13:18:31 -0500 Subject: [PATCH 302/427] Make the client send an INFO even if it's wrong This simply gives the server a reason why the client disconnected, rather than a generic, unexplained disconnection. --- network/netplay/netplay_handshake.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index 79f7dded10..b75b332010 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -832,6 +832,15 @@ error: RARCH_ERR("%s\n", dmsg); runloop_msg_queue_push(dmsg, 1, 180, false); } + + if (!netplay->is_server) + { + /* Counter-intuitively, we still want to send our info. This is simply so + * that the server knows why we disconnected. */ + if (!netplay_handshake_info(netplay, connection)) + return false; + } + return false; } /** From 0290f4713c19d6fc5908bdf3cd7794bc64766a21 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 21 Jan 2017 15:39:29 -0500 Subject: [PATCH 303/427] caca: fix font alignment --- gfx/drivers/caca_gfx.c | 5 ++++- gfx/drivers_font/caca_font.c | 27 +++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 7d7106be21..a35ccf6ed4 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -137,7 +137,7 @@ static bool caca_gfx_frame(void *data, const void *frame, if (!caca_cv) return true; - if (caca_menu_frame) + if (caca_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) frame_to_copy = caca_menu_frame; width = caca_get_canvas_width(caca_cv); @@ -149,6 +149,9 @@ static bool caca_gfx_frame(void *data, const void *frame, (frame_width < width && frame_height < height)) draw = false; + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + draw = false; + caca_clear_canvas(caca_cv); #ifdef HAVE_MENU diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index 555d28fdc7..14e9c1be76 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -77,9 +77,10 @@ static void caca_render_msg(video_frame_info_t *video_info, void *data, const char *msg, const void *userdata) { - float x, y; + float x, y, scale; unsigned width, height; unsigned newX, newY; + unsigned align; caca_raster_t *font = (caca_raster_t*)data; const struct font_params *params = (const struct font_params*)userdata; @@ -90,11 +91,15 @@ static void caca_render_msg(video_frame_info_t *video_info, { x = params->x; y = params->y; + scale = params->scale; + align = params->text_align; } else { x = video_info->font_msg_pos_x; y = video_info->font_msg_pos_y; + scale = 1.0f; + align = TEXT_ALIGN_LEFT; } if (!font->caca || !font->caca->caca_cv || !font->caca->caca_display || @@ -103,12 +108,22 @@ static void caca_render_msg(video_frame_info_t *video_info, width = caca_get_canvas_width(*font->caca->caca_cv); height = caca_get_canvas_height(*font->caca->caca_cv); + newY = height - (y * height * scale); - newX = x * width; - newY = height - (y * height); - - if (strlen(msg) + newX > width) - newX -= strlen(msg) + newX - width; + switch (align) + { + case TEXT_ALIGN_LEFT: + newX = x * width * scale; + break; + case TEXT_ALIGN_RIGHT: + newX = (x * width * scale) - strlen(msg); + break; + case TEXT_ALIGN_CENTER: + newX = (x * width * scale) - (strlen(msg) / 2); + break; + default: + break; + } caca_put_str(*font->caca->caca_cv, newX, newY, msg); From bc8b3ebad54f237ff2fdd2016bfdc477ad1782d2 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 21 Jan 2017 15:46:46 -0500 Subject: [PATCH 304/427] gdi: fix font alignment --- gfx/drivers_font/gdi_font.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index b9244a337c..999c649c43 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -85,9 +85,10 @@ static void gdi_render_msg( const void *userdata) { HDC hdc; - float x, y; + float x, y, scale; gdi_raster_t *font = (gdi_raster_t*)data; unsigned newX, newY, len; + unsigned align; const struct font_params *params = (const struct font_params*)userdata; HWND hwnd = win32_get_window(); unsigned width = video_info->width; @@ -100,19 +101,38 @@ static void gdi_render_msg( { x = params->x; y = params->y; + scale = params->scale; + align = params->text_align; } else { x = video_info->font_msg_pos_x; y = video_info->font_msg_pos_y; + scale = 1.0f; + align = TEXT_ALIGN_LEFT; } if (!font->gdi) return; len = utf8len(msg); - newX = x * width; - newY = height - (y * height); + + switch (align) + { + case TEXT_ALIGN_LEFT: + newX = x * width * scale; + break; + case TEXT_ALIGN_RIGHT: + newX = (x * width * scale) - len; + break; + case TEXT_ALIGN_CENTER: + newX = (x * width * scale) - (len / 2); + break; + default: + break; + } + + newY = height - (y * height * scale); hdc = GetDC(hwnd); SetBkMode(hdc, TRANSPARENT); From 496198ab320f98735eb3962731635b8710bdf77b Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 21 Jan 2017 16:36:38 -0500 Subject: [PATCH 305/427] DOS: target 386 and link in FPU emulator, program now starts up correctly --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index c31e4bdb95..0b2013e54f 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,11 @@ LIBS := DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -DHAVE_OVERLAY DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"' +ifneq ($(findstring DOS,$(OS)),) + CFLAGS += -march=i386 + LDFLAGS += -lemu +endif + ifneq ($(findstring Win32,$(OS)),) LDFLAGS += -static-libgcc endif From 181f6472b148aa42f4d2f9f4130ee60bd33f6d53 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 01:45:56 +0100 Subject: [PATCH 306/427] (MaterialUI) Get rid of early return --- menu/drivers/materialui.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index bd16dae705..a9efe27872 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -808,15 +808,10 @@ static void mui_render_menu_list( float *menu_list_color) { float sum = 0; - unsigned header_height = 0; size_t i = 0; file_list_t *list = NULL; uint64_t frame_count = video_info->frame_count; - - if (!menu_display_get_update_pending()) - return; - - header_height = menu_display_get_header_height(); + unsigned header_height = menu_display_get_header_height(); mui->raster_block.carr.coords.vertices = 0; mui->raster_block2.carr.coords.vertices = 0; @@ -1287,15 +1282,16 @@ static void mui_frame(void *data, video_frame_info_t *video_info) menu_display_font_bind_block(mui->font, &mui->raster_block); menu_display_font_bind_block(mui->font2, &mui->raster_block2); - mui_render_menu_list( - video_info, - mui, - width, - height, - font_normal_color, - font_hover_color, - &active_tab_marker_color[0] - ); + if (menu_display_get_update_pending()) + mui_render_menu_list( + video_info, + mui, + width, + height, + font_normal_color, + font_hover_color, + &active_tab_marker_color[0] + ); menu_display_font_flush_block(video_info->width, video_info->height, mui->font); menu_display_font_flush_block(video_info->width, video_info->height, mui->font2); From 913a5ba5ba65293fd9898de53252ff66081eecca Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 01:55:19 +0100 Subject: [PATCH 307/427] (runloop.c) Get rid of some runloop_ctl calls --- runloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runloop.c b/runloop.c index 131062f6ed..4991ba0c5b 100644 --- a/runloop.c +++ b/runloop.c @@ -892,7 +892,7 @@ static enum runloop_state runloop_check_state( if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY)) { command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); - if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) + if (!runloop_idle) video_driver_cached_frame(); } @@ -976,7 +976,7 @@ static enum runloop_state runloop_check_state( /* Checks if slowmotion toggle/hold was being pressed and/or held. */ if (settings->video.black_frame_insertion) { - if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) + if (!runloop_idle) video_driver_cached_frame(); } From 6a5ce0fce99fd4e790c406d348289ecea14e7507 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 01:58:08 +0100 Subject: [PATCH 308/427] Turn runloop_netplay_pause into macro --- runloop.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/runloop.c b/runloop.c index 4991ba0c5b..fe8220fcb8 100644 --- a/runloop.c +++ b/runloop.c @@ -1015,13 +1015,12 @@ static enum runloop_state runloop_check_state( return RUNLOOP_STATE_ITERATE; } -static void runloop_netplay_pause(void) -{ #ifdef HAVE_NETWORKING - /* FIXME: This is an ugly way to tell Netplay this... */ - netplay_driver_ctl(RARCH_NETPLAY_CTL_PAUSE, NULL); +/* FIXME: This is an ugly way to tell Netplay this... */ +#define runloop_netplay_pause() netplay_driver_ctl(RARCH_NETPLAY_CTL_PAUSE, NULL) +#else +#define runloop_netplay_pause() ((void)0) #endif -} /** * runloop_iterate: From 23c35c39b553ec364e491c8a0e37da2d00b45286 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 02:04:58 +0100 Subject: [PATCH 309/427] Add more video_frame_info_t members --- gfx/video_driver.c | 3 +++ gfx/video_driver.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 5768cf6fd5..02407539b5 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2311,6 +2311,9 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->xmb_alpha_factor = 0.0f; video_info->menu_wallpaper_opacity = 0.0f; #endif + video_info->runloop_is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); + video_info->runloop_is_idle = runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL); + video_info->runloop_is_slowmotion = runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL); video_driver_threaded_unlock(); } diff --git a/gfx/video_driver.h b/gfx/video_driver.h index fa00c68e34..fe3291e960 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -128,6 +128,9 @@ typedef struct video_frame_info bool battery_level_enable; bool timedate_enable; + bool runloop_is_slowmotion; + bool runloop_is_idle; + bool runloop_is_paused; } video_frame_info_t; /* Optionally implemented interface to poke more From 2dee8f77b6e17818ae6bf6393c6b94d3ff090fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 22 Jan 2017 03:17:50 +0100 Subject: [PATCH 310/427] (Netplay) Add a task to find a game from its CRC --- Makefile.common | 3 +- griffin/griffin.c | 1 + tasks/task_netplay_crc.c | 136 +++++++++++++++++++++++++++++++++++++++ tasks/tasks_internal.h | 2 + 4 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 tasks/task_netplay_crc.c diff --git a/Makefile.common b/Makefile.common index e3e3d219ae..f1e460b8ab 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1110,7 +1110,8 @@ ifeq ($(HAVE_NETWORKING), 1) network/net_http_special.o \ tasks/task_http.o \ tasks/task_netplay_lan_scan.o \ - tasks/task_wifi.o + tasks/task_wifi.o \ + tasks/task_netplay_crc.o ifneq ($(HAVE_SOCKET_LEGACY),1) OBJ += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o diff --git a/griffin/griffin.c b/griffin/griffin.c index 041d9b92c9..d4954defa8 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -900,6 +900,7 @@ NETPLAY #include "../tasks/task_http.c" #include "../tasks/task_netplay_lan_scan.c" #include "../tasks/task_wifi.c" +#include "../tasks/task_netplay_crc.c" #endif /*============================================================ diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c new file mode 100644 index 0000000000..7e49775768 --- /dev/null +++ b/tasks/task_netplay_crc.c @@ -0,0 +1,136 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2016 - Jean-André Santoni + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tasks_internal.h" +#include "../file_path_special.h" +#include "../verbosity.h" +#include "../configuration.h" +#include "../playlist.h" + +typedef struct +{ + struct string_list *lpl_list; + char crc[PATH_MAX_LENGTH]; +} netplay_crc_handle_t; + +static void netplay_crc_scan_callback(void *task_data, + void *user_data, const char *error) +{ + printf("CALLBACK\n"); +} + +static void task_netplay_crc_scan_handler(retro_task_t *task) +{ + netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; + size_t i, j; + + task_set_progress(task, 0); + task_set_title(task, "Checking for ROM presence."); + task_set_finished(task, false); + + if (!state->lpl_list) + { + task_set_progress(task, 100); + task_set_title(task, "Playlist directory not found."); + task_set_finished(task, true); + return; + } + + if (state->lpl_list->size == 0) + goto no_playlists; + + for (i = 0; i < state->lpl_list->size; i++) + { + const char *lpl_path = state->lpl_list->elems[i].data; + + if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) + continue; + + printf("%s\n", lpl_path); + + playlist_t *playlist = playlist_init(lpl_path, 99999); + + for (j = 0; j < playlist->size; j++) + { + printf("%s\n", playlist->entries[j].crc32); + if (string_is_equal(playlist->entries[j].crc32, "6BE4CA95|crc")) + { + task_set_progress(task, 100); + task_set_title(task, "Game found."); + task_set_finished(task, true); + string_list_free(state->lpl_list); + return; + } + + task_set_progress(task, (int)(j/playlist->size*100.0)); + } + } + +no_playlists: + string_list_free(state->lpl_list); + task_set_progress(task, 100); + task_set_title(task, "No game found."); + task_set_finished(task, true); + return; +} + +bool task_push_netplay_crc_scan(uint32_t crc) +{ + settings_t *settings = config_get_ptr(); + retro_task_t *task = (retro_task_t *)calloc(1, sizeof(*task)); + netplay_crc_handle_t *state = (netplay_crc_handle_t*)calloc(1, sizeof(*state)); + + if (!task || !state) + goto error; + + state->crc[0] = '\0'; + snprintf(state->crc, sizeof(state->crc), "%08X|crc", crc); + + state->lpl_list = dir_list_new(settings->directory.playlist, + NULL, true, true, true, false); + + /* blocking means no other task can run while this one is running, + * which is the default */ + task->type = TASK_TYPE_BLOCKING; + task->state = state; + task->handler = task_netplay_crc_scan_handler; + task->callback = netplay_crc_scan_callback; + task->title = strdup("Checking for ROM presence."); + + task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); + + return true; + +error: + if (state) + free(state); + if (task) + free(task); + + return false; +} diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 0d50899867..51bbfea46f 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -98,6 +98,8 @@ bool task_push_wifi_scan(void); bool task_push_netplay_lan_scan(void); +bool task_push_netplay_crc_scan(uint32_t crc); + #endif bool task_push_image_load(const char *fullpath, From a75b5073eafab2179c4e4af8337a667229e2ccf4 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 07:10:36 +0100 Subject: [PATCH 311/427] Fix typo --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index ab21943774..1a12d28c68 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -243,7 +243,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Auslastungsgrad") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS, - "Maximale Benutzerzahl") + "Maximale Benutzeranzahl") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OSK_OVERLAY_ENABLE, "Zeige Tastatur-Overlay") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE, From d0906b09acb2fd87a60f0d9c37c049f9c7a59e72 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 07:24:21 +0100 Subject: [PATCH 312/427] Added inputsettings translation for german --- intl/msg_hash_de.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 1a12d28c68..5362d96f91 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -244,10 +244,20 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Auslastungsgrad") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS, "Maximale Benutzeranzahl") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, + "Gamepad-Menükombination") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OSK_OVERLAY_ENABLE, "Zeige Tastatur-Overlay") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE, "Aktiviere Overlay") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, + "Eingabeabfrageverhalten") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, + "Früh") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_LATE, + "Spät") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_NORMAL, + "Normal") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, /* UPDATE/FIXME */ "Eingabebelegungs-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, @@ -256,6 +266,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS, "Eingabeeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Turbo-Dauer") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, + "Einheitliche Menüsteuerung") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, "Spieler %u Tastenbelegung") MSG_HASH(MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, @@ -322,6 +334,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER, "Menütreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Menü-Dateibrowser-Einstellungen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, + "Wechsle Ok & Zurück Tasten im Menü") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Menüeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, @@ -959,10 +973,17 @@ MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Enable or disable recent playlist for games, images, music, and videos.") MSG_HASH(MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, "Zeigt Informationen über Core, Netzwerk, und des Systems an. Anzeigen-Manager für Datenbank und Zeiger.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, + "Maximale Anzahl Benutzer welche von RetroArch unterstützt werden.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, + "Gamepad-Tastenkombination um ins Menü zu gelangen.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, + "Hat Einwirkungen auf die Art wie Eingabeabfragen in RetroArch abgehandelt werden. " + "Werte 'Früh' und 'Spät' kann die Latenz verringern, je nach Konfiguration.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_SETTINGS, "Einstellungen für Joypads, Tastaturen und Mäuse.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, - "Use the same controls for both the menu and the game. Applies to the keyboard.") + "Verwende die selbe Steuerung für Menü und Spiele. Betrifft nur Tastatur.") MSG_HASH(MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, "Ändere die Logging-Einstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, @@ -1041,8 +1062,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_MENU, "Menü ein/aus") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_QUIT, "Beenden") -MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, - "Unified Menu Controls") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, "Browse URL" From d5ee28e17e9f304ad14199ccffec57f7953b06f4 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 07:24:45 +0100 Subject: [PATCH 313/427] Fixed typo --- intl/msg_hash_de.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 5362d96f91..a0c421d8f3 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -229,7 +229,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_IMAGES_TAB, MSG_HASH(MENU_ENUM_LABEL_VALUE_INFORMATION_LIST, "Informationen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU, - "Jeder nutze kann Menü Steuern") + "Jeder Nutzer kann das Menü steuern") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Automatische Konfiguration aktivieren") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, From 5068279e10e512c03460956dfbdca831234c897a Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 07:39:48 +0100 Subject: [PATCH 314/427] Add basic translations for input settings --- intl/msg_hash_de.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index a0c421d8f3..04fff0f3f7 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -234,6 +234,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Automatische Konfiguration aktivieren") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, "Schwellwert der Eingabe-Achsen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, + "Bind Unterbrechung") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND, "Verstecke nicht zugewiesene Core-Eingabe-Beschriftungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW, /* TODO/FIXME */ @@ -973,6 +975,16 @@ MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Enable or disable recent playlist for games, images, music, and videos.") MSG_HASH(MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, "Zeigt Informationen über Core, Netzwerk, und des Systems an. Anzeigen-Manager für Datenbank und Zeiger.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU, + "Ermöglicht jedem Spieler das Menü zu benutzen. Wenn deaktiviert, kann nur Spieler 1 das Menü benutzen.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_AXIS_THRESHOLD, + "Wie weit ein Analog-Stick bewegt werden muss bis er reagiert.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, + "Anzahl Sekunden bis der nächste Bind abgehandelt wird.") /* @TODO: What is a Bind? */ +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE, + "Anzahl Bilder wie lange ein Durchlauf während dem Turbomodus dauert.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, + "Einstellungen der Hotkeys.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "Maximale Anzahl Benutzer welche von RetroArch unterstützt werden.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -982,8 +994,12 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, "Werte 'Früh' und 'Spät' kann die Latenz verringern, je nach Konfiguration.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_SETTINGS, "Einstellungen für Joypads, Tastaturen und Mäuse.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, + "Anzahl Bilder wie lange der Turbomodus anhält.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Verwende die selbe Steuerung für Menü und Spiele. Betrifft nur Tastatur.") +MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, + "Bedienungseinstellungen dieses Spielers.") MSG_HASH(MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, "Ändere die Logging-Einstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, From 8fdac3a1a63121677fbc9e476eec4879eea14a71 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 08:02:46 +0100 Subject: [PATCH 315/427] Translated Hotkeys --- intl/msg_hash_de.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 04fff0f3f7..d68dec8479 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -248,6 +248,68 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS, "Maximale Benutzeranzahl") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Gamepad-Menükombination") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, + "Cheat-Index -") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, + "Cheat-Index +") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, + "Cheat ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, + "Disk ein-/auswerfen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, + "Nächste Disk") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, + "Vorherige Disk") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, + "Hotkeys ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Zeitraffer") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, + "Zeitraffer ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, + "Bildervorlauf") /* @TODO: I don't know what this is */ +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "Vollbild ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, + "Spielfokus ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, + "Maus greiffen ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, + "Lade Speicherstand") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, + "Menü ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, + "Videoaufzeichnung ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, + "Stumm ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, + "Netplay wechsle Benutzer") /* @TODO What does flip mean in this context? */ +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, + "Netplay Zuschauermodus ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, + "Bildschirmtastatus ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, + "Nächstes Overlay") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, + "Pause ein/aus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, + "RetroArch beenden") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, + "Zurückspulen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, + "Erstelle Speicherstand") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, + "Erstelle Bildschirmfoto") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, + "Zeitlupe") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, + "Speicherstandplatz -") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, + "Speicherstandplatz +") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, + "Lautstärke -") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, + "Lautstärke +") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OSK_OVERLAY_ENABLE, "Zeige Tastatur-Overlay") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE, From a3f38a951da110fe1bde0e57f584bce7f40e99c3 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 08:23:28 +0100 Subject: [PATCH 316/427] Add keybinding translations for german --- intl/msg_hash_de.h | 66 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index d68dec8479..a999a2ce5e 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -228,22 +228,76 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_IMAGES_TAB, "Bilder") MSG_HASH(MENU_ENUM_LABEL_VALUE_INFORMATION_LIST, "Informationen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ADC_TYPE, + "Analog-zu-Digital-Typ") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU, "Jeder Nutzer kann das Menü steuern") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X, + "Linker Analogstick X") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, + "Linker Analogstick X- (links)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, + "Linker Analogstick X+ (Rechts)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y, + "Linker Analogstick Y") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, + "Linker Analogstick Y- (hoch)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, + "Linker Analogstick Y+ (runter)") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Automatische Konfiguration aktivieren") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD, "Schwellwert der Eingabe-Achsen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, + "Binde alle") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, + "Binde alle Standard") /* @TODO: What is this */ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, - "Bind Unterbrechung") + "Bindeunterbrechung") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND, "Verstecke nicht zugewiesene Core-Eingabe-Beschriftungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW, /* TODO/FIXME */ "Zeige Core-Eingabe-Beschriftungen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, + "Geräteindex") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_TYPE, + "Gerätetyp") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, "Eingabetreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Auslastungsgrad") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, + "A-Knopf (rechts)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, + "B-Knopf (unten)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, + "Steuerkreuz unten") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, + "L-Knopf (Schultertaste)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, + "L2-Knopf (Abzug)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, + "L3-Knopf (Daumen)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, + "Steuerkreuz links") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, + "R-Knopf (Schultertaste)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, + "R2-Knopf (Abzug)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, + "R3-Knopf (Daumen)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, + "Steuerkreuz rechts") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, + "Select-Knopf") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, + "Startknopf") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, + "Steuerkreuz oben") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, + "X-Knopf (oben)") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, + "Y-Knopf (links)") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS, "Maximale Benutzeranzahl") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -294,12 +348,18 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, "Pause ein/aus") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "RetroArch beenden") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, + "Spiel zurücksetzen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Zurückspulen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Erstelle Speicherstand") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Erstelle Bildschirmfoto") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, + "Nächster Shader") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, + "Verheriger Shader") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, "Zeitlupe") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, @@ -326,8 +386,12 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, /* UPDATE/FIXME */ "Eingabebelegungs-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, "Bind-Remapping aktivieren") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, + "Speichere Autokonfigurationen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS, "Eingabeeinstellungen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, + "Turbo aktivieren") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Turbo-Dauer") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, From a84d83551e2fdededf3b1062c784de54fa735a0c Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 10:48:46 +0100 Subject: [PATCH 317/427] Add Core-Settings translations --- intl/msg_hash_de.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index a999a2ce5e..6111d11d13 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -70,6 +70,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_FILE_SAVE_AS, "Speichere Cheat-Datei unter...") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_NUM_PASSES, "Cheat-Durchgänge") +MSG_HASH(MENU_ENUM_LABEL_VALUE_CHECK_FOR_MISSING_FIRMWARE, + "Überprüfe Firmware vor dem Laden.") MSG_HASH(MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT, "Schließen") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS, @@ -1079,6 +1081,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_SYNC, "Synchronisiert Audio. Empfohlen.") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_VOLUME, "Lautstärkeverstärkung in dB.") +MSG_HASH(MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, + "Überprüfe benötigte Firmware bevor versucht wird einen Core zu laden.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, "Ändere die Standardeinstellungen für Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, @@ -1091,6 +1095,10 @@ MSG_HASH(MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, "Ändere das Standardverzeichis für dieses System.") MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "Ändere Treiber für dieses System.") +MSG_HASH(MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, + "Einige Cores haben ein Herunterfahren-Feature. " + "Wenn aktive, wird der Core davon abgehalten RetroArch herunterzufahren. " + "Stattdessen lädt es einen Dummy-Core.") MSG_HASH(MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, "Ändere die Einstellungen für Rückspulen, Zeitraffer, und Zeitlupe.") /* This does not sound like a correct sentence. Suggestions are appreciated. */ MSG_HASH(MENU_ENUM_SUBLABEL_FPS_SHOW, @@ -1154,6 +1162,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, "Ändere die Einstellungen der Benutzeroberfläche.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, "Ändere das Konto, Benutzername, und die Sprache.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, + "Erlaubt Cores die Rotation zu setzen. Wenn deaktiviert, Rotationsanfragen werden ignoriert. Nützlich für Geräte bei denen man die Rotation manuell wählt.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, "Zeigt ein schwarzes Bild zwischen Frames an. Nützlich für 120 Hz Monitore welche 60 Hz mit weniger 'ghosting' möchten.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, @@ -1178,6 +1188,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, "Die genau geschätzte Bildwiederholrate des Monitors in Hz.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, "Einstellungen zur Videoausgabe.") +MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, + "Gibt hardware-gerendered Cores einen eigenen privaten Kontext. Vermeided den Hardware-State anzunehmen zwischen den Frames.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_THREADED, "Verbessert die Leistung, führt aber zu grösserer Latenz und Videoproblemen. " "Verwende dies nur wenn du sonst die gewünschte Leistung erbringst.") From 02e77d68cf1c8095728554383d92188f91f80076 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 10:54:56 +0100 Subject: [PATCH 318/427] Translate configurationsettings to german --- intl/msg_hash_de.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 6111d11d13..321e79e5e8 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -1083,6 +1083,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_VOLUME, "Lautstärkeverstärkung in dB.") MSG_HASH(MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Überprüfe benötigte Firmware bevor versucht wird einen Core zu laden.") +MSG_HASH(MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, + "Speichert Änderungen in die Konfigurationsdatei beim Beenden.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, "Ändere die Standardeinstellungen für Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, @@ -1156,6 +1158,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, "Ändere die Einstellungen der Errungenschaften.") MSG_HASH(MENU_ENUM_SUBLABEL_SAVING_SETTINGS, "Ändere die Einstellungen der Spielstände.") +MSG_HASH(MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, + "Zeigt versteckte Dateien und Ordner im Dateimanager an.") MSG_HASH(MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE, "Haltet dein System davon ab den Bildschirmschoner zu aktivieren.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, @@ -1216,6 +1220,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_MENU, "Menü ein/aus") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_QUIT, "Beenden") +MSG_HASH(MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, + "Lade inhaltsspezifische Core-Optionen automatisch") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, "Browse URL" From 71d36eb8eeeb70faa4ce931c2eb4cf67cfa1e25a Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 10:59:08 +0100 Subject: [PATCH 319/427] Fixed typos --- intl/msg_hash_de.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 321e79e5e8..5c5527aaf7 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -707,11 +707,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RUN, MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY, "Spielstand-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Automatische Indexierung von Save States") + "Automatische Indexierung von Savestates") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Automatisches Laden von Save States") + "Automatisches Laden von Savestates") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, - "Automatische Save States") + "Automatische Savestates") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY, "Savestate-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG, @@ -749,9 +749,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, MSG_HASH(MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, "Zeitlupen-Verhältnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Sortiere Speicherdaten per Ordner") + "Sortiere Speicherdateien per Ordner") MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Sortiere Save States per Ordner") + "Sortiere Savestates per Ordner") MSG_HASH(MENU_ENUM_LABEL_VALUE_STATUS, "Status") MSG_HASH(MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD, From b73c69f51e889fedee58f4b1759a966769761b6d Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 11:02:55 +0100 Subject: [PATCH 320/427] Translate savestatesettings --- intl/msg_hash_de.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 5c5527aaf7..6bd5019c0a 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -43,7 +43,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_SYNC, MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME, "Lautstärke (dB)") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, - "Autospeicherungsintervall") + "Automatischespeicherungsintervall") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTO_OVERRIDES_ENABLE, "Override-Dateien automatisch laden") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTO_REMAPS_ENABLE, @@ -714,6 +714,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "Automatische Savestates") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY, "Savestate-Verzeichnis") +MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, + "Savestate Miniaturansichten") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG, "Aktuelle Konfigurationen speichern") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG, From 0bbf57332c2b9a9dbae195c04b0507f12623b605 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 11:48:02 +0100 Subject: [PATCH 321/427] Translated Logging setting --- intl/msg_hash_de.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 6bd5019c0a..9aec15211a 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -1138,6 +1138,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Verwende die selbe Steuerung für Menü und Spiele. Betrifft nur Tastatur.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, "Bedienungseinstellungen dieses Spielers.") +MSG_HASH(MENU_ENUM_SUBLABEL_LOG_VERBOSITY, + "Aktiviere Logging im Terminal.") MSG_HASH(MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, "Ändere die Logging-Einstellungen.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, From ccfd24eeb46d6930d70cff4420bf344b31cb8bd9 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:03:46 +0100 Subject: [PATCH 322/427] Translate Fram throttle settings --- intl/msg_hash_de.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 9aec15211a..e32f915380 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -462,6 +462,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MANAGEMENT, "Datenbankeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER, "Menütreiber") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, + "Drossle Menübildwiederholrate") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Menü-Dateibrowser-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, From 4b1bbbd3da5b608ee90e4b1b3443a31daa088560 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:13:26 +0100 Subject: [PATCH 323/427] Translate OSD settings --- intl/msg_hash_de.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index e32f915380..cfdb6ab3ab 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -376,6 +376,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OSK_OVERLAY_ENABLE, "Zeige Tastatur-Overlay") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE, "Aktiviere Overlay") +MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU, + "Overlay im Menü nicht anzeigen") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, "Eingabeabfrageverhalten") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, @@ -586,12 +588,16 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, "Online-Aktualisierung") MSG_HASH(MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS, "OSD-Einstellungen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS, + "Bildschirm-Overlay") MSG_HASH(MENU_ENUM_LABEL_VALUE_OPEN_ARCHIVE, "Öffne Archiv") /* TODO/FIXME */ MSG_HASH(MENU_ENUM_LABEL_VALUE_OPTIONAL, "Optional") MSG_HASH(MENU_ENUM_LABEL_VALUE_OSK_OVERLAY_DIRECTORY, "OSK-Overlay-Verzeichnis") +MSG_HASH(MENU_ENUM_LABEL_VALUE_OVERLAY_AUTOLOAD_PREFERRED, + "Automatisch bevorzuges Overlay laden") MSG_HASH(MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "Overlay-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_OVERLAY_OPACITY, @@ -1179,7 +1185,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Enable or disable composition (Windows only).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, - "Show onscreen messages.") + "Zeige Bildschirmbenachrichtigungen an.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, "Reduziert Latenz, kann aber zu Anzeigefehlern führen. Fügt einen Unterbruch bei V-Sync hinzu (in ms).") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, From 57f8c637bf31e94fa054d0d7599756b6fe8d619c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 12:38:20 +0100 Subject: [PATCH 324/427] Cut down on runloop_ctl calls inside gfx/drivers --- gfx/drivers/gl.c | 4 ++-- gfx/drivers/vulkan.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 4fda106a17..f9944dec28 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1340,8 +1340,8 @@ static bool gl_frame(void *data, const void *frame, if ( video_info->black_frame_insertion && !input_driver_is_nonblock_state() - && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) - && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) + && !video_info->runloop_is_slowmotion + && !video_info->runloop_is_paused) { video_context_driver_swap_buffers(video_info); glClear(GL_COLOR_BUFFER_BIT); diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 675ecbac9a..cd05e3d3ef 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1933,8 +1933,8 @@ static bool vulkan_frame(void *data, const void *frame, if ( video_info->black_frame_insertion && !input_driver_is_nonblock_state() - && !runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL) - && !runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL)) + && !video_info->runloop_is_slowmotion + && !video_info->runloop_is_paused) { vulkan_inject_black_frame(vk, video_info); } From 74f73aeee57e937891b26ae8b428b597041fd9e0 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:43:13 +0100 Subject: [PATCH 325/427] Fixed typos and added translations for menu settings --- intl/msg_hash_de.h | 58 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index cfdb6ab3ab..fc220ab719 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -137,9 +137,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_BUILDBOT_URL, "Buildbot-Cores-URL") MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST, - "Core-Updater") + "Aktualisiere Core") MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SETTINGS, - "Core-Updater-Einstellungen") /* UPDATE/FIXME */ + "Core-Aktualisierungseinstellungen") /* UPDATE/FIXME */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CURSOR_DIRECTORY, "Cursor-Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_CURSOR_MANAGER, @@ -462,6 +462,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MAIN_MENU, "Hauptmenü") MSG_HASH(MENU_ENUM_LABEL_VALUE_MANAGEMENT, "Datenbankeinstellungen") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME, + "Menüfarbschema") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER, "Menütreiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -470,18 +472,20 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Menü-Dateibrowser-Einstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Wechsle Ok & Zurück Tasten im Menü") +MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, + "Linearer Filter") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Menüeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, "Menühintergrund") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, - "Background opacity") + "Hintergrundtransparenz") MSG_HASH(MENU_ENUM_LABEL_VALUE_MISSING, "Fehlt") MSG_HASH(MENU_ENUM_LABEL_VALUE_MORE, "...") MSG_HASH(MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, - "Maus-Unterstützung") + "Mausunterstützung") MSG_HASH(MENU_ENUM_LABEL_VALUE_MULTIMEDIA_SETTINGS, "Multimediaeinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MUSIC_TAB, @@ -613,7 +617,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PAL60_ENABLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY, "Übergeordnetes Verzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pausiere, wenn das Menü aktiv ist") + "Pausiere wenn das Menü aktiv ist") MSG_HASH(MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, "Nicht im Hintergrund laufen") MSG_HASH(MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, @@ -901,7 +905,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_ZLIB_SUPPORT, MSG_HASH(MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT, "Bildschirmfoto") MSG_HASH(MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, - "Threaded Data Runloop") + "Threaded Datenschlaufe") +MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS, + "Boxart") +MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, + "Bildschirmfoto") +MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS, + "Titelbildschrim") +MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS, + "Miniaturansichten") +MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, + "Aktualisiere Miniaturansichten") MSG_HASH(MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, "Zeige Uhrzeit / Datum") MSG_HASH(MENU_ENUM_LABEL_VALUE_TITLE_COLOR, @@ -1058,18 +1072,30 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "WLAN-Treiber") MSG_HASH(MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS, "WLAN") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR, + "Menüalphafaktor") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_FONT, + "Menüschriftart") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, + "Menü-Shaderpipeline") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SCALE_FACTOR, + "Menüskalierungsfaktor") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, - "Icon Schatten") + "Bild Schatten") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_ADD, + "Zeige Inhalte importieren Tab") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_HISTORY, - "Zeige Verlauf") + "Zeige Verlauf Tab") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_IMAGES, - "Zeige Bilder") + "Zeige Bilder Tab") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_MUSIC, - "Zeige Musik") + "Zeige Musik Tab") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS, - "Zeige Einstellungen") + "Zeige Einstellungen Tab") MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO, - "Zeige Videos") + "Zeige Videos Tab") +MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_THEME, + "Menüdesign") MSG_HASH(MENU_ENUM_LABEL_VALUE_YES, "Ja") MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_ENABLE, @@ -1150,6 +1176,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_LOG_VERBOSITY, "Aktiviere Logging im Terminal.") MSG_HASH(MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, "Ändere die Logging-Einstellungen.") +MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SETTINGS, + "Stellt die Einstellungen für das Aussehen des Menübildschirms ein.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY, "Hoste eine Netplay Session oder trete einer bei.") MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_LAN_SCAN_SETTINGS, @@ -1161,7 +1189,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_ONLINE_UPDATER, MSG_HASH(MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS, "Ändere die Einstellungen des Display-Overlays, Bildschirmtastatur und Bildschirmbenachrichtigung.") /* There is no Translation for display overlay. */ MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, - "Pause gameplay when window focus is lost.") + "Spiel pausieren wenn das Fenster den Fokus verliert.") MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, "Ändere die Einstellungen der Wiedergabelisten.") MSG_HASH(MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS, @@ -1183,7 +1211,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, "Zeigt ein schwarzes Bild zwischen Frames an. Nützlich für 120 Hz Monitore welche 60 Hz mit weniger 'ghosting' möchten.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, - "Enable or disable composition (Windows only).") + "Deaktiviere Desktop-Komposition. (Nur bei Windows)") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Zeige Bildschirmbenachrichtigungen an.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, @@ -1232,6 +1260,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_MENU, "Menü ein/aus") MSG_HASH(MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_QUIT, "Beenden") +MSG_HASH(MENU_ENUM_LABEL_VALUE_BATTERY_LEVEL_ENABLE, + "Batteriestand anzeigen") MSG_HASH(MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "Lade inhaltsspezifische Core-Optionen automatisch") MSG_HASH( From 768ce0854cc8ab3ac18dd492fcaa8e93b4ba384f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 12:47:17 +0100 Subject: [PATCH 326/427] Make driver_set_nonblock_state a public function --- driver.c | 9 +++------ driver.h | 12 ++++++------ menu/menu_driver.c | 2 +- network/netplay/netplay_sync.c | 6 +++--- runloop.c | 4 ++-- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/driver.c b/driver.c index b0f1aacfd5..f22b3b929f 100644 --- a/driver.c +++ b/driver.c @@ -225,7 +225,7 @@ static void driver_adjust_system_rates(void) if (runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL)) command_event(CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE, NULL); else - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } /** @@ -236,7 +236,7 @@ static void driver_adjust_system_rates(void) * If nonblock state is false, sets * blocking state for both audio and video drivers instead. **/ -static void driver_set_nonblock_state(void) +void driver_set_nonblock_state(void) { bool enable = input_driver_is_nonblock_state(); @@ -360,7 +360,7 @@ void drivers_init(int flags) { /* Keep non-throttled state as good as possible. */ if (input_driver_is_nonblock_state()) - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } } @@ -472,9 +472,6 @@ bool driver_ctl(enum driver_ctl_state state, void *data) driver_adjust_system_rates(); } break; - case RARCH_DRIVER_CTL_SET_NONBLOCK_STATE: - driver_set_nonblock_state(); - break; case RARCH_DRIVER_CTL_UPDATE_SYSTEM_AV_INFO: { const struct retro_system_av_info **info = (const struct retro_system_av_info**)data; diff --git a/driver.h b/driver.h index 34633736e6..ca423969f0 100644 --- a/driver.h +++ b/driver.h @@ -84,12 +84,6 @@ enum driver_ctl_state * calls audio_monitor_set_refresh_rate(). */ RARCH_DRIVER_CTL_SET_REFRESH_RATE, - /* Sets audio and video drivers to nonblock state. - * - * If nonblock state is false, sets blocking state for both - * audio and video drivers instead. */ - RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, - /* Update the system Audio/Video information. * Will reinitialize audio/video drivers. * Used by RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO. */ @@ -115,6 +109,12 @@ typedef struct driver_ctx_info bool driver_ctl(enum driver_ctl_state state, void *data); +/* Sets audio and video drivers to nonblock state. + * + * If nonblock state is false, sets blocking state for both + * audio and video drivers instead. */ +void driver_set_nonblock_state(void); + void drivers_init(int flags); RETRO_END_DECLS diff --git a/menu/menu_driver.c b/menu/menu_driver.c index e0e787a697..5ad3570aee 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -279,7 +279,7 @@ static void menu_driver_toggle(bool on) else { if (!runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)) - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); if (settings && settings->menu.pause_libretro) command_event(CMD_EVENT_AUDIO_START, NULL); diff --git a/network/netplay/netplay_sync.c b/network/netplay/netplay_sync.c index ac98b9c491..68421caf6a 100644 --- a/network/netplay/netplay_sync.c +++ b/network/netplay/netplay_sync.c @@ -372,7 +372,7 @@ void netplay_sync_post_frame(netplay_t *netplay, bool stalled) { netplay->catch_up = false; input_driver_unset_nonblock_state(); - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } return; } @@ -524,7 +524,7 @@ void netplay_sync_post_frame(netplay_t *netplay, bool stalled) { netplay->catch_up = false; input_driver_unset_nonblock_state(); - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } } @@ -535,7 +535,7 @@ void netplay_sync_post_frame(netplay_t *netplay, bool stalled) /* Are we falling behind? */ netplay->catch_up = true; input_driver_set_nonblock_state(); - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } else if (netplay->self_frame_count + 2 < hi_frame_count) diff --git a/runloop.c b/runloop.c index fe8220fcb8..0ea85b80b0 100644 --- a/runloop.c +++ b/runloop.c @@ -910,7 +910,7 @@ static enum runloop_state runloop_check_state( input_driver_unset_nonblock_state(); else input_driver_set_nonblock_state(); - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } else if ((runloop_cmd_pressed(old_input, RARCH_FAST_FORWARD_HOLD_KEY) != runloop_cmd_press(current_input, RARCH_FAST_FORWARD_HOLD_KEY))) @@ -919,7 +919,7 @@ static enum runloop_state runloop_check_state( input_driver_set_nonblock_state(); else input_driver_unset_nonblock_state(); - driver_ctl(RARCH_DRIVER_CTL_SET_NONBLOCK_STATE, NULL); + driver_set_nonblock_state(); } /* Checks if the state increase/decrease keys have been pressed From 0fad786e87830b42a3f57209c64e7cc413c54bb9 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:51:08 +0100 Subject: [PATCH 327/427] Translate achievement settings --- intl/msg_hash_de.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index fc220ab719..26e5e7c68e 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -72,6 +72,12 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_NUM_PASSES, "Cheat-Durchgänge") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHECK_FOR_MISSING_FIRMWARE, "Überprüfe Firmware vor dem Laden.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, + "Aktiviere Errungenschaften") +MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, + "Hardcore-Modus") +MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_TEST_UNOFFICIAL, + "Teste unoffizielle Errungenschaften") MSG_HASH(MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT, "Schließen") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIGURATIONS, @@ -1119,6 +1125,13 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_VOLUME, "Lautstärkeverstärkung in dB.") MSG_HASH(MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Überprüfe benötigte Firmware bevor versucht wird einen Core zu laden.") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, + "Aktiviert Errungenschaften. " + "Für weitere Informationen, besuche http://retroachievements.org") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, + "Deaktiviert Savestates, Cheats, Zurückspulen, Zeitraffer, Pause, und Zeitlupe für alle Spiele.") +MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, + "Aktiviere unoffizielle Errungenschaften und/oder Beta-Features zu Testzwecken.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, "Speichert Änderungen in die Konfigurationsdatei beim Beenden.") MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, From b6ec040968892318b41a862be92b9b46cc0ff89a Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:53:06 +0100 Subject: [PATCH 328/427] Translate network settings --- intl/msg_hash_de.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 26e5e7c68e..a05996667b 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -952,6 +952,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS, "Aktualisiere GLSL-Shader") MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATE_OVERLAYS, "Aktualisiere Overlays") +MSG_HASH(MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, + "Aktualisierungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_USER, "Benutzer") MSG_HASH(MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS, From ba92198bbeb9429b5fbf8f98a3d813920130d577 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:56:52 +0100 Subject: [PATCH 329/427] Translate playlist settings --- intl/msg_hash_de.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index a05996667b..7e1ace2799 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -630,6 +630,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "Leistungsindikatoren") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "Wiedergabelisten-Verzeichnis") +MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, + "Löschen von Einträgen erlauben") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS, "Wiedergabelisteneinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -1141,7 +1143,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, MSG_HASH(MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, "Verwalte und erstelle Konfigurationsdateien.") MSG_HASH(MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, - "Limit the number of entries in recent playlist for games, images, music, and videos.") + "Limitiert die Anzahl der Einträge in der Verlaufsliste.") MSG_HASH(MENU_ENUM_SUBLABEL_CORE_SETTINGS, "Ändere die Einstellungen der Cores.") MSG_HASH(MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, @@ -1159,7 +1161,7 @@ MSG_HASH(MENU_ENUM_SUBLABEL_FPS_SHOW, MSG_HASH(MENU_ENUM_SUBLABEL_HELP_LIST, "Erfahre mehr derüber wie Retroarch funktioniert.") MSG_HASH(MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, - "Enable or disable recent playlist for games, images, music, and videos.") + "Aktiviere Wiedergabeliste für kürzlich geöffnete Medien.") MSG_HASH(MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, "Zeigt Informationen über Core, Netzwerk, und des Systems an. Anzeigen-Manager für Datenbank und Zeiger.") MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU, From 0a3769500ef1dcb0014936f176eed0c5592aa245 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 12:58:50 +0100 Subject: [PATCH 330/427] Translate user settings --- intl/msg_hash_de.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 7e1ace2799..332dcb9808 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -1221,6 +1221,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE, "Haltet dein System davon ab den Bildschirmschoner zu aktivieren.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, "Ändere die Einstellungen der Benutzeroberfläche.") +MSG_HASH(MENU_ENUM_SUBLABEL_USER_LANGUAGE, + "Ändere die Sprache der Oberfläche.") MSG_HASH(MENU_ENUM_SUBLABEL_USER_SETTINGS, "Ändere das Konto, Benutzername, und die Sprache.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, From 3028a3da05a27232de3c8a496fc7db946e4c44b6 Mon Sep 17 00:00:00 2001 From: CoalaJoe Date: Sun, 22 Jan 2017 13:04:56 +0100 Subject: [PATCH 331/427] Translate directory settings --- intl/msg_hash_de.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 332dcb9808..b9a3b40f9e 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -23,7 +23,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN, MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE, "Aktiviere Audio") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_FILTER_DIR, - "Audio-Filter-Verzeichnis") + "Audiofilterverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY, "Audiolatenz (ms)") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW, @@ -31,7 +31,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW, MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_MUTE, "Stumm") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_RATE, - "Audio-Frequenzrate (kHz)") + "Audiofrequenzrate (kHz)") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, "Audio Rate Control Delta") MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_DRIVER, @@ -53,7 +53,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE, MSG_HASH(MENU_ENUM_LABEL_VALUE_BUILDBOT_ASSETS_URL, "Buildbot-Assets-URL") MSG_HASH(MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY, /* FIXME/UPDATE */ - "Entpack-Verzeichnis") + "Entpackverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_CAMERA_ALLOW, "Erlaube Kamera-Zugriff") MSG_HASH(MENU_ENUM_LABEL_VALUE_CAMERA_DRIVER, @@ -63,7 +63,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT, MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_CHANGES, "Änderungen übernehmen") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH, - "Cheat-Datei-Verzeichnis") + "Cheat-Dateiverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD, "Cheat-Datei laden") MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEAT_FILE_SAVE_AS, @@ -91,7 +91,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST, "Inhalt laden") /* FIXME/TODO - rewrite */ MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY, - "Inhalts-Datenbankverzeichnis") + "Inhaltsdatenbankverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_SIZE, "Länge der Verlaufsliste") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS, @@ -195,7 +195,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, MSG_HASH(MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPER, "Dynamischer Hintergrund") MSG_HASH(MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, - "Dynamische-Bildschirmhintergründe-Verzeichnis") + "Dynamischehintergrundbilderverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_ENTRY_HOVER_COLOR, "Hover-Farbe für Menü-Einträge") MSG_HASH(MENU_ENUM_LABEL_VALUE_ENTRY_NORMAL_COLOR, @@ -393,7 +393,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_LATE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_NORMAL, "Normal") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, /* UPDATE/FIXME */ - "Eingabebelegungs-Verzeichnis") + "Eingabebelegungsverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, "Bind-Remapping aktivieren") MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, @@ -475,7 +475,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DRIVER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, "Drossle Menübildwiederholrate") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, - "Menü-Dateibrowser-Einstellungen") + "Menü-Dateibrowsereinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "Wechsle Ok & Zurück Tasten im Menü") MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, @@ -629,7 +629,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, MSG_HASH(MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "Leistungsindikatoren") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, - "Wiedergabelisten-Verzeichnis") + "Wiedergabelistenverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, "Löschen von Einträgen erlauben") MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS, @@ -715,9 +715,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, MSG_HASH(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS, "Zurückspuleinstellungen") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, - "Dateibrowser-Verzeichnis") + "Dateibrowserverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, - "Konfigurations-Verzeichnis") + "Konfigurationsverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "Zeige Startbildschirm") MSG_HASH(MENU_ENUM_LABEL_VALUE_RIGHT_ANALOG, @@ -725,7 +725,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_RIGHT_ANALOG, MSG_HASH(MENU_ENUM_LABEL_VALUE_RUN, "Starten") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY, - "Spielstand-Verzeichnis") + "Spielstandverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, "Automatische Indexierung von Savestates") MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, @@ -751,7 +751,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCAN_FILE, MSG_HASH(MENU_ENUM_LABEL_VALUE_SCAN_THIS_DIRECTORY, "<- Durchsuchen ->") MSG_HASH(MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, - "Bildschirmfoto-Verzeichnis") + "Bildschirmfotoverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, "Bildschirmauflösung") MSG_HASH(MENU_ENUM_LABEL_VALUE_SECONDS, @@ -922,6 +922,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS, "Titelbildschrim") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS, "Miniaturansichten") +MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY, + "Miniaturansichtenverzeichnis") MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, "Aktualisiere Miniaturansichten") MSG_HASH(MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, From 96c8ca5a0996badb457d145a218856a0a3f79978 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 13:40:32 +0100 Subject: [PATCH 332/427] Header update #1 --- audio/audio_driver.c | 2 +- audio/audio_driver.h | 2 +- audio/audio_thread_wrapper.c | 2 +- audio/audio_thread_wrapper.h | 2 +- audio/drivers/alsa.c | 1 + audio/drivers/alsa_qsa.c | 2 +- audio/drivers/ctr_csnd_audio.c | 2 +- audio/drivers/ctr_dsp_audio.c | 2 +- audio/drivers/dsound.c | 2 +- audio/drivers/gx_audio.c | 2 +- audio/drivers/nullaudio.c | 1 + audio/drivers/openal.c | 1 + audio/drivers/opensl.c | 2 +- audio/drivers/oss.c | 1 + audio/drivers/ps3_audio.c | 2 +- audio/drivers/psp_audio.c | 4 ++-- audio/drivers/pulse.c | 1 + audio/drivers/roar.c | 1 + audio/drivers/rsound.c | 1 + audio/drivers/rwebaudio.c | 1 + audio/drivers/sdl_audio.c | 1 + audio/drivers/wiiu_audio.c | 4 ++-- audio/drivers/xaudio.cpp | 2 +- audio/drivers/xaudio.h | 2 +- audio/drivers/xenon360_audio.c | 2 +- audio/drivers_resampler/cc_resampler.c | 2 +- audio/drivers_resampler/cc_resampler_neon.S | 2 +- audio/librsound.c | 2 +- camera/camera_driver.c | 2 +- camera/camera_driver.h | 2 +- camera/drivers/android.c | 2 +- camera/drivers/nullcamera.c | 3 ++- camera/drivers/rwebcam.c | 1 + camera/drivers/video4linux2.c | 2 +- cores/dynamic_dummy.c | 2 +- cores/internal_cores.h | 2 +- defines/d3d_defines.h | 2 +- defines/gx_defines.h | 2 +- defines/ps3_defines.h | 2 +- defines/psp_defines.h | 2 +- defines/xdk_defines.h | 2 +- frontend/drivers/platform_bsd.c | 2 +- frontend/drivers/platform_ctr.c | 3 ++- frontend/drivers/platform_darwin.m | 2 +- frontend/drivers/platform_emscripten.c | 2 +- frontend/drivers/platform_gx.c | 2 +- frontend/drivers/platform_linux.c | 2 +- frontend/drivers/platform_linux.h | 2 +- frontend/drivers/platform_null.c | 3 +-- frontend/drivers/platform_ps3.c | 2 +- frontend/drivers/platform_psp.c | 2 +- frontend/drivers/platform_qnx.c | 2 +- frontend/drivers/platform_wii.c | 2 +- frontend/drivers/platform_wiiu.c | 1 + frontend/drivers/platform_win32.c | 2 +- frontend/drivers/platform_xdk.cpp | 2 +- frontend/drivers/platform_xenon.c | 2 +- frontend/frontend.c | 2 +- frontend/frontend.h | 2 +- frontend/frontend_driver.c | 2 +- frontend/frontend_driver.h | 2 +- frontend/frontend_salamander.c | 2 +- gfx/common/caca_common.h | 4 ++-- gfx/common/ctr_common.h | 15 +++++++++++++++ gfx/common/d3d_common.cpp | 2 +- gfx/common/d3d_common.h | 2 +- gfx/common/drm_common.c | 2 +- gfx/common/drm_common.h | 2 +- gfx/common/egl_common.c | 2 +- gfx/common/egl_common.h | 2 +- gfx/common/gdi_common.h | 4 ++-- gfx/common/gl_common.c | 2 +- gfx/common/gl_common.h | 2 +- gfx/common/vita2d_common.h | 2 +- gfx/common/vksym.h | 4 ++-- gfx/common/vulkan_common.c | 2 +- gfx/common/vulkan_common.h | 2 +- gfx/common/win32_common.cpp | 2 +- gfx/common/win32_common.h | 2 +- gfx/common/x11_common.c | 2 +- gfx/common/x11_common.h | 2 +- gfx/drivers/caca_gfx.c | 4 ++-- gfx/drivers/ctr_gfx.c | 2 +- gfx/drivers/ctr_gu.h | 2 +- gfx/drivers/d3d.cpp | 2 +- gfx/drivers/d3d.h | 2 +- gfx/drivers/d3d_renderchains/render_chain_cg.cpp | 2 +- .../d3d_renderchains/render_chain_driver.c | 2 +- .../d3d_renderchains/render_chain_driver.h | 2 +- gfx/drivers/d3d_renderchains/render_chain_null.c | 2 +- gfx/drivers/d3d_renderchains/render_chain_xdk.cpp | 2 +- gfx/drivers/dispmanx_gfx.c | 3 ++- gfx/drivers/drm_gfx.c | 6 +++++- gfx/drivers/exynos_gfx.c | 1 + gfx/drivers/gdi_gfx.c | 4 ++-- gfx/drivers/gl.c | 2 +- gfx/drivers/gl_renderchains/render_chain_gl.h | 2 +- .../gl_renderchains/render_chain_gl_legacy.c | 2 +- gfx/drivers/gl_symlinks.h | 2 +- gfx/drivers/gx_gfx.c | 2 +- gfx/drivers/nullgfx.c | 2 +- gfx/drivers/omap_gfx.c | 1 + gfx/drivers/psp1_gfx.c | 4 ++-- gfx/drivers/psp1_gfx.h | 3 ++- gfx/drivers/sdl2_gfx.c | 3 ++- gfx/drivers/sdl_gfx.c | 3 ++- gfx/drivers/sunxi_gfx.c | 3 ++- gfx/drivers/vg.c | 1 + gfx/drivers/vita2d_gfx.c | 4 ++-- gfx/drivers/vulkan.c | 3 ++- gfx/drivers/wiiu_gfx.c | 3 ++- gfx/drivers/xenon360_gfx.c | 2 +- gfx/drivers/xshm_gfx.c | 4 ++-- gfx/drivers/xvideo.c | 2 +- gfx/drivers_context/android_ctx.c | 2 +- gfx/drivers_context/cgl_ctx.c | 2 +- gfx/drivers_context/cocoa_gl_ctx.m | 2 +- gfx/drivers_context/d3d_ctx.cpp | 2 +- gfx/drivers_context/drm_ctx.c | 2 +- gfx/drivers_context/emscriptenegl_ctx.c | 1 + gfx/drivers_context/gdi_ctx.cpp | 4 ++-- gfx/drivers_context/gfx_null_ctx.c | 2 +- gfx/drivers_context/khr_display_ctx.c | 2 +- gfx/drivers_context/osmesa_ctx.c | 4 ++-- gfx/drivers_context/ps3_ctx.c | 2 +- gfx/drivers_context/qnx_ctx.c | 2 +- gfx/drivers_context/sdl_gl_ctx.c | 2 +- gfx/drivers_context/vc_egl_ctx.c | 1 + gfx/drivers_context/vivante_fbdev_ctx.c | 1 + gfx/drivers_context/wayland_ctx.c | 2 +- gfx/drivers_context/wgl_ctx.cpp | 2 +- gfx/drivers_context/x_ctx.c | 4 ++-- gfx/drivers_context/xegl_ctx.c | 2 +- gfx/drivers_font/caca_font.c | 4 ++-- gfx/drivers_font/ctr_font.c | 2 +- gfx/drivers_font/d3d_w32_font.cpp | 2 +- gfx/drivers_font/gdi_font.c | 4 ++-- gfx/drivers_font/gl_raster_font.c | 4 ++-- gfx/drivers_font/ps_libdbgfont.c | 2 +- gfx/drivers_font/vita2d_font.c | 2 +- gfx/drivers_font/vulkan_raster_font.c | 2 +- gfx/drivers_font/xdk1_xfonts.c | 2 +- gfx/drivers_font/xdk360_fonts.cpp | 2 +- gfx/drivers_font_renderer/bitmap.h | 2 +- gfx/drivers_font_renderer/bitmapfont.c | 2 +- gfx/drivers_font_renderer/coretext.c | 2 +- gfx/drivers_font_renderer/freetype.c | 2 +- gfx/drivers_font_renderer/stb.c | 2 +- gfx/drivers_font_renderer/stb_unicode.c | 2 +- gfx/drivers_shader/glslang_util.cpp | 2 +- gfx/drivers_shader/glslang_util.hpp | 2 +- gfx/drivers_shader/shader_gl_cg.c | 2 +- gfx/drivers_shader/shader_glsl.c | 1 + gfx/drivers_shader/shader_glsl.h | 1 + gfx/drivers_shader/shader_hlsl.c | 2 +- gfx/drivers_shader/shader_hlsl.h | 2 +- gfx/drivers_shader/shader_null.c | 2 +- gfx/drivers_shader/shader_vulkan.cpp | 1 + gfx/drivers_shader/shader_vulkan.h | 1 + gfx/drivers_shader/slang_preprocess.cpp | 2 +- gfx/drivers_shader/slang_preprocess.h | 2 +- gfx/drivers_shader/slang_reflection.cpp | 2 +- gfx/drivers_shader/slang_reflection.hpp | 2 +- gfx/drivers_tracker/video_state_python.c | 2 +- gfx/drivers_tracker/video_state_python.h | 2 +- gfx/font_driver.c | 2 +- gfx/font_driver.h | 2 +- gfx/video_context_driver.c | 4 ++-- gfx/video_context_driver.h | 4 ++-- gfx/video_coord_array.c | 2 +- gfx/video_coord_array.h | 2 +- gfx/video_defines.h | 2 +- gfx/video_driver.c | 2 +- gfx/video_driver.h | 2 +- gfx/video_filter.c | 2 +- gfx/video_filter.h | 2 +- gfx/video_filters/2xbr.c | 2 +- gfx/video_filters/2xsai.c | 2 +- gfx/video_filters/blargg_ntsc_snes.c | 2 +- gfx/video_filters/darken.c | 2 +- gfx/video_filters/epx.c | 2 +- gfx/video_filters/lq2x.c | 2 +- gfx/video_filters/phosphor2x.c | 2 +- gfx/video_filters/scale2x.c | 2 +- gfx/video_filters/softfilter.h | 1 + gfx/video_filters/supereagle.c | 2 +- gfx/video_shader_driver.c | 2 +- gfx/video_shader_driver.h | 2 +- gfx/video_shader_parse.c | 2 +- gfx/video_shader_parse.h | 2 +- gfx/video_state_tracker.c | 2 +- gfx/video_state_tracker.h | 2 +- gfx/video_thread_wrapper.c | 2 +- gfx/video_thread_wrapper.h | 2 +- griffin/griffin.c | 2 +- griffin/griffin_cpp.cpp | 2 +- griffin/griffin_objc.m | 2 +- input/common/epoll_common.c | 2 +- input/common/epoll_common.h | 2 +- input/common/input_x11_common.c | 2 +- input/common/input_x11_common.h | 2 +- input/common/linux_common.c | 2 +- input/common/linux_common.h | 2 +- input/common/udev_common.c | 2 +- input/common/udev_common.h | 2 +- input/connect/connect_nesusb.c | 2 +- input/connect/connect_ps2adapter.c | 2 +- input/connect/connect_ps3.c | 2 +- input/connect/connect_ps4.c | 2 +- input/connect/connect_snesusb.c | 2 +- input/connect/connect_wii.c | 2 +- input/connect/connect_wiiugca.c | 2 +- input/connect/connect_wiiupro.c | 2 +- input/connect/joypad_connection.c | 2 +- input/connect/joypad_connection.h | 2 +- input/drivers/android_input.c | 2 +- input/drivers/cocoa_input.c | 2 +- input/drivers/cocoa_input.h | 2 +- input/drivers/ctr_input.c | 3 ++- input/drivers/dinput.c | 2 +- input/drivers/gx_input.c | 2 +- input/drivers/linuxraw_input.c | 1 + input/drivers/nullinput.c | 2 +- input/drivers/ps3_input.c | 2 +- input/drivers/psp_input.c | 2 +- input/drivers/qnx_input.c | 2 +- input/drivers/rwebinput_input.c | 1 + input/drivers/sdl_input.c | 1 + input/drivers/udev_input.c | 1 + input/drivers/wiiu_input.c | 3 ++- input/drivers/x11_input.c | 1 + input/drivers/xdk_xinput_input.c | 2 +- input/drivers/xenon360_input.c | 2 +- input/drivers_hid/btstack_hid.c | 2 +- input/drivers_hid/iohidmanager_hid.c | 2 +- input/drivers_hid/libusb_hid.c | 2 +- input/drivers_hid/null_hid.c | 2 +- input/drivers_hid/wiiusb_hid.c | 3 ++- input/drivers_joypad/android_joypad.c | 2 +- input/drivers_joypad/ctr_joypad.c | 4 ++-- input/drivers_joypad/dinput_joypad.c | 2 +- input/drivers_joypad/gx_joypad.c | 2 +- input/drivers_joypad/hid_joypad.c | 2 +- input/drivers_joypad/linuxraw_joypad.c | 2 +- input/drivers_joypad/mfi_joypad.m | 2 +- input/drivers_joypad/null_joypad.c | 2 +- input/drivers_joypad/parport_joypad.c | 1 + input/drivers_joypad/ps3_joypad.c | 2 +- input/drivers_joypad/psp_joypad.c | 2 +- input/drivers_joypad/qnx_joypad.c | 2 +- input/drivers_joypad/sdl_joypad.c | 3 ++- input/drivers_joypad/udev_joypad.c | 2 +- input/drivers_joypad/wiiu_joypad.c | 4 ++-- input/drivers_joypad/xdk_joypad.c | 2 +- input/drivers_joypad/xinput_joypad.c | 2 +- input/drivers_keyboard/keyboard_event_android.c | 2 +- input/drivers_keyboard/keyboard_event_android.h | 2 +- input/drivers_keyboard/keyboard_event_apple.c | 2 +- input/drivers_keyboard/keyboard_event_udev.c | 2 +- input/drivers_keyboard/keyboard_event_udev.h | 2 +- input/drivers_keyboard/keyboard_event_win32.cpp | 2 +- input/drivers_keyboard/keyboard_event_x11.c | 2 +- input/drivers_keyboard/keyboard_event_xkb.c | 3 ++- input/input_autodetect_builtin.c | 4 ++-- input/input_config.c | 4 ++-- input/input_config.h | 2 +- input/input_defines.h | 2 +- input/input_driver.c | 2 +- input/input_driver.h | 2 +- input/input_hid_driver.c | 2 +- input/input_hid_driver.h | 2 +- input/input_joypad_driver.c | 2 +- input/input_joypad_driver.h | 2 +- input/input_keyboard.c | 2 +- input/input_keyboard.h | 2 +- input/input_keymaps.c | 2 +- input/input_keymaps.h | 2 +- input/input_overlay.c | 2 +- input/input_overlay.h | 2 +- input/input_remapping.c | 2 +- input/input_remapping.h | 2 +- input/input_remote.c | 2 +- input/input_remote.h | 2 +- intl/msg_hash_chs.c | 4 ++-- intl/msg_hash_de.c | 2 +- intl/msg_hash_eo.c | 2 +- intl/msg_hash_es.c | 2 +- intl/msg_hash_fr.c | 2 +- intl/msg_hash_it.c | 2 +- intl/msg_hash_ja.c | 4 ++-- intl/msg_hash_nl.c | 2 +- intl/msg_hash_pl.c | 2 +- intl/msg_hash_pt.c | 2 +- intl/msg_hash_ru.c | 3 +-- intl/msg_hash_us.c | 4 ++-- intl/msg_hash_vn.c | 4 ++-- libretro-db/bintree.c | 2 +- libretro-db/bintree.h | 2 +- libretro-db/c_converter.c | 2 +- libretro-db/libretrodb.c | 2 +- libretro-db/libretrodb.h | 2 +- libretro-db/libretrodb_tool.c | 2 +- libretro-db/query.c | 2 +- libretro-db/query.h | 2 +- libretro-db/rmsgpack.c | 2 +- libretro-db/rmsgpack.h | 2 +- libretro-db/rmsgpack_dom.c | 2 +- libretro-db/rmsgpack_dom.h | 2 +- libretro-db/rmsgpack_test.c | 2 +- location/drivers/android.c | 2 +- location/drivers/nulllocation.c | 2 +- location/location_driver.c | 2 +- location/location_driver.h | 2 +- managers/cheat_manager.c | 2 +- managers/cheat_manager.h | 2 +- managers/core_option_manager.c | 2 +- managers/core_option_manager.h | 2 +- managers/state_manager.c | 4 ++-- managers/state_manager.h | 4 ++-- menu/cbs/menu_cbs_cancel.c | 2 +- menu/cbs/menu_cbs_contentlist_switch.c | 2 +- menu/cbs/menu_cbs_deferred_push.c | 2 +- menu/cbs/menu_cbs_down.c | 2 +- menu/cbs/menu_cbs_get_value.c | 2 +- menu/cbs/menu_cbs_info.c | 2 +- menu/cbs/menu_cbs_label.c | 2 +- menu/cbs/menu_cbs_left.c | 2 +- menu/cbs/menu_cbs_ok.c | 4 ++-- menu/cbs/menu_cbs_refresh.c | 2 +- menu/cbs/menu_cbs_right.c | 2 +- menu/cbs/menu_cbs_scan.c | 2 +- menu/cbs/menu_cbs_select.c | 2 +- menu/cbs/menu_cbs_start.c | 2 +- menu/cbs/menu_cbs_sublabel.c | 2 +- menu/cbs/menu_cbs_title.c | 2 +- menu/cbs/menu_cbs_up.c | 2 +- menu/drivers/materialui.c | 6 +++--- menu/drivers/menu_generic.c | 4 ++-- menu/drivers/menu_generic.h | 2 +- menu/drivers/nuklear.c | 6 +++--- menu/drivers/nuklear/nk_common.c | 6 +++--- menu/drivers/nuklear/nk_common.h | 6 +++--- menu/drivers/nuklear/nk_menu.c | 8 ++++---- menu/drivers/nuklear/nk_menu.h | 6 +++--- menu/drivers/nuklear/nk_wnd_file_picker.c | 6 +++--- menu/drivers/nuklear/nk_wnd_main.c | 6 +++--- menu/drivers/nuklear/nk_wnd_settings.c | 6 +++--- menu/drivers/nuklear/nk_wnd_shader_parameters.c | 6 +++--- menu/drivers/null.c | 2 +- menu/drivers/rgui.c | 4 ++-- menu/drivers/xmb.c | 6 +++--- menu/drivers/xui.cpp | 2 +- menu/drivers/zarch.c | 6 +++--- menu/drivers_display/menu_display_caca.c | 4 ++-- menu/drivers_display/menu_display_ctr.c | 2 +- menu/drivers_display/menu_display_d3d.cpp | 2 +- menu/drivers_display/menu_display_gdi.c | 4 ++-- menu/drivers_display/menu_display_gl.c | 2 +- menu/drivers_display/menu_display_null.c | 2 +- menu/drivers_display/menu_display_vita2d.c | 2 +- menu/drivers_display/menu_display_vulkan.c | 4 ++-- menu/menu_animation.c | 4 ++-- menu/menu_animation.h | 4 ++-- menu/menu_cbs.c | 2 +- menu/menu_cbs.h | 2 +- menu/menu_content.c | 2 +- menu/menu_content.h | 2 +- menu/menu_display.c | 6 +++--- menu/menu_display.h | 6 +++--- menu/menu_displaylist.c | 6 +++--- menu/menu_displaylist.h | 2 +- menu/menu_driver.c | 4 ++-- menu/menu_driver.h | 4 ++-- menu/menu_entries.c | 2 +- menu/menu_entries.h | 2 +- menu/menu_event.c | 4 ++-- menu/menu_event.h | 2 +- menu/menu_input.c | 2 +- menu/menu_input.h | 4 ++-- menu/menu_navigation.c | 2 +- menu/menu_navigation.h | 2 +- menu/menu_setting.c | 6 +++--- menu/menu_setting.h | 2 +- menu/menu_shader.c | 2 +- menu/menu_shader.h | 2 +- menu/widgets/menu_dialog.c | 4 ++-- menu/widgets/menu_dialog.h | 4 ++-- menu/widgets/menu_entry.c | 2 +- menu/widgets/menu_entry.h | 2 +- menu/widgets/menu_filebrowser.c | 2 +- menu/widgets/menu_filebrowser.h | 2 +- menu/widgets/menu_input_bind_dialog.c | 2 +- menu/widgets/menu_input_bind_dialog.h | 2 +- menu/widgets/menu_input_dialog.c | 2 +- menu/widgets/menu_input_dialog.h | 2 +- menu/widgets/menu_list.c | 2 +- menu/widgets/menu_list.h | 2 +- menu/widgets/menu_osk.c | 2 +- menu/widgets/menu_osk.h | 2 +- network/httpserver/httpserver.c | 2 +- network/httpserver/httpserver.h | 2 +- network/net_http_special.c | 4 ++-- network/net_http_special.h | 4 ++-- network/net_logger.c | 2 +- network/netplay/netplay.h | 4 ++-- network/netplay/netplay_buf.c | 2 +- network/netplay/netplay_delta.c | 4 ++-- network/netplay/netplay_discovery.c | 2 +- network/netplay/netplay_discovery.h | 2 +- network/netplay/netplay_frontend.c | 4 ++-- network/netplay/netplay_handshake.c | 4 ++-- network/netplay/netplay_init.c | 4 ++-- network/netplay/netplay_io.c | 4 ++-- network/netplay/netplay_private.h | 4 ++-- network/netplay/netplay_sync.c | 4 ++-- record/drivers/record_ffmpeg.c | 5 +---- record/drivers/record_null.c | 2 +- record/record_driver.c | 2 +- record/record_driver.h | 2 +- tasks/task_autodetect.c | 2 +- tasks/task_content.c | 4 ++-- tasks/task_database.c | 6 +++--- tasks/task_database_cue.c | 6 +++--- tasks/task_decompress.c | 4 ++-- tasks/task_file_transfer.c | 2 +- tasks/task_http.c | 2 +- tasks/task_image.c | 2 +- tasks/task_netplay_lan_scan.c | 2 +- tasks/task_overlay.c | 2 +- tasks/task_powerstate.c | 4 ++-- tasks/task_save.c | 4 ++-- tasks/task_screenshot.c | 4 ++-- tasks/task_wifi.c | 2 +- tasks/tasks_internal.h | 4 ++-- ui/drivers/cocoa/cocoa_common.h | 2 +- ui/drivers/cocoa/cocoa_common.m | 2 +- ui/drivers/cocoa/cocoatouch_menu.m | 1 + ui/drivers/cocoa/ui_cocoa_application.m | 2 +- ui/drivers/cocoa/ui_cocoa_browser_window.m | 2 +- ui/drivers/cocoa/ui_cocoa_msg_window.m | 2 +- ui/drivers/cocoa/ui_cocoa_window.m | 2 +- ui/drivers/null/ui_null_application.c | 2 +- ui/drivers/null/ui_null_browser_window.c | 2 +- ui/drivers/null/ui_null_msg_window.c | 2 +- ui/drivers/null/ui_null_window.c | 2 +- ui/drivers/qt/ui_qt_application.cpp | 2 +- ui/drivers/qt/ui_qt_browser_window.cpp | 2 +- ui/drivers/qt/ui_qt_msg_window.cpp | 2 +- ui/drivers/qt/ui_qt_window.cpp | 2 +- ui/drivers/qt/wimp/wimp.cpp | 2 +- ui/drivers/qt/wimp/wimp.h | 2 +- ui/drivers/qt/wimp/wimp_global.h | 2 +- ui/drivers/qt/wrapper/wrapper.cpp | 2 +- ui/drivers/qt/wrapper/wrapper.h | 2 +- ui/drivers/ui_cocoa.h | 2 +- ui/drivers/ui_cocoa.m | 4 ++-- ui/drivers/ui_null.c | 2 +- ui/drivers/ui_qt.cpp | 2 +- ui/drivers/ui_win32.c | 4 ++-- ui/drivers/ui_win32.h | 2 +- ui/drivers/win32/ui_win32_application.c | 2 +- ui/drivers/win32/ui_win32_browser_window.c | 2 +- ui/drivers/win32/ui_win32_msg_window.c | 2 +- ui/drivers/win32/ui_win32_window.cpp | 4 ++-- ui/ui_companion_driver.c | 2 +- ui/ui_companion_driver.h | 2 +- wifi/drivers/connmanctl.c | 2 +- wifi/drivers/nullwifi.c | 2 +- wifi/wifi_driver.c | 4 ++-- wifi/wifi_driver.h | 4 ++-- 470 files changed, 602 insertions(+), 545 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index 177c374ea7..fe3a77f5d9 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/audio_driver.h b/audio/audio_driver.h index 02cbd3983c..bf2e27fe59 100644 --- a/audio/audio_driver.h +++ b/audio/audio_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/audio_thread_wrapper.c b/audio/audio_thread_wrapper.c index 24d5fa299e..05ae867c37 100644 --- a/audio/audio_thread_wrapper.c +++ b/audio/audio_thread_wrapper.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/audio_thread_wrapper.h b/audio/audio_thread_wrapper.h index c47a7fd116..298941d4ff 100644 --- a/audio/audio_thread_wrapper.h +++ b/audio/audio_thread_wrapper.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/alsa.c b/audio/drivers/alsa.c index 992948ac5b..2be0ff06f3 100644 --- a/audio/drivers/alsa.c +++ b/audio/drivers/alsa.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/alsa_qsa.c b/audio/drivers/alsa_qsa.c index 399128cc88..71edeea6cb 100644 --- a/audio/drivers/alsa_qsa.c +++ b/audio/drivers/alsa_qsa.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index 04be820551..270e95aeeb 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/ctr_dsp_audio.c b/audio/drivers/ctr_dsp_audio.c index f906c67b79..91d7f4e940 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/dsound.c b/audio/drivers/dsound.c index 2f33ab29df..9264b3e705 100644 --- a/audio/drivers/dsound.c +++ b/audio/drivers/dsound.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/gx_audio.c b/audio/drivers/gx_audio.c index 55a95d4cab..5d6c6680df 100644 --- a/audio/drivers/gx_audio.c +++ b/audio/drivers/gx_audio.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/nullaudio.c b/audio/drivers/nullaudio.c index 991105e699..694940f53a 100644 --- a/audio/drivers/nullaudio.c +++ b/audio/drivers/nullaudio.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/openal.c b/audio/drivers/openal.c index 76bb3a9bc8..61200262ad 100644 --- a/audio/drivers/openal.c +++ b/audio/drivers/openal.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/opensl.c b/audio/drivers/opensl.c index 51c3acd1eb..0de157d433 100644 --- a/audio/drivers/opensl.c +++ b/audio/drivers/opensl.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/oss.c b/audio/drivers/oss.c index 263289379a..8a68573793 100644 --- a/audio/drivers/oss.c +++ b/audio/drivers/oss.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/ps3_audio.c b/audio/drivers/ps3_audio.c index 2fb0c0cc07..28bfb68825 100644 --- a/audio/drivers/ps3_audio.c +++ b/audio/drivers/ps3_audio.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/psp_audio.c b/audio/drivers/psp_audio.c index 27ddec535b..0b7c3e305e 100644 --- a/audio/drivers/psp_audio.c +++ b/audio/drivers/psp_audio.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/pulse.c b/audio/drivers/pulse.c index eafd913ad1..c1beefcd06 100644 --- a/audio/drivers/pulse.c +++ b/audio/drivers/pulse.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/roar.c b/audio/drivers/roar.c index 90647fd889..5b92bf1b69 100644 --- a/audio/drivers/roar.c +++ b/audio/drivers/roar.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/rsound.c b/audio/drivers/rsound.c index 229536004b..ff5bf749f1 100644 --- a/audio/drivers/rsound.c +++ b/audio/drivers/rsound.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/rwebaudio.c b/audio/drivers/rwebaudio.c index 318cb166a9..1323389112 100644 --- a/audio/drivers/rwebaudio.c +++ b/audio/drivers/rwebaudio.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2015 - Michael Lelli + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/sdl_audio.c b/audio/drivers/sdl_audio.c index 72fc1a9434..a1bf693a12 100644 --- a/audio/drivers/sdl_audio.c +++ b/audio/drivers/sdl_audio.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/wiiu_audio.c b/audio/drivers/wiiu_audio.c index a547946905..68f7620b37 100644 --- a/audio/drivers/wiiu_audio.c +++ b/audio/drivers/wiiu_audio.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel - * Copyright (C) 2016 - FIX94 + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2016-2017 - FIX94 * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/xaudio.cpp b/audio/drivers/xaudio.cpp index c47cb07fd4..74c29396af 100644 --- a/audio/drivers/xaudio.cpp +++ b/audio/drivers/xaudio.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers/xaudio.h b/audio/drivers/xaudio.h index fe30ac3efb..aa3bd59bcc 100644 --- a/audio/drivers/xaudio.h +++ b/audio/drivers/xaudio.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2010-2014 - OV2 * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/audio/drivers/xenon360_audio.c b/audio/drivers/xenon360_audio.c index 2563f3b091..4ab1236718 100644 --- a/audio/drivers/xenon360_audio.c +++ b/audio/drivers/xenon360_audio.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers_resampler/cc_resampler.c b/audio/drivers_resampler/cc_resampler.c index b156ac28f4..9bcfa74b5b 100644 --- a/audio/drivers_resampler/cc_resampler.c +++ b/audio/drivers_resampler/cc_resampler.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel ( aliaspider@gmail.com ) + * Copyright (C) 2014-2017 - Ali Bouhlel ( aliaspider@gmail.com ) * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/drivers_resampler/cc_resampler_neon.S b/audio/drivers_resampler/cc_resampler_neon.S index 14d7ff13c4..5ab2816044 100644 --- a/audio/drivers_resampler/cc_resampler_neon.S +++ b/audio/drivers_resampler/cc_resampler_neon.S @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2015 - Ali Bouhlel ( aliaspider@gmail.com ) + * Copyright (C) 2014-2017 - Ali Bouhlel ( aliaspider@gmail.com ) * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/audio/librsound.c b/audio/librsound.c index 6934152413..3898bd73b3 100644 --- a/audio/librsound.c +++ b/audio/librsound.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/camera/camera_driver.c b/camera/camera_driver.c index 249e563908..4ce2ef7ca5 100644 --- a/camera/camera_driver.c +++ b/camera/camera_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/camera/camera_driver.h b/camera/camera_driver.h index 32f763b610..c91433bdf0 100644 --- a/camera/camera_driver.h +++ b/camera/camera_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/camera/drivers/android.c b/camera/drivers/android.c index 086c174e09..2ee7541e33 100644 --- a/camera/drivers/android.c +++ b/camera/drivers/android.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/camera/drivers/nullcamera.c b/camera/drivers/nullcamera.c index f989ed26f3..bb0cc82c5c 100644 --- a/camera/drivers/nullcamera.c +++ b/camera/drivers/nullcamera.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2015 - Michael Lelli + * Copyright (C) 2012-2015 - Michael Lelli + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/camera/drivers/rwebcam.c b/camera/drivers/rwebcam.c index 8e07fda6a4..c630f0f4c1 100644 --- a/camera/drivers/rwebcam.c +++ b/camera/drivers/rwebcam.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2012-2015 - Michael Lelli + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/camera/drivers/video4linux2.c b/camera/drivers/video4linux2.c index 93066d0e55..a73a47b588 100644 --- a/camera/drivers/video4linux2.c +++ b/camera/drivers/video4linux2.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/cores/dynamic_dummy.c b/cores/dynamic_dummy.c index 53efa0b90a..393855742f 100644 --- a/cores/dynamic_dummy.c +++ b/cores/dynamic_dummy.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/cores/internal_cores.h b/cores/internal_cores.h index 94fe4ef939..69c698d3f2 100644 --- a/cores/internal_cores.h +++ b/cores/internal_cores.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/defines/d3d_defines.h b/defines/d3d_defines.h index 96b9d365e0..12710387ee 100644 --- a/defines/d3d_defines.h +++ b/defines/d3d_defines.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/defines/gx_defines.h b/defines/gx_defines.h index 9d095eb117..e472b8231b 100644 --- a/defines/gx_defines.h +++ b/defines/gx_defines.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/defines/ps3_defines.h b/defines/ps3_defines.h index 8c93c0a6cd..ac8e6f920c 100644 --- a/defines/ps3_defines.h +++ b/defines/ps3_defines.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/defines/psp_defines.h b/defines/psp_defines.h index c716d4886a..c2b65e1da9 100644 --- a/defines/psp_defines.h +++ b/defines/psp_defines.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/defines/xdk_defines.h b/defines/xdk_defines.h index 33d838bd15..4af736bed0 100644 --- a/defines/xdk_defines.h +++ b/defines/xdk_defines.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_bsd.c b/frontend/drivers/platform_bsd.c index 28fdd5c9b2..6b7484677f 100644 --- a/frontend/drivers/platform_bsd.c +++ b/frontend/drivers/platform_bsd.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Jason Fetters * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/drivers/platform_ctr.c b/frontend/drivers/platform_ctr.c index 967d7860ba..59370f8edf 100644 --- a/frontend/drivers/platform_ctr.c +++ b/frontend/drivers/platform_ctr.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m index 02b5476c99..c52a421b20 100644 --- a/frontend/drivers/platform_darwin.m +++ b/frontend/drivers/platform_darwin.m @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2014 - Jason Fetters * Copyright (C) 2014-2015 - Jay McCarthy * diff --git a/frontend/drivers/platform_emscripten.c b/frontend/drivers/platform_emscripten.c index acc567dd57..5431c141fc 100644 --- a/frontend/drivers/platform_emscripten.c +++ b/frontend/drivers/platform_emscripten.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/drivers/platform_gx.c b/frontend/drivers/platform_gx.c index 4576bb1af9..6e0c7ce862 100644 --- a/frontend/drivers/platform_gx.c +++ b/frontend/drivers/platform_gx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/drivers/platform_linux.c b/frontend/drivers/platform_linux.c index 02257e292e..5ff5b70730 100644 --- a/frontend/drivers/platform_linux.c +++ b/frontend/drivers/platform_linux.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Jason Fetters * Copyright (C) 2012-2015 - Michael Lelli * diff --git a/frontend/drivers/platform_linux.h b/frontend/drivers/platform_linux.h index 887d10bc9c..97378719fd 100644 --- a/frontend/drivers/platform_linux.h +++ b/frontend/drivers/platform_linux.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/drivers/platform_null.c b/frontend/drivers/platform_null.c index 9f1b4b8730..d43f782817 100644 --- a/frontend/drivers/platform_null.c +++ b/frontend/drivers/platform_null.c @@ -1,7 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2012-2015 - Jason Fetters + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_ps3.c b/frontend/drivers/platform_ps3.c index 8e318b1e41..b246b9286b 100644 --- a/frontend/drivers/platform_ps3.c +++ b/frontend/drivers/platform_ps3.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_psp.c b/frontend/drivers/platform_psp.c index 887a15e440..2c4f1b1f17 100644 --- a/frontend/drivers/platform_psp.c +++ b/frontend/drivers/platform_psp.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_qnx.c b/frontend/drivers/platform_qnx.c index 56b0b2ca4d..a12bd0d18c 100644 --- a/frontend/drivers/platform_qnx.c +++ b/frontend/drivers/platform_qnx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_wii.c b/frontend/drivers/platform_wii.c index a7a3e4444c..c50a2902a9 100644 --- a/frontend/drivers/platform_wii.c +++ b/frontend/drivers/platform_wii.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/drivers/platform_wiiu.c b/frontend/drivers/platform_wiiu.c index 10f4ccc161..887c21c52d 100644 --- a/frontend/drivers/platform_wiiu.c +++ b/frontend/drivers/platform_wiiu.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index dcd5f3947b..a4136b16ec 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_xdk.cpp b/frontend/drivers/platform_xdk.cpp index 0df8ce99f0..02896f6c00 100644 --- a/frontend/drivers/platform_xdk.cpp +++ b/frontend/drivers/platform_xdk.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/drivers/platform_xenon.c b/frontend/drivers/platform_xenon.c index 795c47f9d1..b1e84bf443 100644 --- a/frontend/drivers/platform_xenon.c +++ b/frontend/drivers/platform_xenon.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/frontend.c b/frontend/frontend.c index 7c00d6c71a..12d9a95b08 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/frontend.h b/frontend/frontend.h index 3d53174255..fed99639ce 100644 --- a/frontend/frontend.h +++ b/frontend/frontend.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/frontend/frontend_driver.c b/frontend/frontend_driver.c index 30ea21f2e0..88475d3f7d 100644 --- a/frontend/frontend_driver.c +++ b/frontend/frontend_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/frontend_driver.h b/frontend/frontend_driver.h index e5a723e8c4..776fa17de6 100644 --- a/frontend/frontend_driver.h +++ b/frontend/frontend_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/frontend/frontend_salamander.c b/frontend/frontend_salamander.c index 280e193271..5a9a13a20e 100644 --- a/frontend/frontend_salamander.c +++ b/frontend/frontend_salamander.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/caca_common.h b/gfx/common/caca_common.h index ead5ceb5e2..6c4ea3adeb 100644 --- a/gfx/common/caca_common.h +++ b/gfx/common/caca_common.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * copyright (c) 2011-2015 - Daniel De Matteis - * copyright (c) 2016 - Brad Parker + * copyright (c) 2011-2017 - Daniel De Matteis + * copyright (c) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/ctr_common.h b/gfx/common/ctr_common.h index a5b2cbf375..daf001c3b3 100644 --- a/gfx/common/ctr_common.h +++ b/gfx/common/ctr_common.h @@ -1,3 +1,18 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2014-2017 - Ali Bouahl + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + #ifndef CTR_COMMON_H__ #define CTR_COMMON_H__ diff --git a/gfx/common/d3d_common.cpp b/gfx/common/d3d_common.cpp index be772007ec..5323c9dd16 100644 --- a/gfx/common/d3d_common.cpp +++ b/gfx/common/d3d_common.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/d3d_common.h b/gfx/common/d3d_common.h index a06e3c0c1d..9ce7c1566d 100644 --- a/gfx/common/d3d_common.h +++ b/gfx/common/d3d_common.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/drm_common.c b/gfx/common/drm_common.c index ed776e91c9..e9ddf2e82e 100644 --- a/gfx/common/drm_common.c +++ b/gfx/common/drm_common.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (c) 2011-2016 - Daniel De Matteis + * Copyright (c) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/drm_common.h b/gfx/common/drm_common.h index fbe7583184..5a855f92be 100644 --- a/gfx/common/drm_common.h +++ b/gfx/common/drm_common.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (c) 2011-2016 - Daniel De Matteis + * Copyright (c) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index 949f6a6162..366d52e494 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (c) 2011-2016 - Daniel De Matteis + * Copyright (c) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/egl_common.h b/gfx/common/egl_common.h index 060d9a26bb..6df02a5f39 100644 --- a/gfx/common/egl_common.h +++ b/gfx/common/egl_common.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (c) 2011-2016 - Daniel De Matteis + * Copyright (c) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/gdi_common.h b/gfx/common/gdi_common.h index b4acb0afb5..5abf72d35f 100644 --- a/gfx/common/gdi_common.h +++ b/gfx/common/gdi_common.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * copyright (c) 2011-2015 - Daniel De Matteis - * copyright (c) 2016 - Brad Parker + * copyright (c) 2011-2017 - Daniel De Matteis + * copyright (c) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/gl_common.c b/gfx/common/gl_common.c index 9328ad5986..92240681db 100644 --- a/gfx/common/gl_common.c +++ b/gfx/common/gl_common.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/gl_common.h b/gfx/common/gl_common.h index 2e13d95e2d..e4e1c06fb9 100644 --- a/gfx/common/gl_common.h +++ b/gfx/common/gl_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * copyright (c) 2011-2015 - Daniel De Matteis + * copyright (c) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/vita2d_common.h b/gfx/common/vita2d_common.h index 8d0153a427..010f3fca10 100644 --- a/gfx/common/vita2d_common.h +++ b/gfx/common/vita2d_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/vksym.h b/gfx/common/vksym.h index f83cc1cef5..02717d7d3f 100644 --- a/gfx/common/vksym.h +++ b/gfx/common/vksym.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index d50c48bf64..6aebc3e1e0 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index 9e1602d10a..f183020ca2 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index beb959cc6f..5af34e5fe8 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 61aa2849b7..d0a2baa31e 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index a8300953f0..2337b59f41 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index 78fd28791b..1fbc7da063 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index a35ccf6ed4..ea0ba6bbf0 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index eaf921e7c8..e47f9a31cc 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/ctr_gu.h b/gfx/drivers/ctr_gu.h index 67ee83b3b9..01f6dd1d49 100644 --- a/gfx/drivers/ctr_gu.h +++ b/gfx/drivers/ctr_gu.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 603749ba7e..3000b0d9b4 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2014 - OV2 * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/d3d.h b/gfx/drivers/d3d.h index 240c8a313b..89251adab4 100644 --- a/gfx/drivers/d3d.h +++ b/gfx/drivers/d3d.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/d3d_renderchains/render_chain_cg.cpp b/gfx/drivers/d3d_renderchains/render_chain_cg.cpp index 76b56a8444..fb6a72afff 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_cg.cpp +++ b/gfx/drivers/d3d_renderchains/render_chain_cg.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/d3d_renderchains/render_chain_driver.c b/gfx/drivers/d3d_renderchains/render_chain_driver.c index 5ff5f8140a..9d15efdc92 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_driver.c +++ b/gfx/drivers/d3d_renderchains/render_chain_driver.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/d3d_renderchains/render_chain_driver.h b/gfx/drivers/d3d_renderchains/render_chain_driver.h index 8a94a542aa..9bf7bd733b 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_driver.h +++ b/gfx/drivers/d3d_renderchains/render_chain_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/d3d_renderchains/render_chain_null.c b/gfx/drivers/d3d_renderchains/render_chain_null.c index dee984b9bd..0acbe82e8c 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_null.c +++ b/gfx/drivers/d3d_renderchains/render_chain_null.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp b/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp index 8e42fd6393..394a0bbf2c 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp +++ b/gfx/drivers/d3d_renderchains/render_chain_xdk.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index 7ba3883185..485445c2fd 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015 - Manuel Alfayate + * Copyright (C) 2015-2017 - Manuel Alfayate + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index c3c1e6b021..e92bb1a895 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Plain DRM diver: Copyright (C) 2016 - Manuel Alfayate + * Copyright (C) 2015-2017 - Manuel Alfayate + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -11,8 +12,11 @@ * * You should have received a copy of the GNU General Public License along with RetroArch. * If not, see . + * */ + /* Plain DRM diver */ + #include #include #include diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 03b38b86d0..30bd481baf 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2015 - Tobias Jakobi + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 748c9dac30..b5acf4730b 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index f9944dec28..dc3da7ae1a 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/gl_renderchains/render_chain_gl.h b/gfx/drivers/gl_renderchains/render_chain_gl.h index c329b83fb5..1cced1e409 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl.h +++ b/gfx/drivers/gl_renderchains/render_chain_gl.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c index 987654cc07..a09dfdd9f3 100644 --- a/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c +++ b/gfx/drivers/gl_renderchains/render_chain_gl_legacy.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/gl_symlinks.h b/gfx/drivers/gl_symlinks.h index 97ab6910bf..3af2df78c4 100644 --- a/gfx/drivers/gl_symlinks.h +++ b/gfx/drivers/gl_symlinks.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 9fd86ffda6..d41fc3cc8f 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c index fac6f4fdfa..858bad3aea 100644 --- a/gfx/drivers/nullgfx.c +++ b/gfx/drivers/nullgfx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index e2c8554539..2f799421f7 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - Tobias Jakobi * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index c4dff6d424..958bad4003 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2015 - Ali Bouhlel - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/psp1_gfx.h b/gfx/drivers/psp1_gfx.h index 9fb02e512f..4d2021379c 100644 --- a/gfx/drivers/psp1_gfx.h +++ b/gfx/drivers/psp1_gfx.h @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 313b7bb044..11f7354a8e 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -1,6 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Higor Euripedes + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2011-2017 - Higor Euripedes * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 422a0688ac..01eb8959f2 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -1,6 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Higor Euripedes + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2011-2017 - Higor Euripedes * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index 25ee4eb3e0..2d7aeeef26 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015 - Manuel Alfayate + * Copyright (C) 2015-2017 - Manuel Alfayate + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index d1f2baad13..3da5d3df9e 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 428f51ce47..9caaacc6ea 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015-2016 - Sergi Granell (xerpi) - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2015-2017 - Sergi Granell (xerpi) + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index cd05e3d3ef..2385cb1046 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index f0ff79aba8..9ab075f1f8 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 8bf7f146b7..59723790d5 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index 042d23f605..5bc22c81c3 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2016-2016 - Alfred Agrell + * Copyright (C) 2016-2017 - Alfred Agrell + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index a70f8f8771..499195e66b 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 9c7a4e7b3c..cc0b0eddf8 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 68229bc89a..72dc6c5fc3 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 5a26887b66..fa3c650e25 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 473fcddafa..b8bf02febd 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2014 - OV2 * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 4c68edc575..090d706234 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index cb8e45e93d..9052715e89 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 1bf674b2d6..8f751d33c6 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 18c81a60df..16ba9b7883 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index a8cdc5ae1b..8d77a8a30f 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index c80457da93..d9381a6d9f 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Higor Euripedes + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 7f35f60daa..d781046fb6 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 252f89808d..670853b8a8 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 57191042fd..c7c2dd5425 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index c2b98d5ebd..a7614353a6 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index c59e5dd577..422fc1feec 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011 2017 - Daniel De Matteis * Copyright (C) 2014 2015 - Jean-Andre Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 35c79da765..5f3d495702 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index d6320c2224..8b96d4e543 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 08a6e64170..b9a1a94553 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 661d5239c0..f8b4bda4a1 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen -* Copyright (C) 2011-2016 - Daniel De Matteis +* Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index 14e9c1be76..05b2d6185e 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index f7f13e4e43..4c483679f4 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/d3d_w32_font.cpp b/gfx/drivers_font/d3d_w32_font.cpp index d4639ac5d7..dca48280d1 100644 --- a/gfx/drivers_font/d3d_w32_font.cpp +++ b/gfx/drivers_font/d3d_w32_font.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/gdi_font.c b/gfx/drivers_font/gdi_font.c index 999c649c43..ef02b452a4 100644 --- a/gfx/drivers_font/gdi_font.c +++ b/gfx/drivers_font/gdi_font.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index 84e85c323c..d20c33b470 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/ps_libdbgfont.c b/gfx/drivers_font/ps_libdbgfont.c index 2f1d7e08eb..cef0d400b7 100644 --- a/gfx/drivers_font/ps_libdbgfont.c +++ b/gfx/drivers_font/ps_libdbgfont.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index 30781f160d..1b8af4cda2 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 56ad623432..5e7fcd93cd 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/xdk1_xfonts.c b/gfx/drivers_font/xdk1_xfonts.c index 2f04f5fbc0..47bf9b757d 100644 --- a/gfx/drivers_font/xdk1_xfonts.c +++ b/gfx/drivers_font/xdk1_xfonts.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font/xdk360_fonts.cpp b/gfx/drivers_font/xdk360_fonts.cpp index e206d35512..54c319c037 100644 --- a/gfx/drivers_font/xdk360_fonts.cpp +++ b/gfx/drivers_font/xdk360_fonts.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font_renderer/bitmap.h b/gfx/drivers_font_renderer/bitmap.h index a76ba2fbfc..5a5a4ba82b 100644 --- a/gfx/drivers_font_renderer/bitmap.h +++ b/gfx/drivers_font_renderer/bitmap.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font_renderer/bitmapfont.c b/gfx/drivers_font_renderer/bitmapfont.c index ee48fbc468..b6d289ec03 100644 --- a/gfx/drivers_font_renderer/bitmapfont.c +++ b/gfx/drivers_font_renderer/bitmapfont.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font_renderer/coretext.c b/gfx/drivers_font_renderer/coretext.c index c39618db5d..bd94b54a9c 100644 --- a/gfx/drivers_font_renderer/coretext.c +++ b/gfx/drivers_font_renderer/coretext.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2014-2015 - Jay McCarthy - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font_renderer/freetype.c b/gfx/drivers_font_renderer/freetype.c index a77f8ccde6..cb7c37ce47 100644 --- a/gfx/drivers_font_renderer/freetype.c +++ b/gfx/drivers_font_renderer/freetype.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font_renderer/stb.c b/gfx/drivers_font_renderer/stb.c index 4fb4e9cfaf..424e195859 100644 --- a/gfx/drivers_font_renderer/stb.c +++ b/gfx/drivers_font_renderer/stb.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2015-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_font_renderer/stb_unicode.c b/gfx/drivers_font_renderer/stb_unicode.c index e4e1720a3c..40a7b5dd3b 100644 --- a/gfx/drivers_font_renderer/stb_unicode.c +++ b/gfx/drivers_font_renderer/stb_unicode.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2015-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/glslang_util.cpp b/gfx/drivers_shader/glslang_util.cpp index 9d013351da..7ba584c327 100644 --- a/gfx/drivers_shader/glslang_util.cpp +++ b/gfx/drivers_shader/glslang_util.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2010-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/glslang_util.hpp b/gfx/drivers_shader/glslang_util.hpp index 263eefce5f..a9a42f1ee8 100644 --- a/gfx/drivers_shader/glslang_util.hpp +++ b/gfx/drivers_shader/glslang_util.hpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2010-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 6aee775f21..26d665998f 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index 62d04e485c..7d124f2b88 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_glsl.h b/gfx/drivers_shader/shader_glsl.h index 0af251e5d8..9b04095cd7 100644 --- a/gfx/drivers_shader/shader_glsl.h +++ b/gfx/drivers_shader/shader_glsl.h @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_hlsl.c b/gfx/drivers_shader/shader_hlsl.c index 009a2b6a52..4bd0549ab9 100644 --- a/gfx/drivers_shader/shader_hlsl.c +++ b/gfx/drivers_shader/shader_hlsl.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_hlsl.h b/gfx/drivers_shader/shader_hlsl.h index d1ab13a73c..a18e6d75ac 100644 --- a/gfx/drivers_shader/shader_hlsl.h +++ b/gfx/drivers_shader/shader_hlsl.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_null.c b/gfx/drivers_shader/shader_null.c index 0d20a3c6ab..870610f6c1 100644 --- a/gfx/drivers_shader/shader_null.c +++ b/gfx/drivers_shader/shader_null.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_vulkan.cpp b/gfx/drivers_shader/shader_vulkan.cpp index f5d8b5dad5..50bcdf412e 100644 --- a/gfx/drivers_shader/shader_vulkan.cpp +++ b/gfx/drivers_shader/shader_vulkan.cpp @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/shader_vulkan.h b/gfx/drivers_shader/shader_vulkan.h index 12bf7123aa..16ec5c1cb4 100644 --- a/gfx/drivers_shader/shader_vulkan.h +++ b/gfx/drivers_shader/shader_vulkan.h @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/slang_preprocess.cpp b/gfx/drivers_shader/slang_preprocess.cpp index f596521a50..a3c8061df0 100644 --- a/gfx/drivers_shader/slang_preprocess.cpp +++ b/gfx/drivers_shader/slang_preprocess.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2010-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/slang_preprocess.h b/gfx/drivers_shader/slang_preprocess.h index 5721e5148a..37fd2ec91b 100644 --- a/gfx/drivers_shader/slang_preprocess.h +++ b/gfx/drivers_shader/slang_preprocess.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2010-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/slang_reflection.cpp b/gfx/drivers_shader/slang_reflection.cpp index bf8f228a00..cbe2d21ed4 100644 --- a/gfx/drivers_shader/slang_reflection.cpp +++ b/gfx/drivers_shader/slang_reflection.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2010-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_shader/slang_reflection.hpp b/gfx/drivers_shader/slang_reflection.hpp index b2a9157286..a9799e3c51 100644 --- a/gfx/drivers_shader/slang_reflection.hpp +++ b/gfx/drivers_shader/slang_reflection.hpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2016 - Hans-Kristian Arntzen + * Copyright (C) 2010-2017 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_tracker/video_state_python.c b/gfx/drivers_tracker/video_state_python.c index 3a62a911bb..dc86caa010 100644 --- a/gfx/drivers_tracker/video_state_python.c +++ b/gfx/drivers_tracker/video_state_python.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/drivers_tracker/video_state_python.h b/gfx/drivers_tracker/video_state_python.h index 8fca2d5d0c..4abdb929f2 100644 --- a/gfx/drivers_tracker/video_state_python.h +++ b/gfx/drivers_tracker/video_state_python.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/font_driver.c b/gfx/font_driver.c index b0b74068fd..5ab340b731 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/font_driver.h b/gfx/font_driver.h index 65bd028965..9e276f34b4 100644 --- a/gfx/font_driver.h +++ b/gfx/font_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index a8cc52e78d..8fba6894a2 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 52baf831d9..660a953e12 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_coord_array.c b/gfx/video_coord_array.c index 5d73f97df5..7369cfa279 100644 --- a/gfx/video_coord_array.c +++ b/gfx/video_coord_array.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_coord_array.h b/gfx/video_coord_array.h index 1c4db3fcbf..9a3ec1e1db 100644 --- a/gfx/video_coord_array.h +++ b/gfx/video_coord_array.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * copyright (c) 2011-2016 - Daniel De Matteis + * copyright (c) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_defines.h b/gfx/video_defines.h index b7f1b6a9a6..6e88843043 100644 --- a/gfx/video_defines.h +++ b/gfx/video_defines.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 02407539b5..e3747d9b68 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_driver.h b/gfx/video_driver.h index fe3291e960..71fecbc2a9 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filter.c b/gfx/video_filter.c index 8d6c1df756..5886025f5a 100644 --- a/gfx/video_filter.c +++ b/gfx/video_filter.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filter.h b/gfx/video_filter.h index 5921657b78..d11c9eb993 100644 --- a/gfx/video_filter.h +++ b/gfx/video_filter.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/2xbr.c b/gfx/video_filters/2xbr.c index dda4c3b204..249672723a 100644 --- a/gfx/video_filters/2xbr.c +++ b/gfx/video_filters/2xbr.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/2xsai.c b/gfx/video_filters/2xsai.c index 07de2faadd..52716838f1 100644 --- a/gfx/video_filters/2xsai.c +++ b/gfx/video_filters/2xsai.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/blargg_ntsc_snes.c b/gfx/video_filters/blargg_ntsc_snes.c index b9ce865255..ec008cfe29 100644 --- a/gfx/video_filters/blargg_ntsc_snes.c +++ b/gfx/video_filters/blargg_ntsc_snes.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/darken.c b/gfx/video_filters/darken.c index a9d3e29b8a..0a9fc1a0d0 100644 --- a/gfx/video_filters/darken.c +++ b/gfx/video_filters/darken.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/epx.c b/gfx/video_filters/epx.c index 26be6cbed5..4b5d32f4de 100644 --- a/gfx/video_filters/epx.c +++ b/gfx/video_filters/epx.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/lq2x.c b/gfx/video_filters/lq2x.c index 6123bff5fc..043dc6761a 100644 --- a/gfx/video_filters/lq2x.c +++ b/gfx/video_filters/lq2x.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/phosphor2x.c b/gfx/video_filters/phosphor2x.c index 92d4a3dc82..7cc3d8d8d1 100644 --- a/gfx/video_filters/phosphor2x.c +++ b/gfx/video_filters/phosphor2x.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/scale2x.c b/gfx/video_filters/scale2x.c index 9bd69b8724..bf08dc589f 100644 --- a/gfx/video_filters/scale2x.c +++ b/gfx/video_filters/scale2x.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/softfilter.h b/gfx/video_filters/softfilter.h index b2c3b9a2be..937e3fba8d 100644 --- a/gfx/video_filters/softfilter.h +++ b/gfx/video_filters/softfilter.h @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_filters/supereagle.c b/gfx/video_filters/supereagle.c index 8c243d486a..980d6483fc 100644 --- a/gfx/video_filters/supereagle.c +++ b/gfx/video_filters/supereagle.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2014 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_shader_driver.c b/gfx/video_shader_driver.c index 528d5b37c0..f666aae568 100644 --- a/gfx/video_shader_driver.c +++ b/gfx/video_shader_driver.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_shader_driver.h b/gfx/video_shader_driver.h index 5207777911..ab344056b5 100644 --- a/gfx/video_shader_driver.h +++ b/gfx/video_shader_driver.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_shader_parse.c b/gfx/video_shader_parse.c index df50a2d75e..b1a8329bcd 100644 --- a/gfx/video_shader_parse.c +++ b/gfx/video_shader_parse.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_shader_parse.h b/gfx/video_shader_parse.h index 116a1d415c..79579fb7d8 100644 --- a/gfx/video_shader_parse.h +++ b/gfx/video_shader_parse.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_state_tracker.c b/gfx/video_state_tracker.c index 93a2f40338..4a6694d892 100644 --- a/gfx/video_state_tracker.c +++ b/gfx/video_state_tracker.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_state_tracker.h b/gfx/video_state_tracker.h index 17a512f1e2..471f3d287e 100644 --- a/gfx/video_state_tracker.h +++ b/gfx/video_state_tracker.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index d69130c5c5..d0834f12b1 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 9722cc78db..5368edabd7 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/griffin/griffin.c b/griffin/griffin.c index 2b040232cc..c2b5eb0e0f 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen -* Copyright (C) 2011-2016 - Daniel De Matteis +* Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index e01399c174..439ed47b8d 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. -* Copyright (C) 2011-2016 - Daniel De Matteis +* Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/griffin/griffin_objc.m b/griffin/griffin_objc.m index 31960ffa45..02ed545433 100644 --- a/griffin/griffin_objc.m +++ b/griffin/griffin_objc.m @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. -* Copyright (C) 2011-2016 - Daniel De Matteis +* Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/epoll_common.c b/input/common/epoll_common.c index 60a977f764..5bdd83d0c8 100644 --- a/input/common/epoll_common.c +++ b/input/common/epoll_common.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - pinumbernumber - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/epoll_common.h b/input/common/epoll_common.h index 1150d9982a..ae0b3c087a 100644 --- a/input/common/epoll_common.h +++ b/input/common/epoll_common.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/input_x11_common.c b/input/common/input_x11_common.c index 1e028ad8bb..d9598496e0 100644 --- a/input/common/input_x11_common.c +++ b/input/common/input_x11_common.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/input_x11_common.h b/input/common/input_x11_common.h index 3482181f56..4d325e4525 100644 --- a/input/common/input_x11_common.h +++ b/input/common/input_x11_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/linux_common.c b/input/common/linux_common.c index 9466e1c26a..1736a9c30e 100644 --- a/input/common/linux_common.c +++ b/input/common/linux_common.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/linux_common.h b/input/common/linux_common.h index 37555569b1..b924b7246d 100644 --- a/input/common/linux_common.h +++ b/input/common/linux_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/udev_common.c b/input/common/udev_common.c index d256f3916d..0ef22244c4 100644 --- a/input/common/udev_common.c +++ b/input/common/udev_common.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/common/udev_common.h b/input/common/udev_common.h index c9ea19c191..33cdec1b27 100644 --- a/input/common/udev_common.h +++ b/input/common/udev_common.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_nesusb.c b/input/connect/connect_nesusb.c index b5f304c4ec..3cfadcdca2 100644 --- a/input/connect/connect_nesusb.c +++ b/input/connect/connect_nesusb.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_ps2adapter.c b/input/connect/connect_ps2adapter.c index 8403e670e6..280b801938 100644 --- a/input/connect/connect_ps2adapter.c +++ b/input/connect/connect_ps2adapter.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_ps3.c b/input/connect/connect_ps3.c index 5037057d60..37ca54b8d2 100644 --- a/input/connect/connect_ps3.c +++ b/input/connect/connect_ps3.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_ps4.c b/input/connect/connect_ps4.c index 41da1057da..198107842f 100644 --- a/input/connect/connect_ps4.c +++ b/input/connect/connect_ps4.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_snesusb.c b/input/connect/connect_snesusb.c index ae909932e7..d5cc9e2811 100644 --- a/input/connect/connect_snesusb.c +++ b/input/connect/connect_snesusb.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_wii.c b/input/connect/connect_wii.c index f017c497f5..cb3243618c 100644 --- a/input/connect/connect_wii.c +++ b/input/connect/connect_wii.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_wiiugca.c b/input/connect/connect_wiiugca.c index 941c2f7deb..8f1368fdd7 100644 --- a/input/connect/connect_wiiugca.c +++ b/input/connect/connect_wiiugca.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/connect_wiiupro.c b/input/connect/connect_wiiupro.c index 1fddf231f9..05d36c240f 100644 --- a/input/connect/connect_wiiupro.c +++ b/input/connect/connect_wiiupro.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/joypad_connection.c b/input/connect/joypad_connection.c index ecefcd2551..7fab3c894b 100644 --- a/input/connect/joypad_connection.c +++ b/input/connect/joypad_connection.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/connect/joypad_connection.h b/input/connect/joypad_connection.h index fd8d5584c7..eac080b70e 100644 --- a/input/connect/joypad_connection.h +++ b/input/connect/joypad_connection.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 5d2ece5300..d93e53daf4 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * Copyright (C) 2013-2014 - Steven Crowe * diff --git a/input/drivers/cocoa_input.c b/input/drivers/cocoa_input.c index 74c16575b3..08177b664e 100644 --- a/input/drivers/cocoa_input.c +++ b/input/drivers/cocoa_input.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - Jason Fetters * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers/cocoa_input.h b/input/drivers/cocoa_input.h index a3be90e30d..33194837f5 100644 --- a/input/drivers/cocoa_input.h +++ b/input/drivers/cocoa_input.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - Jason Fetters * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers/ctr_input.c b/input/drivers/ctr_input.c index e0348ea329..da6b2a0c2e 100644 --- a/input/drivers/ctr_input.c +++ b/input/drivers/ctr_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2015 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/dinput.c b/input/drivers/dinput.c index ac58ce1d4f..2c0f9a755e 100644 --- a/input/drivers/dinput.c +++ b/input/drivers/dinput.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/gx_input.c b/input/drivers/gx_input.c index 10b0914b2a..984b32b4a7 100644 --- a/input/drivers/gx_input.c +++ b/input/drivers/gx_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers/linuxraw_input.c b/input/drivers/linuxraw_input.c index cdc29e8c6d..0a7553b07a 100644 --- a/input/drivers/linuxraw_input.c +++ b/input/drivers/linuxraw_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers/nullinput.c b/input/drivers/nullinput.c index 41bd88e6f3..78498f88dc 100644 --- a/input/drivers/nullinput.c +++ b/input/drivers/nullinput.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/ps3_input.c b/input/drivers/ps3_input.c index a8593e5ded..78f5862439 100644 --- a/input/drivers/ps3_input.c +++ b/input/drivers/ps3_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/psp_input.c b/input/drivers/psp_input.c index 9658a5b7e2..8000d1b3c9 100644 --- a/input/drivers/psp_input.c +++ b/input/drivers/psp_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/qnx_input.c b/input/drivers/qnx_input.c index 2d90df2c6e..eb3dc2bb9f 100644 --- a/input/drivers/qnx_input.c +++ b/input/drivers/qnx_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - CatalystG * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers/rwebinput_input.c b/input/drivers/rwebinput_input.c index 635bdf87df..c66979bb04 100644 --- a/input/drivers/rwebinput_input.c +++ b/input/drivers/rwebinput_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2015 - Michael Lelli + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/sdl_input.c b/input/drivers/sdl_input.c index 324b91dfdd..2d470149db 100644 --- a/input/drivers/sdl_input.c +++ b/input/drivers/sdl_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2015 - Higor Euripedes * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index 8f02e6ab0d..afd43b00ff 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2015 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index c2e12b5ff6..56bbf8bbaf 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2015 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2014-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index c90a032c22..5b3dcc7c59 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2015 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/xdk_xinput_input.c b/input/drivers/xdk_xinput_input.c index 7d096c6244..3213003858 100644 --- a/input/drivers/xdk_xinput_input.c +++ b/input/drivers/xdk_xinput_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers/xenon360_input.c b/input/drivers/xenon360_input.c index 12a9dd2883..99fe132f46 100644 --- a/input/drivers/xenon360_input.c +++ b/input/drivers/xenon360_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_hid/btstack_hid.c b/input/drivers_hid/btstack_hid.c index 7ccab02f02..bdb53abc8f 100644 --- a/input/drivers_hid/btstack_hid.c +++ b/input/drivers_hid/btstack_hid.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index d071978b53..1edde743c5 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_hid/libusb_hid.c b/input/drivers_hid/libusb_hid.c index c6a4fbb544..9e6253e15d 100644 --- a/input/drivers_hid/libusb_hid.c +++ b/input/drivers_hid/libusb_hid.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_hid/null_hid.c b/input/drivers_hid/null_hid.c index 30ed12d762..17357cfa8c 100644 --- a/input/drivers_hid/null_hid.c +++ b/input/drivers_hid/null_hid.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_hid/wiiusb_hid.c b/input/drivers_hid/wiiusb_hid.c index 50f82bdbf4..a15b63c795 100644 --- a/input/drivers_hid/wiiusb_hid.c +++ b/input/drivers_hid/wiiusb_hid.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015-2016 - Sergi Granell (xerpi) + * Copyright (C) 2015-2017 - Sergi Granell (xerpi) + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/android_joypad.c b/input/drivers_joypad/android_joypad.c index b3af92c0a3..55e4b15f84 100644 --- a/input/drivers_joypad/android_joypad.c +++ b/input/drivers_joypad/android_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * Copyright (C) 2013-2014 - Steven Crowe * diff --git a/input/drivers_joypad/ctr_joypad.c b/input/drivers_joypad/ctr_joypad.c index fa7232e62e..a1022a6b2f 100644 --- a/input/drivers_joypad/ctr_joypad.c +++ b/input/drivers_joypad/ctr_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/dinput_joypad.c b/input/drivers_joypad/dinput_joypad.c index 2d042703c9..22c7b8458e 100644 --- a/input/drivers_joypad/dinput_joypad.c +++ b/input/drivers_joypad/dinput_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/gx_joypad.c b/input/drivers_joypad/gx_joypad.c index 1edc19ab31..b67ccf32ba 100644 --- a/input/drivers_joypad/gx_joypad.c +++ b/input/drivers_joypad/gx_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers_joypad/hid_joypad.c b/input/drivers_joypad/hid_joypad.c index 5273de9098..f374d9a684 100644 --- a/input/drivers_joypad/hid_joypad.c +++ b/input/drivers_joypad/hid_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/linuxraw_joypad.c b/input/drivers_joypad/linuxraw_joypad.c index b19e5bf575..2a754ce1e1 100644 --- a/input/drivers_joypad/linuxraw_joypad.c +++ b/input/drivers_joypad/linuxraw_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/mfi_joypad.m b/input/drivers_joypad/mfi_joypad.m index 0439f6068e..a2df184c5b 100644 --- a/input/drivers_joypad/mfi_joypad.m +++ b/input/drivers_joypad/mfi_joypad.m @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/null_joypad.c b/input/drivers_joypad/null_joypad.c index 601db984f1..d67a80b543 100644 --- a/input/drivers_joypad/null_joypad.c +++ b/input/drivers_joypad/null_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - CatalystG * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers_joypad/parport_joypad.c b/input/drivers_joypad/parport_joypad.c index fd5ef1c2e8..17c8c4d658 100644 --- a/input/drivers_joypad/parport_joypad.c +++ b/input/drivers_joypad/parport_joypad.c @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2014-2015 - Mike Robinson + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/ps3_joypad.c b/input/drivers_joypad/ps3_joypad.c index f351ea3371..1cd6aaab6f 100644 --- a/input/drivers_joypad/ps3_joypad.c +++ b/input/drivers_joypad/ps3_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index b008325168..dcc802bd67 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/qnx_joypad.c b/input/drivers_joypad/qnx_joypad.c index 4833a8a80b..53df4dcc29 100644 --- a/input/drivers_joypad/qnx_joypad.c +++ b/input/drivers_joypad/qnx_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - CatalystG * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers_joypad/sdl_joypad.c b/input/drivers_joypad/sdl_joypad.c index 90ac5c0b14..793f796bf2 100644 --- a/input/drivers_joypad/sdl_joypad.c +++ b/input/drivers_joypad/sdl_joypad.c @@ -1,6 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2014-2015 - Higor Euripedes + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Higor Euripedes * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c index 1b80dc5549..8bd72ec420 100644 --- a/input/drivers_joypad/udev_joypad.c +++ b/input/drivers_joypad/udev_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2015 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/wiiu_joypad.c b/input/drivers_joypad/wiiu_joypad.c index 8610f64108..83703b35a6 100644 --- a/input/drivers_joypad/wiiu_joypad.c +++ b/input/drivers_joypad/wiiu_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Ali Bouhlel + * Copyright (C) 2014-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/xdk_joypad.c b/input/drivers_joypad/xdk_joypad.c index 9e60b8c4d7..08b46b0884 100644 --- a/input/drivers_joypad/xdk_joypad.c +++ b/input/drivers_joypad/xdk_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_joypad/xinput_joypad.c b/input/drivers_joypad/xinput_joypad.c index 7e01a20ef8..6e38f82f2b 100644 --- a/input/drivers_joypad/xinput_joypad.c +++ b/input/drivers_joypad/xinput_joypad.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2015 - pinumbernumber - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_android.c b/input/drivers_keyboard/keyboard_event_android.c index ab98d2a964..0a39d89988 100644 --- a/input/drivers_keyboard/keyboard_event_android.c +++ b/input/drivers_keyboard/keyboard_event_android.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_android.h b/input/drivers_keyboard/keyboard_event_android.h index d2f0e38c51..d80fb2f606 100644 --- a/input/drivers_keyboard/keyboard_event_android.h +++ b/input/drivers_keyboard/keyboard_event_android.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_apple.c b/input/drivers_keyboard/keyboard_event_apple.c index 689591ca74..3537b07477 100644 --- a/input/drivers_keyboard/keyboard_event_apple.c +++ b/input/drivers_keyboard/keyboard_event_apple.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2013-2014 - Jason Fetters * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/input/drivers_keyboard/keyboard_event_udev.c b/input/drivers_keyboard/keyboard_event_udev.c index b027ef4f9c..99a885fa9c 100644 --- a/input/drivers_keyboard/keyboard_event_udev.c +++ b/input/drivers_keyboard/keyboard_event_udev.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_udev.h b/input/drivers_keyboard/keyboard_event_udev.h index 578b9c9b9c..7dff10eaf9 100644 --- a/input/drivers_keyboard/keyboard_event_udev.h +++ b/input/drivers_keyboard/keyboard_event_udev.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_win32.cpp b/input/drivers_keyboard/keyboard_event_win32.cpp index a40852110f..936607cba9 100644 --- a/input/drivers_keyboard/keyboard_event_win32.cpp +++ b/input/drivers_keyboard/keyboard_event_win32.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_x11.c b/input/drivers_keyboard/keyboard_event_x11.c index 6729019650..00b4f6056c 100644 --- a/input/drivers_keyboard/keyboard_event_x11.c +++ b/input/drivers_keyboard/keyboard_event_x11.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/drivers_keyboard/keyboard_event_xkb.c b/input/drivers_keyboard/keyboard_event_xkb.c index 35cf15eab9..264dedf078 100644 --- a/input/drivers_keyboard/keyboard_event_xkb.c +++ b/input/drivers_keyboard/keyboard_event_xkb.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -16,6 +16,7 @@ /* We need libxkbcommon to translate raw evdev events to characters * which can be passed to keyboard callback in a sensible way. */ + #include #include diff --git a/input/input_autodetect_builtin.c b/input/input_autodetect_builtin.c index 8c6c7f3a17..579aad425b 100644 --- a/input/input_autodetect_builtin.c +++ b/input/input_autodetect_builtin.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Ali Bouhlel * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_config.c b/input/input_config.c index 0ff6e000f3..5c3fc2632d 100644 --- a/input/input_config.c +++ b/input/input_config.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_config.h b/input/input_config.h index 64c7050565..10c78b50af 100644 --- a/input/input_config.h +++ b/input/input_config.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_defines.h b/input/input_defines.h index c626512773..4c89905a75 100644 --- a/input/input_defines.h +++ b/input/input_defines.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_driver.c b/input/input_driver.c index aad9b2a9cb..dda2470d7c 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_driver.h b/input/input_driver.h index cf8ba67963..959d0296a4 100644 --- a/input/input_driver.h +++ b/input/input_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_hid_driver.c b/input/input_hid_driver.c index af83be29ee..55a4202423 100644 --- a/input/input_hid_driver.c +++ b/input/input_hid_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_hid_driver.h b/input/input_hid_driver.h index ef844a1bd0..c6cd4b9d0a 100644 --- a/input/input_hid_driver.h +++ b/input/input_hid_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_joypad_driver.c b/input/input_joypad_driver.c index eaf4f45692..b868f7e01d 100644 --- a/input/input_joypad_driver.c +++ b/input/input_joypad_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_joypad_driver.h b/input/input_joypad_driver.h index d6b2d2f381..fb897426ea 100644 --- a/input/input_joypad_driver.h +++ b/input/input_joypad_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_keyboard.c b/input/input_keyboard.c index a5d31cb827..9031fc0faa 100644 --- a/input/input_keyboard.c +++ b/input/input_keyboard.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_keyboard.h b/input/input_keyboard.h index e99bef87cc..b2d973940b 100644 --- a/input/input_keyboard.h +++ b/input/input_keyboard.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_keymaps.c b/input/input_keymaps.c index 3c4cb5a3e0..a6317b254f 100644 --- a/input/input_keymaps.c +++ b/input/input_keymaps.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_keymaps.h b/input/input_keymaps.h index f27dc73b86..4e7b5dab32 100644 --- a/input/input_keymaps.h +++ b/input/input_keymaps.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_overlay.c b/input/input_overlay.c index 52dca6908f..cc000042b5 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_overlay.h b/input/input_overlay.h index 9eac1af6ce..93f3c83e91 100644 --- a/input/input_overlay.h +++ b/input/input_overlay.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_remapping.c b/input/input_remapping.c index 357b6b636d..f3da621e69 100644 --- a/input/input_remapping.c +++ b/input/input_remapping.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_remapping.h b/input/input_remapping.h index df04889fa1..3c988ad2c5 100644 --- a/input/input_remapping.h +++ b/input/input_remapping.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_remote.c b/input/input_remote.c index 09d7b916db..beb4c237e8 100644 --- a/input/input_remote.c +++ b/input/input_remote.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/input/input_remote.h b/input/input_remote.h index 9c8b1341cf..861cea9149 100644 --- a/input/input_remote.h +++ b/input/input_remote.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_chs.c b/intl/msg_hash_chs.c index b0505b3990..56e0651fc3 100644 --- a/intl/msg_hash_chs.c +++ b/intl/msg_hash_chs.c @@ -1,5 +1,5 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis +/* RetroArch - A frontend for libretro. + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_de.c b/intl/msg_hash_de.c index d423532043..81e039f3ee 100644 --- a/intl/msg_hash_de.c +++ b/intl/msg_hash_de.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_eo.c b/intl/msg_hash_eo.c index dd5641ff20..b7d67fcdda 100644 --- a/intl/msg_hash_eo.c +++ b/intl/msg_hash_eo.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_es.c b/intl/msg_hash_es.c index 24af507256..a24795218e 100644 --- a/intl/msg_hash_es.c +++ b/intl/msg_hash_es.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_fr.c b/intl/msg_hash_fr.c index 82e2d48249..48a67565e1 100644 --- a/intl/msg_hash_fr.c +++ b/intl/msg_hash_fr.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_it.c b/intl/msg_hash_it.c index f9be4687a0..afd9e40e3d 100644 --- a/intl/msg_hash_it.c +++ b/intl/msg_hash_it.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_ja.c b/intl/msg_hash_ja.c index 430de9b0b7..e482fc82bf 100644 --- a/intl/msg_hash_ja.c +++ b/intl/msg_hash_ja.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_nl.c b/intl/msg_hash_nl.c index 133056b57d..d350ea8414 100644 --- a/intl/msg_hash_nl.c +++ b/intl/msg_hash_nl.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_pl.c b/intl/msg_hash_pl.c index edd84cdf75..5e9d530c0f 100644 --- a/intl/msg_hash_pl.c +++ b/intl/msg_hash_pl.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_pt.c b/intl/msg_hash_pt.c index 0c9b603df2..715cdc1cb8 100644 --- a/intl/msg_hash_pt.c +++ b/intl/msg_hash_pt.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_ru.c b/intl/msg_hash_ru.c index d167ca995b..6bfec695cc 100644 --- a/intl/msg_hash_ru.c +++ b/intl/msg_hash_ru.c @@ -1,6 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Daniel De Matteis - * + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index bad38e3e5f..8692e4c18d 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/intl/msg_hash_vn.c b/intl/msg_hash_vn.c index c8c1a03690..d4642c9fb5 100644 --- a/intl/msg_hash_vn.c +++ b/intl/msg_hash_vn.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/libretro-db/bintree.c b/libretro-db/bintree.c index 8902325c6b..b080aa4f55 100644 --- a/libretro-db/bintree.c +++ b/libretro-db/bintree.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (bintree.c). diff --git a/libretro-db/bintree.h b/libretro-db/bintree.h index 2b6e00d788..586714ac47 100644 --- a/libretro-db/bintree.h +++ b/libretro-db/bintree.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (bintree.h). diff --git a/libretro-db/c_converter.c b/libretro-db/c_converter.c index 7876e0d10d..7d09ba8867 100644 --- a/libretro-db/c_converter.c +++ b/libretro-db/c_converter.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (c_converter.c). diff --git a/libretro-db/libretrodb.c b/libretro-db/libretrodb.c index 76ec2facef..c39663db2f 100644 --- a/libretro-db/libretrodb.c +++ b/libretro-db/libretrodb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (libretrodb.c). diff --git a/libretro-db/libretrodb.h b/libretro-db/libretrodb.h index 8bc442211a..5b8775e33a 100644 --- a/libretro-db/libretrodb.h +++ b/libretro-db/libretrodb.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (libretrodb.h). diff --git a/libretro-db/libretrodb_tool.c b/libretro-db/libretrodb_tool.c index e8b5ed5f69..8dcd88abe7 100644 --- a/libretro-db/libretrodb_tool.c +++ b/libretro-db/libretrodb_tool.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (libretrodb_tool.c). diff --git a/libretro-db/query.c b/libretro-db/query.c index 27dccd5ff4..675f111c06 100644 --- a/libretro-db/query.c +++ b/libretro-db/query.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (query.c). diff --git a/libretro-db/query.h b/libretro-db/query.h index 9a583bc280..5a457a0cac 100644 --- a/libretro-db/query.h +++ b/libretro-db/query.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (query.h). diff --git a/libretro-db/rmsgpack.c b/libretro-db/rmsgpack.c index dfac0c448a..816fb4aee5 100644 --- a/libretro-db/rmsgpack.c +++ b/libretro-db/rmsgpack.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rmsgpack.c). diff --git a/libretro-db/rmsgpack.h b/libretro-db/rmsgpack.h index 2cb803fe1a..a3ffdcaffe 100644 --- a/libretro-db/rmsgpack.h +++ b/libretro-db/rmsgpack.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rmsgpack.h). diff --git a/libretro-db/rmsgpack_dom.c b/libretro-db/rmsgpack_dom.c index b1add50697..0cff0464ab 100644 --- a/libretro-db/rmsgpack_dom.c +++ b/libretro-db/rmsgpack_dom.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rmsgpack_dom.c). diff --git a/libretro-db/rmsgpack_dom.h b/libretro-db/rmsgpack_dom.h index 580a077d20..5a8d7c16d4 100644 --- a/libretro-db/rmsgpack_dom.h +++ b/libretro-db/rmsgpack_dom.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rmsgpack_dom.h). diff --git a/libretro-db/rmsgpack_test.c b/libretro-db/rmsgpack_test.c index 112f170d40..2e7f7d0d3a 100644 --- a/libretro-db/rmsgpack_test.c +++ b/libretro-db/rmsgpack_test.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rmsgpack_test.c). diff --git a/location/drivers/android.c b/location/drivers/android.c index 9c9fdd5b93..e50b98e2d0 100644 --- a/location/drivers/android.c +++ b/location/drivers/android.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/location/drivers/nulllocation.c b/location/drivers/nulllocation.c index a6a236f101..b2f2f0a9ad 100644 --- a/location/drivers/nulllocation.c +++ b/location/drivers/nulllocation.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/location/location_driver.c b/location/location_driver.c index 88baefea74..db4ab79348 100644 --- a/location/location_driver.c +++ b/location/location_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/location/location_driver.h b/location/location_driver.h index fe14d5f738..b38782f3c2 100644 --- a/location/location_driver.h +++ b/location/location_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/managers/cheat_manager.c b/managers/cheat_manager.c index 342eb23360..5740449e00 100644 --- a/managers/cheat_manager.c +++ b/managers/cheat_manager.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/managers/cheat_manager.h b/managers/cheat_manager.h index d208b118fa..a6e77816f2 100644 --- a/managers/cheat_manager.h +++ b/managers/cheat_manager.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/managers/core_option_manager.c b/managers/core_option_manager.c index 135d129985..40027dabcc 100644 --- a/managers/core_option_manager.c +++ b/managers/core_option_manager.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/managers/core_option_manager.h b/managers/core_option_manager.h index 8e40a41a68..f9594500dd 100644 --- a/managers/core_option_manager.h +++ b/managers/core_option_manager.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/managers/state_manager.c b/managers/state_manager.c index c447321944..de021eb684 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Alfred Agrell + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Alfred Agrell * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/managers/state_manager.h b/managers/state_manager.h index 49ad3cfb59..91a06b3665 100644 --- a/managers/state_manager.h +++ b/managers/state_manager.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Alfred Agrell + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Alfred Agrell * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_cancel.c b/menu/cbs/menu_cbs_cancel.c index 39d55c7f4c..f38d5e7a73 100644 --- a/menu/cbs/menu_cbs_cancel.c +++ b/menu/cbs/menu_cbs_cancel.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_contentlist_switch.c b/menu/cbs/menu_cbs_contentlist_switch.c index 47c3cfb5f5..eace71ee93 100644 --- a/menu/cbs/menu_cbs_contentlist_switch.c +++ b/menu/cbs/menu_cbs_contentlist_switch.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index feec5a0721..47067720b1 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_down.c b/menu/cbs/menu_cbs_down.c index 03a6df332f..f2a4a26f51 100644 --- a/menu/cbs/menu_cbs_down.c +++ b/menu/cbs/menu_cbs_down.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 6c7b67e807..8b19634b7a 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_info.c b/menu/cbs/menu_cbs_info.c index a92f34a906..4ba6df94e7 100644 --- a/menu/cbs/menu_cbs_info.c +++ b/menu/cbs/menu_cbs_info.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_label.c b/menu/cbs/menu_cbs_label.c index 64ab226e78..5544e21ea7 100644 --- a/menu/cbs/menu_cbs_label.c +++ b/menu/cbs/menu_cbs_label.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index 3a139c101b..061b8c533c 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 214adf3d18..83c76b60cb 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_refresh.c b/menu/cbs/menu_cbs_refresh.c index 0ee968c3da..e57fd25a34 100644 --- a/menu/cbs/menu_cbs_refresh.c +++ b/menu/cbs/menu_cbs_refresh.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index 92f2d02912..2cd25bf54a 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_scan.c b/menu/cbs/menu_cbs_scan.c index 180d2128f5..90e82faf1a 100644 --- a/menu/cbs/menu_cbs_scan.c +++ b/menu/cbs/menu_cbs_scan.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_select.c b/menu/cbs/menu_cbs_select.c index a3fd587761..a6fd4b8ce5 100644 --- a/menu/cbs/menu_cbs_select.c +++ b/menu/cbs/menu_cbs_select.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index c517d94716..0cb658ed75 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 4544e51cfe..ed4c0ee8e3 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index 89710e9c5c..54c238eabd 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/cbs/menu_cbs_up.c b/menu/cbs/menu_cbs_up.c index b6523d2a2c..01cd0ae5af 100644 --- a/menu/cbs/menu_cbs_up.c +++ b/menu/cbs/menu_cbs_up.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index a9efe27872..9455f84d5d 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/menu_generic.c b/menu/drivers/menu_generic.c index 40c8710cc5..59abd7b172 100644 --- a/menu/drivers/menu_generic.c +++ b/menu/drivers/menu_generic.c @@ -1,8 +1,8 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/menu_generic.h b/menu/drivers/menu_generic.h index da10b25071..d943c4b65c 100644 --- a/menu/drivers/menu_generic.h +++ b/menu/drivers/menu_generic.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/menu/drivers/nuklear.c b/menu/drivers/nuklear.c index 77c0020076..42769e4d58 100644 --- a/menu/drivers/nuklear.c +++ b/menu/drivers/nuklear.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_common.c b/menu/drivers/nuklear/nk_common.c index 0a3a7fd92c..187046ff0b 100644 --- a/menu/drivers/nuklear/nk_common.c +++ b/menu/drivers/nuklear/nk_common.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-Andr� Santoni - * Copyright (C) 2016 - Andr�s Su�rez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-Andr� Santoni + * Copyright (C) 2016-2017 - Andr�s Su�rez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_common.h b/menu/drivers/nuklear/nk_common.h index e241cf33ab..60ec992469 100644 --- a/menu/drivers/nuklear/nk_common.h +++ b/menu/drivers/nuklear/nk_common.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_menu.c b/menu/drivers/nuklear/nk_menu.c index 501906d8df..4f2949901a 100644 --- a/menu/drivers/nuklear/nk_menu.c +++ b/menu/drivers/nuklear/nk_menu.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -163,4 +163,4 @@ void nk_common_set_style(struct nk_context *ctx, enum theme theme) } else { nk_style_default(ctx); } -} \ No newline at end of file +} diff --git a/menu/drivers/nuklear/nk_menu.h b/menu/drivers/nuklear/nk_menu.h index ad5f67f5b2..6957887c1a 100644 --- a/menu/drivers/nuklear/nk_menu.h +++ b/menu/drivers/nuklear/nk_menu.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017- Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_wnd_file_picker.c b/menu/drivers/nuklear/nk_wnd_file_picker.c index e634644de7..6652eb84d7 100644 --- a/menu/drivers/nuklear/nk_wnd_file_picker.c +++ b/menu/drivers/nuklear/nk_wnd_file_picker.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017- Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_wnd_main.c b/menu/drivers/nuklear/nk_wnd_main.c index feabb14c94..78de2462c1 100644 --- a/menu/drivers/nuklear/nk_wnd_main.c +++ b/menu/drivers/nuklear/nk_wnd_main.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_wnd_settings.c b/menu/drivers/nuklear/nk_wnd_settings.c index d89265d72e..c033672304 100644 --- a/menu/drivers/nuklear/nk_wnd_settings.c +++ b/menu/drivers/nuklear/nk_wnd_settings.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/nuklear/nk_wnd_shader_parameters.c b/menu/drivers/nuklear/nk_wnd_shader_parameters.c index 76a7ad8232..40330c7135 100644 --- a/menu/drivers/nuklear/nk_wnd_shader_parameters.c +++ b/menu/drivers/nuklear/nk_wnd_shader_parameters.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni - * Copyright (C) 2016 - Andrés Suárez + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Andrés Suárez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/null.c b/menu/drivers/null.c index e74ccc1af0..d2f6fc3f9a 100644 --- a/menu/drivers/null.c +++ b/menu/drivers/null.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 1c9ca7a1a5..7a7175adad 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -1,8 +1,8 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2012-2015 - Michael Lelli - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index e0f4efcc31..982e3a1215 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index a92d79344c..0d2c89ca62 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2015- - Swizzy * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/menu/drivers/zarch.c b/menu/drivers/zarch.c index 0d47a9719f..f627b53db9 100644 --- a/menu/drivers/zarch.c +++ b/menu/drivers/zarch.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Higor Euripedes - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2015 - Jean-André Santoni + * Copyright (C) 2011-2017 - Higor Euripedes + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_caca.c b/menu/drivers_display/menu_display_caca.c index 1fbca75a6b..0e040a2763 100644 --- a/menu/drivers_display/menu_display_caca.c +++ b/menu/drivers_display/menu_display_caca.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_ctr.c b/menu/drivers_display/menu_display_ctr.c index 843ca4e86e..84922807d2 100644 --- a/menu/drivers_display/menu_display_ctr.c +++ b/menu/drivers_display/menu_display_ctr.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_d3d.cpp b/menu/drivers_display/menu_display_d3d.cpp index 9a4bbed7d8..373963ea4c 100644 --- a/menu/drivers_display/menu_display_d3d.cpp +++ b/menu/drivers_display/menu_display_d3d.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_gdi.c b/menu/drivers_display/menu_display_gdi.c index e04541c9ea..4e3f468b27 100644 --- a/menu/drivers_display/menu_display_gdi.c +++ b/menu/drivers_display/menu_display_gdi.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_gl.c b/menu/drivers_display/menu_display_gl.c index 997bc6f5f9..3dc579230a 100644 --- a/menu/drivers_display/menu_display_gl.c +++ b/menu/drivers_display/menu_display_gl.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_null.c b/menu/drivers_display/menu_display_null.c index a15c9c735b..f3120560fc 100644 --- a/menu/drivers_display/menu_display_null.c +++ b/menu/drivers_display/menu_display_null.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_vita2d.c b/menu/drivers_display/menu_display_vita2d.c index 56b61ac7a3..f4f707b053 100644 --- a/menu/drivers_display/menu_display_vita2d.c +++ b/menu/drivers_display/menu_display_vita2d.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/drivers_display/menu_display_vulkan.c b/menu/drivers_display/menu_display_vulkan.c index 4ff563f005..85b81ccfcb 100644 --- a/menu/drivers_display/menu_display_vulkan.c +++ b/menu/drivers_display/menu_display_vulkan.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2016-2017 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_animation.c b/menu/menu_animation.c index d504552e28..66c688b89b 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_animation.h b/menu/menu_animation.h index c03eb1edda..49d154d305 100644 --- a/menu/menu_animation.h +++ b/menu/menu_animation.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_cbs.c b/menu/menu_cbs.c index 1546145a43..d8a833fb9a 100644 --- a/menu/menu_cbs.c +++ b/menu/menu_cbs.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 3933ab9e15..930bd07679 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_content.c b/menu/menu_content.c index d62d491a77..3ba808399a 100644 --- a/menu/menu_content.c +++ b/menu/menu_content.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_content.h b/menu/menu_content.h index 81bab9c674..55485b9144 100644 --- a/menu/menu_content.h +++ b/menu/menu_content.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_display.c b/menu/menu_display.c index 51b75329d2..d4549c7a42 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_display.h b/menu/menu_display.h index 93b926b944..ea32acf50d 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 8d625e52f7..3ee45beecf 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 5e63c5f768..0c68697c87 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 5ad3570aee..d5b3560979 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 8c49e734e5..bc1e836524 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_entries.c b/menu/menu_entries.c index 75807a01e9..2f052e9b7f 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2014-2015 - Jay McCarthy - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_entries.h b/menu/menu_entries.h index f3015c2297..bb58b5f5b7 100644 --- a/menu/menu_entries.h +++ b/menu/menu_entries.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_event.c b/menu/menu_event.c index dca641b310..7546b7bc53 100644 --- a/menu/menu_event.c +++ b/menu/menu_event.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_event.h b/menu/menu_event.h index 300e945258..1ae9041f63 100644 --- a/menu/menu_event.h +++ b/menu/menu_event.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_input.c b/menu/menu_input.c index 8880854fdb..f771cf9afb 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_input.h b/menu/menu_input.h index 90e30e3c3b..cec5559b77 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_navigation.c b/menu/menu_navigation.c index 6c1aec3c4e..9d04848516 100644 --- a/menu/menu_navigation.c +++ b/menu/menu_navigation.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_navigation.h b/menu/menu_navigation.h index f81ced5e38..4ef22d355b 100644 --- a/menu/menu_navigation.h +++ b/menu/menu_navigation.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 29a72212b7..64145779f1 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1,8 +1,8 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_setting.h b/menu/menu_setting.h index 9da1cb9dc5..1079b185d9 100644 --- a/menu/menu_setting.h +++ b/menu/menu_setting.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_shader.c b/menu/menu_shader.c index a96319acb6..21c4b35432 100644 --- a/menu/menu_shader.c +++ b/menu/menu_shader.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/menu_shader.h b/menu/menu_shader.h index 7c0963387e..1c14e69b49 100644 --- a/menu/menu_shader.h +++ b/menu/menu_shader.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_dialog.c b/menu/widgets/menu_dialog.c index 86f757fe6b..d2a1f26fa0 100644 --- a/menu/widgets/menu_dialog.c +++ b/menu/widgets/menu_dialog.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_dialog.h b/menu/widgets/menu_dialog.h index 560ed72589..b692fe3138 100644 --- a/menu/widgets/menu_dialog.h +++ b/menu/widgets/menu_dialog.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_entry.c b/menu/widgets/menu_entry.c index 1fe68b8f01..aa0116ba8f 100644 --- a/menu/widgets/menu_entry.c +++ b/menu/widgets/menu_entry.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2015 - Jay McCarthy * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/menu/widgets/menu_entry.h b/menu/widgets/menu_entry.h index d37fa7e457..01e6180a1f 100644 --- a/menu/widgets/menu_entry.h +++ b/menu/widgets/menu_entry.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_filebrowser.c b/menu/widgets/menu_filebrowser.c index 056b956875..bd20f21f54 100644 --- a/menu/widgets/menu_filebrowser.c +++ b/menu/widgets/menu_filebrowser.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_filebrowser.h b/menu/widgets/menu_filebrowser.h index 4ccd45f2c7..9fc950bbdd 100644 --- a/menu/widgets/menu_filebrowser.h +++ b/menu/widgets/menu_filebrowser.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_input_bind_dialog.c b/menu/widgets/menu_input_bind_dialog.c index cc782330e9..e5d8fadddf 100644 --- a/menu/widgets/menu_input_bind_dialog.c +++ b/menu/widgets/menu_input_bind_dialog.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_input_bind_dialog.h b/menu/widgets/menu_input_bind_dialog.h index 58c08fcb16..36ff6cce7d 100644 --- a/menu/widgets/menu_input_bind_dialog.h +++ b/menu/widgets/menu_input_bind_dialog.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_input_dialog.c b/menu/widgets/menu_input_dialog.c index b6e232c458..12041438d5 100644 --- a/menu/widgets/menu_input_dialog.c +++ b/menu/widgets/menu_input_dialog.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_input_dialog.h b/menu/widgets/menu_input_dialog.h index be28d1d10e..a1e5c31e10 100644 --- a/menu/widgets/menu_input_dialog.h +++ b/menu/widgets/menu_input_dialog.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_list.c b/menu/widgets/menu_list.c index f207bb0342..7d7c37c996 100644 --- a/menu/widgets/menu_list.c +++ b/menu/widgets/menu_list.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_list.h b/menu/widgets/menu_list.h index e44f2ec591..16468598c3 100644 --- a/menu/widgets/menu_list.h +++ b/menu/widgets/menu_list.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_osk.c b/menu/widgets/menu_osk.c index bfafb3b579..1de8c7d522 100644 --- a/menu/widgets/menu_osk.c +++ b/menu/widgets/menu_osk.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/menu/widgets/menu_osk.h b/menu/widgets/menu_osk.h index 5869969110..9694bcf4c2 100644 --- a/menu/widgets/menu_osk.h +++ b/menu/widgets/menu_osk.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/httpserver/httpserver.c b/network/httpserver/httpserver.c index 05efe15552..6a7ade8dc2 100644 --- a/network/httpserver/httpserver.c +++ b/network/httpserver/httpserver.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015-2016 - Andre Leiradella + * Copyright (C) 2015-2017 - Andre Leiradella * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/httpserver/httpserver.h b/network/httpserver/httpserver.h index 301d0d67eb..7ab608648b 100644 --- a/network/httpserver/httpserver.h +++ b/network/httpserver/httpserver.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015-2016 - Andre Leiradella + * Copyright (C) 2015-2017 - Andre Leiradella * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/net_http_special.c b/network/net_http_special.c index f3aae2e6f3..567095f0f0 100644 --- a/network/net_http_special.c +++ b/network/net_http_special.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2015-2016 - Andre Leiradella - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2015-2017 - Andre Leiradella + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/net_http_special.h b/network/net_http_special.h index 6fa1af0fa8..24f7d87e47 100644 --- a/network/net_http_special.h +++ b/network/net_http_special.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2015-2016 - Andre Leiradella + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2015-2017 - Andre Leiradella * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/net_logger.c b/network/net_logger.c index 4050f623e3..35f4d08724 100644 --- a/network/net_logger.c +++ b/network/net_logger.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay.h b/network/netplay/netplay.h index c7e27def05..13f3249e17 100644 --- a/network/netplay/netplay.h +++ b/network/netplay/netplay.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_buf.c b/network/netplay/netplay_buf.c index 30e4c24b14..900c9ef904 100644 --- a/network/netplay/netplay_buf.c +++ b/network/netplay/netplay_buf.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_delta.c b/network/netplay/netplay_delta.c index 894478107b..eabeb70f5f 100644 --- a/network/netplay/netplay_delta.c +++ b/network/netplay/netplay_delta.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_discovery.c b/network/netplay/netplay_discovery.c index c6244503ee..baf536bb7c 100644 --- a/network/netplay/netplay_discovery.c +++ b/network/netplay/netplay_discovery.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_discovery.h b/network/netplay/netplay_discovery.h index f0b7358c78..d593af6e64 100644 --- a/network/netplay/netplay_discovery.h +++ b/network/netplay/netplay_discovery.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 89c5ab5535..c010d30b20 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index b75b332010..3731dc220d 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_init.c b/network/netplay/netplay_init.c index df20b49cb2..e34d52c1f5 100644 --- a/network/netplay/netplay_init.c +++ b/network/netplay/netplay_init.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_io.c b/network/netplay/netplay_io.c index 39dc167a56..0fbb748fdd 100644 --- a/network/netplay/netplay_io.c +++ b/network/netplay/netplay_io.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_private.h b/network/netplay/netplay_private.h index b60a414e85..02a7377d98 100644 --- a/network/netplay/netplay_private.h +++ b/network/netplay/netplay_private.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/network/netplay/netplay_sync.c b/network/netplay/netplay_sync.c index 68421caf6a..9735f12133 100644 --- a/network/netplay/netplay_sync.c +++ b/network/netplay/netplay_sync.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Gregor Richards + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Gregor Richards * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/record/drivers/record_ffmpeg.c b/record/drivers/record_ffmpeg.c index 3f0d9418bd..778466dde4 100644 --- a/record/drivers/record_ffmpeg.c +++ b/record/drivers/record_ffmpeg.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- @@ -14,13 +14,10 @@ * If not, see . */ - - #include #include #include - #include #include diff --git a/record/drivers/record_null.c b/record/drivers/record_null.c index 06c6634cd8..33bd367a33 100644 --- a/record/drivers/record_null.c +++ b/record/drivers/record_null.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/record/record_driver.c b/record/record_driver.c index 679b038a12..d3d2b1769b 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/record/record_driver.h b/record/record_driver.h index d70c4b5181..d124042b94 100644 --- a/record/record_driver.h +++ b/record/record_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index c6749ac351..50459adb9b 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_content.c b/tasks/task_content.c index b6e90634ad..651a37fcc2 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_database.c b/tasks/task_database.c index 6136d28409..9ccb706877 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_database_cue.c b/tasks/task_database_cue.c index d0aa73ad10..458dde2a40 100644 --- a/tasks/task_database_cue.c +++ b/tasks/task_database_cue.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index 85623f07f3..e0efb224fb 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_file_transfer.c b/tasks/task_file_transfer.c index ed1bbcf387..f3ea334268 100644 --- a/tasks/task_file_transfer.c +++ b/tasks/task_file_transfer.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_http.c b/tasks/task_http.c index 343172202a..9413e9718f 100644 --- a/tasks/task_http.c +++ b/tasks/task_http.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_image.c b/tasks/task_image.c index 96bcd4d23d..65f9d9d008 100644 --- a/tasks/task_image.c +++ b/tasks/task_image.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_netplay_lan_scan.c b/tasks/task_netplay_lan_scan.c index 9d71b8e5a3..38c86c3789 100644 --- a/tasks/task_netplay_lan_scan.c +++ b/tasks/task_netplay_lan_scan.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Jean-André Santoni + * Copyright (C) 2016-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_overlay.c b/tasks/task_overlay.c index b7de165161..a24208b37d 100644 --- a/tasks/task_overlay.c +++ b/tasks/task_overlay.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_powerstate.c b/tasks/task_powerstate.c index ff9d9c1442..028e7f741f 100644 --- a/tasks/task_powerstate.c +++ b/tasks/task_powerstate.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_save.c b/tasks/task_save.c index ee8443c058..452ea44790 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index a5246d48e1..c8318a4736 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2016 - Brad Parker + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2017 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/task_wifi.c b/tasks/task_wifi.c index a723bbe2d8..8fc081cbcb 100644 --- a/tasks/task_wifi.c +++ b/tasks/task_wifi.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Jean-André Santoni + * Copyright (C) 2016-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index ae900ee8fa..5c97486db5 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Higor Euripedes - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Higor Euripedes + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/cocoa/cocoa_common.h b/ui/drivers/cocoa/cocoa_common.h index 07654189e5..09f1e5d57b 100644 --- a/ui/drivers/cocoa/cocoa_common.h +++ b/ui/drivers/cocoa/cocoa_common.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index 22db7d2f65..71d3205f65 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2015 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/cocoa/cocoatouch_menu.m b/ui/drivers/cocoa/cocoatouch_menu.m index a3262b38ac..6302369858 100644 --- a/ui/drivers/cocoa/cocoatouch_menu.m +++ b/ui/drivers/cocoa/cocoatouch_menu.m @@ -1,5 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2013-2014 - Jason Fetters + * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2015 - Jay McCarthy * * RetroArch is free software: you can redistribute it and/or modify it under the terms diff --git a/ui/drivers/cocoa/ui_cocoa_application.m b/ui/drivers/cocoa/ui_cocoa_application.m index 979e490458..1feffc6c95 100644 --- a/ui/drivers/cocoa/ui_cocoa_application.m +++ b/ui/drivers/cocoa/ui_cocoa_application.m @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/cocoa/ui_cocoa_browser_window.m b/ui/drivers/cocoa/ui_cocoa_browser_window.m index 47a096f69b..1ed7446be6 100644 --- a/ui/drivers/cocoa/ui_cocoa_browser_window.m +++ b/ui/drivers/cocoa/ui_cocoa_browser_window.m @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/cocoa/ui_cocoa_msg_window.m b/ui/drivers/cocoa/ui_cocoa_msg_window.m index 78449181f5..3a9892c79f 100644 --- a/ui/drivers/cocoa/ui_cocoa_msg_window.m +++ b/ui/drivers/cocoa/ui_cocoa_msg_window.m @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/cocoa/ui_cocoa_window.m b/ui/drivers/cocoa/ui_cocoa_window.m index be3f743cab..881f60b657 100644 --- a/ui/drivers/cocoa/ui_cocoa_window.m +++ b/ui/drivers/cocoa/ui_cocoa_window.m @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/null/ui_null_application.c b/ui/drivers/null/ui_null_application.c index 1eec3f9059..ef2394f85e 100644 --- a/ui/drivers/null/ui_null_application.c +++ b/ui/drivers/null/ui_null_application.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/null/ui_null_browser_window.c b/ui/drivers/null/ui_null_browser_window.c index 9b0209a361..ab739a3c5f 100644 --- a/ui/drivers/null/ui_null_browser_window.c +++ b/ui/drivers/null/ui_null_browser_window.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/null/ui_null_msg_window.c b/ui/drivers/null/ui_null_msg_window.c index 20e91d3a46..c4de4b7175 100644 --- a/ui/drivers/null/ui_null_msg_window.c +++ b/ui/drivers/null/ui_null_msg_window.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/null/ui_null_window.c b/ui/drivers/null/ui_null_window.c index ec0b889d8e..4abdf028cb 100644 --- a/ui/drivers/null/ui_null_window.c +++ b/ui/drivers/null/ui_null_window.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/ui_qt_application.cpp b/ui/drivers/qt/ui_qt_application.cpp index f5ae04cf68..c6c0d42c19 100644 --- a/ui/drivers/qt/ui_qt_application.cpp +++ b/ui/drivers/qt/ui_qt_application.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/ui_qt_browser_window.cpp b/ui/drivers/qt/ui_qt_browser_window.cpp index 31ed1c7c1e..7272b07701 100644 --- a/ui/drivers/qt/ui_qt_browser_window.cpp +++ b/ui/drivers/qt/ui_qt_browser_window.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/ui_qt_msg_window.cpp b/ui/drivers/qt/ui_qt_msg_window.cpp index a37a939b3b..3d4a3fb497 100644 --- a/ui/drivers/qt/ui_qt_msg_window.cpp +++ b/ui/drivers/qt/ui_qt_msg_window.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/ui_qt_window.cpp b/ui/drivers/qt/ui_qt_window.cpp index c4cff0724e..aca4448c22 100644 --- a/ui/drivers/qt/ui_qt_window.cpp +++ b/ui/drivers/qt/ui_qt_window.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/wimp/wimp.cpp b/ui/drivers/qt/wimp/wimp.cpp index 07df4f22bc..7c65bb14c1 100644 --- a/ui/drivers/qt/wimp/wimp.cpp +++ b/ui/drivers/qt/wimp/wimp.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Andres Suarez + * Copyright (C) 2011-2017 - Andres Suarez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/wimp/wimp.h b/ui/drivers/qt/wimp/wimp.h index f404e852eb..d01b80e112 100644 --- a/ui/drivers/qt/wimp/wimp.h +++ b/ui/drivers/qt/wimp/wimp.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Andres Suarez + * Copyright (C) 2011-2017 - Andres Suarez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/wimp/wimp_global.h b/ui/drivers/qt/wimp/wimp_global.h index 0974927311..be3afc6994 100644 --- a/ui/drivers/qt/wimp/wimp_global.h +++ b/ui/drivers/qt/wimp/wimp_global.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Andres Suarez + * Copyright (C) 2011-2017 - Andres Suarez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/wrapper/wrapper.cpp b/ui/drivers/qt/wrapper/wrapper.cpp index c3573e40a5..86a82d75af 100644 --- a/ui/drivers/qt/wrapper/wrapper.cpp +++ b/ui/drivers/qt/wrapper/wrapper.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Andres Suarez + * Copyright (C) 2011-2017 - Andres Suarez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/qt/wrapper/wrapper.h b/ui/drivers/qt/wrapper/wrapper.h index dc8fffd756..9e28c5833a 100644 --- a/ui/drivers/qt/wrapper/wrapper.h +++ b/ui/drivers/qt/wrapper/wrapper.h @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2015 - Andres Suarez + * Copyright (C) 2011-2017 - Andres Suarez * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/ui_cocoa.h b/ui/drivers/ui_cocoa.h index 242e4a1151..274ba285cb 100644 --- a/ui/drivers/ui_cocoa.h +++ b/ui/drivers/ui_cocoa.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index f86ceca170..966ec57065 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2013-2014 - Jason Fetters - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2013-2014 - Jason Fetters + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/ui_null.c b/ui/drivers/ui_null.c index f43fcd29f7..833bb73887 100644 --- a/ui/drivers/ui_null.c +++ b/ui/drivers/ui_null.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index e074b1d2dd..cdbce779f6 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index e8a4652386..49382b9de6 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015-2016 - Ali Bouhlel - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2015-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/ui_win32.h b/ui/drivers/ui_win32.h index 07a242c199..d1a685fa71 100644 --- a/ui/drivers/ui_win32.h +++ b/ui/drivers/ui_win32.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/win32/ui_win32_application.c b/ui/drivers/win32/ui_win32_application.c index 44c9624323..be5c8eace7 100644 --- a/ui/drivers/win32/ui_win32_application.c +++ b/ui/drivers/win32/ui_win32_application.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/win32/ui_win32_browser_window.c b/ui/drivers/win32/ui_win32_browser_window.c index 9f59cb3e58..bde5f318a7 100644 --- a/ui/drivers/win32/ui_win32_browser_window.c +++ b/ui/drivers/win32/ui_win32_browser_window.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/win32/ui_win32_msg_window.c b/ui/drivers/win32/ui_win32_msg_window.c index 97a20b73a2..113a3d58eb 100644 --- a/ui/drivers/win32/ui_win32_msg_window.c +++ b/ui/drivers/win32/ui_win32_msg_window.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/drivers/win32/ui_win32_window.cpp b/ui/drivers/win32/ui_win32_window.cpp index d76866a0ba..afa19a8346 100644 --- a/ui/drivers/win32/ui_win32_window.cpp +++ b/ui/drivers/win32/ui_win32_window.cpp @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2015-2016 - Ali Bouhlel - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2015-2017 - Ali Bouhlel + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/ui_companion_driver.c b/ui/ui_companion_driver.c index 6762f63ae2..a5bb45d5be 100644 --- a/ui/ui_companion_driver.c +++ b/ui/ui_companion_driver.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/ui/ui_companion_driver.h b/ui/ui_companion_driver.h index 5cbd8e0af4..5bc4e152eb 100644 --- a/ui/ui_companion_driver.h +++ b/ui/ui_companion_driver.h @@ -1,6 +1,6 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/wifi/drivers/connmanctl.c b/wifi/drivers/connmanctl.c index 3f78ee3565..5af68d2f4d 100644 --- a/wifi/drivers/connmanctl.c +++ b/wifi/drivers/connmanctl.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Jean-André Santoni + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/wifi/drivers/nullwifi.c b/wifi/drivers/nullwifi.c index a2e960f8b5..362196bb01 100644 --- a/wifi/drivers/nullwifi.c +++ b/wifi/drivers/nullwifi.c @@ -1,5 +1,5 @@ /* RetroArch - A frontend for libretro. - * Copyright (C) 2014-2016 - Jean-André Santoni + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/wifi/wifi_driver.c b/wifi/wifi_driver.c index c80137502d..f27a9ddf7e 100644 --- a/wifi/wifi_driver.c +++ b/wifi/wifi_driver.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- diff --git a/wifi/wifi_driver.h b/wifi/wifi_driver.h index 55646255e4..76b6587103 100644 --- a/wifi/wifi_driver.h +++ b/wifi/wifi_driver.h @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2016 - Daniel De Matteis - * Copyright (C) 2014-2016 - Jean-André Santoni + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2014-2017 - Jean-André Santoni * * RetroArch is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Found- From 64bb848dafc59275ee0f61e6f7461cfe13b98067 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 13:58:20 +0100 Subject: [PATCH 333/427] Update headers (pt. 2 - libretro-common) --- libretro-common/algorithms/mismatch.c | 2 +- .../audio/conversion/float_to_s16.c | 2 +- .../audio/conversion/float_to_s16_neon.S | 2 +- .../audio/conversion/float_to_s16_neon.c | 2 +- .../audio/conversion/s16_to_float.c | 2 +- .../audio/conversion/s16_to_float_neon.S | 2 +- .../audio/conversion/s16_to_float_neon.c | 2 +- libretro-common/audio/dsp_filter.c | 2 +- libretro-common/audio/dsp_filters/chorus.c | 2 +- libretro-common/audio/dsp_filters/echo.c | 2 +- libretro-common/audio/dsp_filters/eq.c | 2 +- libretro-common/audio/dsp_filters/fft/fft.c | 2 +- libretro-common/audio/dsp_filters/fft/fft.h | 2 +- libretro-common/audio/dsp_filters/iir.c | 2 +- libretro-common/audio/dsp_filters/panning.c | 2 +- libretro-common/audio/dsp_filters/phaser.c | 2 +- libretro-common/audio/dsp_filters/reverb.c | 2 +- libretro-common/audio/dsp_filters/wahwah.c | 2 +- .../audio/resampler/audio_resampler.c | 2 +- .../resampler/drivers/nearest_resampler.c | 2 +- .../audio/resampler/drivers/null_resampler.c | 2 +- .../audio/resampler/drivers/sinc_resampler.c | 2 +- .../resampler/drivers/sinc_resampler_neon.S | 2 +- libretro-common/compat/compat_fnmatch.c | 2 +- libretro-common/compat/compat_getopt.c | 2 +- libretro-common/compat/compat_posix_string.c | 2 +- libretro-common/compat/compat_snprintf.c | 2 +- libretro-common/compat/compat_strcasestr.c | 2 +- libretro-common/compat/compat_strl.c | 2 +- libretro-common/dynamic/dylib.c | 2 +- libretro-common/encodings/encoding_crc32.c | 2 +- libretro-common/encodings/encoding_utf.c | 2 +- libretro-common/features/features_cpu.c | 2 +- libretro-common/file/archive_file.c | 2 +- libretro-common/file/archive_file_7z.c | 2 +- libretro-common/file/archive_file_zlib.c | 2 +- libretro-common/file/config_file.c | 2 +- libretro-common/file/config_file_userdata.c | 2 +- libretro-common/file/file_path.c | 2 +- libretro-common/file/retro_dirent.c | 2 +- libretro-common/file/retro_stat.c | 2 +- libretro-common/formats/bmp/rbmp.c | 2 +- libretro-common/formats/bmp/rbmp_encode.c | 2 +- libretro-common/formats/image_texture.c | 2 +- libretro-common/formats/image_transfer.c | 2 +- libretro-common/formats/jpeg/rjpeg.c | 2 +- libretro-common/formats/json/jsonsax.c | 2 +- libretro-common/formats/png/rpng.c | 2 +- libretro-common/formats/png/rpng_encode.c | 2 +- libretro-common/formats/png/rpng_internal.h | 2 +- libretro-common/formats/tga/rtga.c | 2 +- libretro-common/formats/wav/rwav.c | 2 +- libretro-common/formats/xml/rxml.c | 2 +- libretro-common/formats/xml/test/rxml_test.c | 2 +- libretro-common/gfx/gl_capabilities.c | 2 +- libretro-common/gfx/math/matrix_3x3.c | 2 +- libretro-common/gfx/math/matrix_4x4.c | 2 +- libretro-common/gfx/math/vector_2.c | 2 +- libretro-common/gfx/math/vector_3.c | 2 +- libretro-common/gfx/math/vector_4.c | 2 +- libretro-common/gfx/scaler/pixconv.c | 2 +- libretro-common/gfx/scaler/scaler.c | 2 +- libretro-common/gfx/scaler/scaler_filter.c | 2 +- libretro-common/gfx/scaler/scaler_int.c | 2 +- libretro-common/glsm/glsm.c | 2 +- libretro-common/glsym/glsym_gl.c | 2 +- libretro-common/glsym/rglgen.c | 2 +- libretro-common/hash/rhash.c | 2 +- libretro-common/include/algorithms/mismatch.h | 2 +- .../include/audio/audio_resampler.h | 2 +- .../include/audio/conversion/float_to_s16.h | 2 +- .../include/audio/conversion/s16_to_float.h | 2 +- libretro-common/include/audio/dsp_filter.h | 2 +- libretro-common/include/boolean.h | 2 +- libretro-common/include/clamping.h | 2 +- libretro-common/include/compat/apple_compat.h | 2 +- libretro-common/include/compat/fnmatch.h | 2 +- libretro-common/include/compat/getopt.h | 2 +- libretro-common/include/compat/intrinsics.h | 2 +- libretro-common/include/compat/msvc.h | 2 +- libretro-common/include/compat/posix_string.h | 2 +- libretro-common/include/compat/strcasestr.h | 2 +- libretro-common/include/compat/strl.h | 2 +- libretro-common/include/dynamic/dylib.h | 2 +- libretro-common/include/encodings/crc32.h | 2 +- libretro-common/include/encodings/utf.h | 2 +- libretro-common/include/fastcpy.h | 24 ++++++++++++++++++- .../include/features/features_cpu.h | 2 +- libretro-common/include/file/archive_file.h | 2 +- libretro-common/include/file/config_file.h | 2 +- .../include/file/config_file_userdata.h | 2 +- libretro-common/include/file/file_path.h | 2 +- libretro-common/include/file/nbio.h | 2 +- libretro-common/include/filters.h | 2 +- libretro-common/include/formats/image.h | 2 +- libretro-common/include/formats/jsonsax.h | 2 +- libretro-common/include/formats/rbmp.h | 2 +- libretro-common/include/formats/rjpeg.h | 2 +- libretro-common/include/formats/rpng.h | 2 +- libretro-common/include/formats/rtga.h | 2 +- libretro-common/include/formats/rwav.h | 2 +- libretro-common/include/formats/rxml.h | 2 +- libretro-common/include/gfx/gl_capabilities.h | 2 +- libretro-common/include/gfx/math/matrix_3x3.h | 2 +- libretro-common/include/gfx/math/matrix_4x4.h | 2 +- libretro-common/include/gfx/math/vector_2.h | 2 +- libretro-common/include/gfx/math/vector_3.h | 2 +- libretro-common/include/gfx/math/vector_4.h | 2 +- libretro-common/include/gfx/scaler/filter.h | 2 +- libretro-common/include/gfx/scaler/pixconv.h | 2 +- libretro-common/include/gfx/scaler/scaler.h | 2 +- .../include/gfx/scaler/scaler_int.h | 2 +- libretro-common/include/gfx/video_frame.h | 2 +- libretro-common/include/glsm/glsm.h | 2 +- libretro-common/include/glsm/glsmsym.h | 2 +- libretro-common/include/glsym/glsym.h | 2 +- libretro-common/include/glsym/glsym_gl.h | 2 +- libretro-common/include/glsym/rglgen.h | 2 +- .../include/glsym/rglgen_headers.h | 2 +- libretro-common/include/libco.h | 2 +- libretro-common/include/libretro.h | 2 +- libretro-common/include/libretro_dspfilter.h | 2 +- libretro-common/include/libretro_vulkan.h | 2 +- libretro-common/include/lists/dir_list.h | 2 +- libretro-common/include/lists/file_list.h | 2 +- libretro-common/include/lists/string_list.h | 2 +- libretro-common/include/math/complex.h | 2 +- libretro-common/include/math/float_minmax.h | 2 +- libretro-common/include/math/fxp.h | 2 +- libretro-common/include/memalign.h | 2 +- libretro-common/include/memmap.h | 2 +- libretro-common/include/net/net_compat.h | 2 +- libretro-common/include/net/net_http.h | 2 +- libretro-common/include/net/net_http_parse.h | 2 +- libretro-common/include/net/net_ifinfo.h | 2 +- libretro-common/include/net/net_natt.h | 2 +- libretro-common/include/net/net_socket.h | 2 +- libretro-common/include/queues/fifo_queue.h | 2 +- .../include/queues/message_queue.h | 2 +- libretro-common/include/queues/task_queue.h | 2 +- libretro-common/include/retro_assert.h | 2 +- libretro-common/include/retro_common.h | 2 +- libretro-common/include/retro_common_api.h | 2 +- libretro-common/include/retro_dirent.h | 2 +- libretro-common/include/retro_endianness.h | 2 +- libretro-common/include/retro_environment.h | 2 +- libretro-common/include/retro_inline.h | 2 +- libretro-common/include/retro_miscellaneous.h | 2 +- libretro-common/include/retro_stat.h | 2 +- libretro-common/include/rhash.h | 2 +- libretro-common/include/rthreads/rsemaphore.h | 2 +- libretro-common/include/rthreads/rthreads.h | 2 +- libretro-common/include/streams/file_stream.h | 2 +- .../include/streams/interface_stream.h | 2 +- .../include/streams/memory_stream.h | 2 +- .../include/streams/trans_stream.h | 2 +- libretro-common/include/string/stdstring.h | 2 +- libretro-common/lists/dir_list.c | 2 +- libretro-common/lists/file_list.c | 2 +- libretro-common/lists/string_list.c | 2 +- libretro-common/memmap/memalign.c | 2 +- libretro-common/memmap/memmap.c | 2 +- libretro-common/net/net_compat.c | 2 +- libretro-common/net/net_http.c | 2 +- libretro-common/net/net_http_parse.c | 2 +- libretro-common/net/net_ifinfo.c | 2 +- libretro-common/net/net_natt.c | 2 +- libretro-common/net/net_socket.c | 2 +- libretro-common/queues/fifo_queue.c | 2 +- libretro-common/queues/message_queue.c | 2 +- libretro-common/queues/task_queue.c | 2 +- libretro-common/rthreads/gx_pthread.h | 2 +- libretro-common/rthreads/psp_pthread.h | 2 +- libretro-common/rthreads/rsemaphore.c | 2 +- libretro-common/rthreads/rthreads.c | 2 +- libretro-common/rthreads/xenon_sdl_threads.c | 4 ++-- .../samples/formats/png/rpng_test.c | 2 +- libretro-common/samples/net/net_http_test.c | 2 +- libretro-common/samples/net/net_ifinfo_test.c | 2 +- libretro-common/streams/file_stream.c | 2 +- libretro-common/streams/interface_stream.c | 2 +- libretro-common/streams/memory_stream.c | 2 +- libretro-common/streams/trans_stream.c | 2 +- libretro-common/streams/trans_stream_pipe.c | 2 +- libretro-common/streams/trans_stream_zlib.c | 2 +- libretro-common/string/stdstring.c | 2 +- 186 files changed, 209 insertions(+), 187 deletions(-) diff --git a/libretro-common/algorithms/mismatch.c b/libretro-common/algorithms/mismatch.c index b7997023ff..2f733bf618 100644 --- a/libretro-common/algorithms/mismatch.c +++ b/libretro-common/algorithms/mismatch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (mismatch.c). diff --git a/libretro-common/audio/conversion/float_to_s16.c b/libretro-common/audio/conversion/float_to_s16.c index d47ecb3283..2eeefa4848 100644 --- a/libretro-common/audio/conversion/float_to_s16.c +++ b/libretro-common/audio/conversion/float_to_s16.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (float_to_s16.c). diff --git a/libretro-common/audio/conversion/float_to_s16_neon.S b/libretro-common/audio/conversion/float_to_s16_neon.S index 88aae1afd8..aa9e565671 100644 --- a/libretro-common/audio/conversion/float_to_s16_neon.S +++ b/libretro-common/audio/conversion/float_to_s16_neon.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (float_to_s16_neon.S). diff --git a/libretro-common/audio/conversion/float_to_s16_neon.c b/libretro-common/audio/conversion/float_to_s16_neon.c index 4b9be62329..342f4978e1 100644 --- a/libretro-common/audio/conversion/float_to_s16_neon.c +++ b/libretro-common/audio/conversion/float_to_s16_neon.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (float_to_s16_neon.S). diff --git a/libretro-common/audio/conversion/s16_to_float.c b/libretro-common/audio/conversion/s16_to_float.c index 70ec6476da..afaff6d8b7 100644 --- a/libretro-common/audio/conversion/s16_to_float.c +++ b/libretro-common/audio/conversion/s16_to_float.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (s16_to_float.c). diff --git a/libretro-common/audio/conversion/s16_to_float_neon.S b/libretro-common/audio/conversion/s16_to_float_neon.S index 93f6592f34..b744924400 100644 --- a/libretro-common/audio/conversion/s16_to_float_neon.S +++ b/libretro-common/audio/conversion/s16_to_float_neon.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (s16_to_float_neon.S). diff --git a/libretro-common/audio/conversion/s16_to_float_neon.c b/libretro-common/audio/conversion/s16_to_float_neon.c index e6b24c00c3..464e40fbc9 100644 --- a/libretro-common/audio/conversion/s16_to_float_neon.c +++ b/libretro-common/audio/conversion/s16_to_float_neon.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (s16_to_float_neon.S). diff --git a/libretro-common/audio/dsp_filter.c b/libretro-common/audio/dsp_filter.c index 14f45a84af..56b85b8f0a 100644 --- a/libretro-common/audio/dsp_filter.c +++ b/libretro-common/audio/dsp_filter.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (dsp_filter.c). diff --git a/libretro-common/audio/dsp_filters/chorus.c b/libretro-common/audio/dsp_filters/chorus.c index b849f32ba0..d48c346fb0 100644 --- a/libretro-common/audio/dsp_filters/chorus.c +++ b/libretro-common/audio/dsp_filters/chorus.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (chorus.c). diff --git a/libretro-common/audio/dsp_filters/echo.c b/libretro-common/audio/dsp_filters/echo.c index 6b3b05a79f..4b0c6cccfc 100644 --- a/libretro-common/audio/dsp_filters/echo.c +++ b/libretro-common/audio/dsp_filters/echo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (echo.c). diff --git a/libretro-common/audio/dsp_filters/eq.c b/libretro-common/audio/dsp_filters/eq.c index f22b09e175..4033aa6512 100644 --- a/libretro-common/audio/dsp_filters/eq.c +++ b/libretro-common/audio/dsp_filters/eq.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (eq.c). diff --git a/libretro-common/audio/dsp_filters/fft/fft.c b/libretro-common/audio/dsp_filters/fft/fft.c index 890ff8301d..cc6b958161 100644 --- a/libretro-common/audio/dsp_filters/fft/fft.c +++ b/libretro-common/audio/dsp_filters/fft/fft.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (fft.c). diff --git a/libretro-common/audio/dsp_filters/fft/fft.h b/libretro-common/audio/dsp_filters/fft/fft.h index e9f974de78..8a16c6cb83 100644 --- a/libretro-common/audio/dsp_filters/fft/fft.h +++ b/libretro-common/audio/dsp_filters/fft/fft.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (fft.h). diff --git a/libretro-common/audio/dsp_filters/iir.c b/libretro-common/audio/dsp_filters/iir.c index 8ae53c5fe9..015b275900 100644 --- a/libretro-common/audio/dsp_filters/iir.c +++ b/libretro-common/audio/dsp_filters/iir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (iir.c). diff --git a/libretro-common/audio/dsp_filters/panning.c b/libretro-common/audio/dsp_filters/panning.c index a832570500..52935bb88e 100644 --- a/libretro-common/audio/dsp_filters/panning.c +++ b/libretro-common/audio/dsp_filters/panning.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (panning.c). diff --git a/libretro-common/audio/dsp_filters/phaser.c b/libretro-common/audio/dsp_filters/phaser.c index c2a470b67b..7c165e1cdf 100644 --- a/libretro-common/audio/dsp_filters/phaser.c +++ b/libretro-common/audio/dsp_filters/phaser.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (phaser.c). diff --git a/libretro-common/audio/dsp_filters/reverb.c b/libretro-common/audio/dsp_filters/reverb.c index 1c4e5176b7..e81d85980d 100644 --- a/libretro-common/audio/dsp_filters/reverb.c +++ b/libretro-common/audio/dsp_filters/reverb.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (reverb.c). diff --git a/libretro-common/audio/dsp_filters/wahwah.c b/libretro-common/audio/dsp_filters/wahwah.c index 0fb0b83112..f4e8133520 100644 --- a/libretro-common/audio/dsp_filters/wahwah.c +++ b/libretro-common/audio/dsp_filters/wahwah.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (wahwah.c). diff --git a/libretro-common/audio/resampler/audio_resampler.c b/libretro-common/audio/resampler/audio_resampler.c index cb424691a3..e3baa7f70f 100644 --- a/libretro-common/audio/resampler/audio_resampler.c +++ b/libretro-common/audio/resampler/audio_resampler.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (audio_resampler.c). diff --git a/libretro-common/audio/resampler/drivers/nearest_resampler.c b/libretro-common/audio/resampler/drivers/nearest_resampler.c index 52fae25bf9..c5244851a6 100644 --- a/libretro-common/audio/resampler/drivers/nearest_resampler.c +++ b/libretro-common/audio/resampler/drivers/nearest_resampler.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (nearest_resampler.c). diff --git a/libretro-common/audio/resampler/drivers/null_resampler.c b/libretro-common/audio/resampler/drivers/null_resampler.c index cf41281b6b..e5fe5982a4 100644 --- a/libretro-common/audio/resampler/drivers/null_resampler.c +++ b/libretro-common/audio/resampler/drivers/null_resampler.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (null_resampler.c). diff --git a/libretro-common/audio/resampler/drivers/sinc_resampler.c b/libretro-common/audio/resampler/drivers/sinc_resampler.c index 113554bff1..2237dfc5ce 100644 --- a/libretro-common/audio/resampler/drivers/sinc_resampler.c +++ b/libretro-common/audio/resampler/drivers/sinc_resampler.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (sinc_resampler.c). diff --git a/libretro-common/audio/resampler/drivers/sinc_resampler_neon.S b/libretro-common/audio/resampler/drivers/sinc_resampler_neon.S index b2fefcce43..033104e064 100644 --- a/libretro-common/audio/resampler/drivers/sinc_resampler_neon.S +++ b/libretro-common/audio/resampler/drivers/sinc_resampler_neon.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (sinc_resampler_neon.S). diff --git a/libretro-common/compat/compat_fnmatch.c b/libretro-common/compat/compat_fnmatch.c index a379420c46..110f451ec8 100644 --- a/libretro-common/compat/compat_fnmatch.c +++ b/libretro-common/compat/compat_fnmatch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (compat_fnmatch.c). diff --git a/libretro-common/compat/compat_getopt.c b/libretro-common/compat/compat_getopt.c index c7b1c66919..c32c85865b 100644 --- a/libretro-common/compat/compat_getopt.c +++ b/libretro-common/compat/compat_getopt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (compat_getopt.c). diff --git a/libretro-common/compat/compat_posix_string.c b/libretro-common/compat/compat_posix_string.c index 98cc688c79..71b9f8e832 100644 --- a/libretro-common/compat/compat_posix_string.c +++ b/libretro-common/compat/compat_posix_string.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (compat_posix_string.c). diff --git a/libretro-common/compat/compat_snprintf.c b/libretro-common/compat/compat_snprintf.c index 336d2b8e7a..17b453e3c0 100644 --- a/libretro-common/compat/compat_snprintf.c +++ b/libretro-common/compat/compat_snprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (compat_snprintf.c). diff --git a/libretro-common/compat/compat_strcasestr.c b/libretro-common/compat/compat_strcasestr.c index 44bd8b2183..163c50fedb 100644 --- a/libretro-common/compat/compat_strcasestr.c +++ b/libretro-common/compat/compat_strcasestr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (compat_strcasestr.c). diff --git a/libretro-common/compat/compat_strl.c b/libretro-common/compat/compat_strl.c index d3e4c7a63b..188fd72477 100644 --- a/libretro-common/compat/compat_strl.c +++ b/libretro-common/compat/compat_strl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (compat_strl.c). diff --git a/libretro-common/dynamic/dylib.c b/libretro-common/dynamic/dylib.c index 611c9f8771..ab10226032 100644 --- a/libretro-common/dynamic/dylib.c +++ b/libretro-common/dynamic/dylib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (dylib.c). diff --git a/libretro-common/encodings/encoding_crc32.c b/libretro-common/encodings/encoding_crc32.c index 8a13cce4a2..aa10d1a241 100644 --- a/libretro-common/encodings/encoding_crc32.c +++ b/libretro-common/encodings/encoding_crc32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (encoding_crc32.c). diff --git a/libretro-common/encodings/encoding_utf.c b/libretro-common/encodings/encoding_utf.c index 0c339e7418..76fca8dfb8 100644 --- a/libretro-common/encodings/encoding_utf.c +++ b/libretro-common/encodings/encoding_utf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (encoding_utf.c). diff --git a/libretro-common/features/features_cpu.c b/libretro-common/features/features_cpu.c index 72fc208a99..fee5635add 100644 --- a/libretro-common/features/features_cpu.c +++ b/libretro-common/features/features_cpu.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (features_cpu.c). diff --git a/libretro-common/file/archive_file.c b/libretro-common/file/archive_file.c index b6a952537b..bdc1c40b89 100644 --- a/libretro-common/file/archive_file.c +++ b/libretro-common/file/archive_file.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (archive_file.c). diff --git a/libretro-common/file/archive_file_7z.c b/libretro-common/file/archive_file_7z.c index 4a578a0b23..da0876ab74 100644 --- a/libretro-common/file/archive_file_7z.c +++ b/libretro-common/file/archive_file_7z.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (archive_file_sevenzip.c). diff --git a/libretro-common/file/archive_file_zlib.c b/libretro-common/file/archive_file_zlib.c index c52c641637..b0d56af2ba 100644 --- a/libretro-common/file/archive_file_zlib.c +++ b/libretro-common/file/archive_file_zlib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (archive_file_zlib.c). diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c index bb2d7f8cac..2b1714e981 100644 --- a/libretro-common/file/config_file.c +++ b/libretro-common/file/config_file.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (config_file.c). diff --git a/libretro-common/file/config_file_userdata.c b/libretro-common/file/config_file_userdata.c index b1ff8138e2..48c41a5f3d 100644 --- a/libretro-common/file/config_file_userdata.c +++ b/libretro-common/file/config_file_userdata.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (config_file_userdata.c). diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index c02ddf545d..61ac4b3182 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_path.c). diff --git a/libretro-common/file/retro_dirent.c b/libretro-common/file/retro_dirent.c index f9d188c96c..66830a0bd7 100644 --- a/libretro-common/file/retro_dirent.c +++ b/libretro-common/file/retro_dirent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_dirent.c). diff --git a/libretro-common/file/retro_stat.c b/libretro-common/file/retro_stat.c index d865f68e82..f792613f0d 100644 --- a/libretro-common/file/retro_stat.c +++ b/libretro-common/file/retro_stat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_stat.c). diff --git a/libretro-common/formats/bmp/rbmp.c b/libretro-common/formats/bmp/rbmp.c index cecb5462c7..f667e68c4f 100644 --- a/libretro-common/formats/bmp/rbmp.c +++ b/libretro-common/formats/bmp/rbmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rbmp.c). diff --git a/libretro-common/formats/bmp/rbmp_encode.c b/libretro-common/formats/bmp/rbmp_encode.c index 0bf59f1018..014deb7c8c 100644 --- a/libretro-common/formats/bmp/rbmp_encode.c +++ b/libretro-common/formats/bmp/rbmp_encode.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rbmp_encode.c). diff --git a/libretro-common/formats/image_texture.c b/libretro-common/formats/image_texture.c index 46f6143698..0f24004010 100644 --- a/libretro-common/formats/image_texture.c +++ b/libretro-common/formats/image_texture.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (image_texture.c). diff --git a/libretro-common/formats/image_transfer.c b/libretro-common/formats/image_transfer.c index afd3a99fd2..1bb80b122f 100644 --- a/libretro-common/formats/image_transfer.c +++ b/libretro-common/formats/image_transfer.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (image_transfer.c). diff --git a/libretro-common/formats/jpeg/rjpeg.c b/libretro-common/formats/jpeg/rjpeg.c index fb44b49318..827f0bf691 100644 --- a/libretro-common/formats/jpeg/rjpeg.c +++ b/libretro-common/formats/jpeg/rjpeg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rjpeg.c). diff --git a/libretro-common/formats/json/jsonsax.c b/libretro-common/formats/json/jsonsax.c index 0c184cf249..1a7ac93555 100644 --- a/libretro-common/formats/json/jsonsax.c +++ b/libretro-common/formats/json/jsonsax.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (jsonsax.c). diff --git a/libretro-common/formats/png/rpng.c b/libretro-common/formats/png/rpng.c index 2ad8c9017d..ab3472485e 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rpng.c). diff --git a/libretro-common/formats/png/rpng_encode.c b/libretro-common/formats/png/rpng_encode.c index f580ed2646..1f91f4cd80 100644 --- a/libretro-common/formats/png/rpng_encode.c +++ b/libretro-common/formats/png/rpng_encode.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rpng_encode.c). diff --git a/libretro-common/formats/png/rpng_internal.h b/libretro-common/formats/png/rpng_internal.h index fa7ebf57dc..440bd3d587 100644 --- a/libretro-common/formats/png/rpng_internal.h +++ b/libretro-common/formats/png/rpng_internal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rpng_internal.h). diff --git a/libretro-common/formats/tga/rtga.c b/libretro-common/formats/tga/rtga.c index 297c21ac41..200b85c651 100644 --- a/libretro-common/formats/tga/rtga.c +++ b/libretro-common/formats/tga/rtga.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rtga.c). diff --git a/libretro-common/formats/wav/rwav.c b/libretro-common/formats/wav/rwav.c index 9ca9fb2c6b..80bb31ad4b 100644 --- a/libretro-common/formats/wav/rwav.c +++ b/libretro-common/formats/wav/rwav.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rwav.c). diff --git a/libretro-common/formats/xml/rxml.c b/libretro-common/formats/xml/rxml.c index 7b933acf7f..1150e8e1b9 100644 --- a/libretro-common/formats/xml/rxml.c +++ b/libretro-common/formats/xml/rxml.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rxml.c). diff --git a/libretro-common/formats/xml/test/rxml_test.c b/libretro-common/formats/xml/test/rxml_test.c index 2c0d26541f..8fac40ce55 100644 --- a/libretro-common/formats/xml/test/rxml_test.c +++ b/libretro-common/formats/xml/test/rxml_test.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rxml_test.c). diff --git a/libretro-common/gfx/gl_capabilities.c b/libretro-common/gfx/gl_capabilities.c index b964a8c546..570d164a29 100644 --- a/libretro-common/gfx/gl_capabilities.c +++ b/libretro-common/gfx/gl_capabilities.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (gl_capabilities.c). diff --git a/libretro-common/gfx/math/matrix_3x3.c b/libretro-common/gfx/math/matrix_3x3.c index a4bb723034..a13b260ba9 100644 --- a/libretro-common/gfx/math/matrix_3x3.c +++ b/libretro-common/gfx/math/matrix_3x3.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (matrix_3x3.c). diff --git a/libretro-common/gfx/math/matrix_4x4.c b/libretro-common/gfx/math/matrix_4x4.c index 7cf1122727..c399f75d0f 100644 --- a/libretro-common/gfx/math/matrix_4x4.c +++ b/libretro-common/gfx/math/matrix_4x4.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (matrix_4x4.c). diff --git a/libretro-common/gfx/math/vector_2.c b/libretro-common/gfx/math/vector_2.c index b7745e456e..5c5f7c1883 100644 --- a/libretro-common/gfx/math/vector_2.c +++ b/libretro-common/gfx/math/vector_2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vector_2.c). diff --git a/libretro-common/gfx/math/vector_3.c b/libretro-common/gfx/math/vector_3.c index 4f76dde269..b30a3c3512 100644 --- a/libretro-common/gfx/math/vector_3.c +++ b/libretro-common/gfx/math/vector_3.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vector_3.c). diff --git a/libretro-common/gfx/math/vector_4.c b/libretro-common/gfx/math/vector_4.c index 0c2d4d5fcf..0ae98ad0f1 100644 --- a/libretro-common/gfx/math/vector_4.c +++ b/libretro-common/gfx/math/vector_4.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vector_4.c). diff --git a/libretro-common/gfx/scaler/pixconv.c b/libretro-common/gfx/scaler/pixconv.c index 78ff6afa0d..09cf34cefb 100644 --- a/libretro-common/gfx/scaler/pixconv.c +++ b/libretro-common/gfx/scaler/pixconv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (pixconv.c). diff --git a/libretro-common/gfx/scaler/scaler.c b/libretro-common/gfx/scaler/scaler.c index 5e41ac7ddb..7e8921abdc 100644 --- a/libretro-common/gfx/scaler/scaler.c +++ b/libretro-common/gfx/scaler/scaler.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (scaler.c). diff --git a/libretro-common/gfx/scaler/scaler_filter.c b/libretro-common/gfx/scaler/scaler_filter.c index a4996977b5..e06ca64d79 100644 --- a/libretro-common/gfx/scaler/scaler_filter.c +++ b/libretro-common/gfx/scaler/scaler_filter.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (scaler_filter.c). diff --git a/libretro-common/gfx/scaler/scaler_int.c b/libretro-common/gfx/scaler/scaler_int.c index c82ad3a6b4..2b189c6dd1 100644 --- a/libretro-common/gfx/scaler/scaler_int.c +++ b/libretro-common/gfx/scaler/scaler_int.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (scaler_int.c). diff --git a/libretro-common/glsm/glsm.c b/libretro-common/glsm/glsm.c index e5c36b1375..8fc8e13ed0 100644 --- a/libretro-common/glsm/glsm.c +++ b/libretro-common/glsm/glsm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsm). diff --git a/libretro-common/glsym/glsym_gl.c b/libretro-common/glsym/glsym_gl.c index f72e976486..5aa92fdca2 100644 --- a/libretro-common/glsym/glsym_gl.c +++ b/libretro-common/glsym/glsym_gl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsym). diff --git a/libretro-common/glsym/rglgen.c b/libretro-common/glsym/rglgen.c index 29403c9d00..0ea1fdc99c 100644 --- a/libretro-common/glsym/rglgen.c +++ b/libretro-common/glsym/rglgen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsym). diff --git a/libretro-common/hash/rhash.c b/libretro-common/hash/rhash.c index 1c22efeef9..4282670f80 100644 --- a/libretro-common/hash/rhash.c +++ b/libretro-common/hash/rhash.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rhash.c). diff --git a/libretro-common/include/algorithms/mismatch.h b/libretro-common/include/algorithms/mismatch.h index 1c87bf5bea..bfcde4af19 100644 --- a/libretro-common/include/algorithms/mismatch.h +++ b/libretro-common/include/algorithms/mismatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (mismatch.h). diff --git a/libretro-common/include/audio/audio_resampler.h b/libretro-common/include/audio/audio_resampler.h index abdf6eb1a3..4704eeff9d 100644 --- a/libretro-common/include/audio/audio_resampler.h +++ b/libretro-common/include/audio/audio_resampler.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (audio_resampler.h). diff --git a/libretro-common/include/audio/conversion/float_to_s16.h b/libretro-common/include/audio/conversion/float_to_s16.h index 0867233fcf..381db8e376 100644 --- a/libretro-common/include/audio/conversion/float_to_s16.h +++ b/libretro-common/include/audio/conversion/float_to_s16.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (float_to_s16.h). diff --git a/libretro-common/include/audio/conversion/s16_to_float.h b/libretro-common/include/audio/conversion/s16_to_float.h index 46620e518a..6407a63d29 100644 --- a/libretro-common/include/audio/conversion/s16_to_float.h +++ b/libretro-common/include/audio/conversion/s16_to_float.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (s16_to_float.h). diff --git a/libretro-common/include/audio/dsp_filter.h b/libretro-common/include/audio/dsp_filter.h index 7740c3e141..2055235f6f 100644 --- a/libretro-common/include/audio/dsp_filter.h +++ b/libretro-common/include/audio/dsp_filter.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (dsp_filter.h). diff --git a/libretro-common/include/boolean.h b/libretro-common/include/boolean.h index 4d53907ed3..2c18ef76f6 100644 --- a/libretro-common/include/boolean.h +++ b/libretro-common/include/boolean.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (boolean.h). diff --git a/libretro-common/include/clamping.h b/libretro-common/include/clamping.h index c8ec43ba09..7919332b95 100644 --- a/libretro-common/include/clamping.h +++ b/libretro-common/include/clamping.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (clamping.h). diff --git a/libretro-common/include/compat/apple_compat.h b/libretro-common/include/compat/apple_compat.h index 423dc30952..f656546302 100644 --- a/libretro-common/include/compat/apple_compat.h +++ b/libretro-common/include/compat/apple_compat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (apple_compat.h). diff --git a/libretro-common/include/compat/fnmatch.h b/libretro-common/include/compat/fnmatch.h index ac36b43ca2..3f3c0254bc 100644 --- a/libretro-common/include/compat/fnmatch.h +++ b/libretro-common/include/compat/fnmatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (fnmatch.h). diff --git a/libretro-common/include/compat/getopt.h b/libretro-common/include/compat/getopt.h index 22e3d937f5..fd5300aa38 100644 --- a/libretro-common/include/compat/getopt.h +++ b/libretro-common/include/compat/getopt.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (getopt.h). diff --git a/libretro-common/include/compat/intrinsics.h b/libretro-common/include/compat/intrinsics.h index 128f9f6d38..d4aa3c1d30 100644 --- a/libretro-common/include/compat/intrinsics.h +++ b/libretro-common/include/compat/intrinsics.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (intrinsics.h). diff --git a/libretro-common/include/compat/msvc.h b/libretro-common/include/compat/msvc.h index e767bef7f8..76bc2e468f 100644 --- a/libretro-common/include/compat/msvc.h +++ b/libretro-common/include/compat/msvc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (msvc.h). diff --git a/libretro-common/include/compat/posix_string.h b/libretro-common/include/compat/posix_string.h index 2731231e2a..380e1a121f 100644 --- a/libretro-common/include/compat/posix_string.h +++ b/libretro-common/include/compat/posix_string.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (posix_string.h). diff --git a/libretro-common/include/compat/strcasestr.h b/libretro-common/include/compat/strcasestr.h index 253ea39320..a8676a5bd6 100644 --- a/libretro-common/include/compat/strcasestr.h +++ b/libretro-common/include/compat/strcasestr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (strcasestr.h). diff --git a/libretro-common/include/compat/strl.h b/libretro-common/include/compat/strl.h index 50d31aa64e..a68005ac2f 100644 --- a/libretro-common/include/compat/strl.h +++ b/libretro-common/include/compat/strl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (strl.h). diff --git a/libretro-common/include/dynamic/dylib.h b/libretro-common/include/dynamic/dylib.h index 7313e9a547..b8ee171cf3 100644 --- a/libretro-common/include/dynamic/dylib.h +++ b/libretro-common/include/dynamic/dylib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (dylib.h). diff --git a/libretro-common/include/encodings/crc32.h b/libretro-common/include/encodings/crc32.h index b7dc00f95d..1d670e7b80 100644 --- a/libretro-common/include/encodings/crc32.h +++ b/libretro-common/include/encodings/crc32.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (crc32.h). diff --git a/libretro-common/include/encodings/utf.h b/libretro-common/include/encodings/utf.h index aabe113e2c..0c65039429 100644 --- a/libretro-common/include/encodings/utf.h +++ b/libretro-common/include/encodings/utf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (utf.h). diff --git a/libretro-common/include/fastcpy.h b/libretro-common/include/fastcpy.h index b5dfce3c94..e1895122d0 100644 --- a/libretro-common/include/fastcpy.h +++ b/libretro-common/include/fastcpy.h @@ -1,4 +1,26 @@ -//in the future asm and new c++ features can be added to speed up copying +/* Copyright (C) 2010-2017 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (fastcpy.h). + * --------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* in the future ASM and new c++ features can be added to speed up copying */ #include #include #include diff --git a/libretro-common/include/features/features_cpu.h b/libretro-common/include/features/features_cpu.h index 8a0a046de7..fd8f5f62b6 100644 --- a/libretro-common/include/features/features_cpu.h +++ b/libretro-common/include/features/features_cpu.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (features_cpu.h). diff --git a/libretro-common/include/file/archive_file.h b/libretro-common/include/file/archive_file.h index 407bc3cfc7..e15448e6cd 100644 --- a/libretro-common/include/file/archive_file.h +++ b/libretro-common/include/file/archive_file.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (archive_file.h). diff --git a/libretro-common/include/file/config_file.h b/libretro-common/include/file/config_file.h index b13686cd95..3e26acf0b2 100644 --- a/libretro-common/include/file/config_file.h +++ b/libretro-common/include/file/config_file.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (config_file.h). diff --git a/libretro-common/include/file/config_file_userdata.h b/libretro-common/include/file/config_file_userdata.h index 19d2277192..cb1208da3d 100644 --- a/libretro-common/include/file/config_file_userdata.h +++ b/libretro-common/include/file/config_file_userdata.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (config_file_userdata.h). diff --git a/libretro-common/include/file/file_path.h b/libretro-common/include/file/file_path.h index 04fc695894..1a56242e77 100644 --- a/libretro-common/include/file/file_path.h +++ b/libretro-common/include/file/file_path.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_path.h). diff --git a/libretro-common/include/file/nbio.h b/libretro-common/include/file/nbio.h index 9a645386e8..59039190a6 100644 --- a/libretro-common/include/file/nbio.h +++ b/libretro-common/include/file/nbio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (nbio.h). diff --git a/libretro-common/include/filters.h b/libretro-common/include/filters.h index 6ca3a5e29d..b021aeddbf 100644 --- a/libretro-common/include/filters.h +++ b/libretro-common/include/filters.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (filters.h). diff --git a/libretro-common/include/formats/image.h b/libretro-common/include/formats/image.h index 9db2c6f899..bba886642d 100644 --- a/libretro-common/include/formats/image.h +++ b/libretro-common/include/formats/image.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (image.h). diff --git a/libretro-common/include/formats/jsonsax.h b/libretro-common/include/formats/jsonsax.h index 01d8a12276..4170b24ab5 100644 --- a/libretro-common/include/formats/jsonsax.h +++ b/libretro-common/include/formats/jsonsax.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (jsonsax.h). diff --git a/libretro-common/include/formats/rbmp.h b/libretro-common/include/formats/rbmp.h index bc0702758f..622d8c94d7 100644 --- a/libretro-common/include/formats/rbmp.h +++ b/libretro-common/include/formats/rbmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rbmp.h). diff --git a/libretro-common/include/formats/rjpeg.h b/libretro-common/include/formats/rjpeg.h index 27050ea418..a999516df0 100644 --- a/libretro-common/include/formats/rjpeg.h +++ b/libretro-common/include/formats/rjpeg.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rjpeg.h). diff --git a/libretro-common/include/formats/rpng.h b/libretro-common/include/formats/rpng.h index 08b1a693d7..b16a8307fa 100644 --- a/libretro-common/include/formats/rpng.h +++ b/libretro-common/include/formats/rpng.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rpng.h). diff --git a/libretro-common/include/formats/rtga.h b/libretro-common/include/formats/rtga.h index bb6d97a294..a66f4a0ab6 100644 --- a/libretro-common/include/formats/rtga.h +++ b/libretro-common/include/formats/rtga.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rtga.h). diff --git a/libretro-common/include/formats/rwav.h b/libretro-common/include/formats/rwav.h index 21f197f742..2000059b5d 100644 --- a/libretro-common/include/formats/rwav.h +++ b/libretro-common/include/formats/rwav.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rwav.h). diff --git a/libretro-common/include/formats/rxml.h b/libretro-common/include/formats/rxml.h index c3f3335c19..88d25bc138 100644 --- a/libretro-common/include/formats/rxml.h +++ b/libretro-common/include/formats/rxml.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rxml.h). diff --git a/libretro-common/include/gfx/gl_capabilities.h b/libretro-common/include/gfx/gl_capabilities.h index cf89c4a935..ded3b64522 100644 --- a/libretro-common/include/gfx/gl_capabilities.h +++ b/libretro-common/include/gfx/gl_capabilities.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (gl_capabilities.h). diff --git a/libretro-common/include/gfx/math/matrix_3x3.h b/libretro-common/include/gfx/math/matrix_3x3.h index 216b171930..597dd2c6c2 100644 --- a/libretro-common/include/gfx/math/matrix_3x3.h +++ b/libretro-common/include/gfx/math/matrix_3x3.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (matrix_3x3.h). diff --git a/libretro-common/include/gfx/math/matrix_4x4.h b/libretro-common/include/gfx/math/matrix_4x4.h index 7216ff3461..31f1338818 100644 --- a/libretro-common/include/gfx/math/matrix_4x4.h +++ b/libretro-common/include/gfx/math/matrix_4x4.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (matrix_4x4.h). diff --git a/libretro-common/include/gfx/math/vector_2.h b/libretro-common/include/gfx/math/vector_2.h index 8847700870..e5af8d68d8 100644 --- a/libretro-common/include/gfx/math/vector_2.h +++ b/libretro-common/include/gfx/math/vector_2.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vector_2.h). diff --git a/libretro-common/include/gfx/math/vector_3.h b/libretro-common/include/gfx/math/vector_3.h index 5e2d03b5a7..f9e67cc279 100644 --- a/libretro-common/include/gfx/math/vector_3.h +++ b/libretro-common/include/gfx/math/vector_3.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vector_3.h). diff --git a/libretro-common/include/gfx/math/vector_4.h b/libretro-common/include/gfx/math/vector_4.h index 494d8dcebd..3eae577168 100644 --- a/libretro-common/include/gfx/math/vector_4.h +++ b/libretro-common/include/gfx/math/vector_4.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (vector_4.h). diff --git a/libretro-common/include/gfx/scaler/filter.h b/libretro-common/include/gfx/scaler/filter.h index 11aa020201..ba5ae93907 100644 --- a/libretro-common/include/gfx/scaler/filter.h +++ b/libretro-common/include/gfx/scaler/filter.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (filter.h). diff --git a/libretro-common/include/gfx/scaler/pixconv.h b/libretro-common/include/gfx/scaler/pixconv.h index 46a72f5887..f9f74d9324 100644 --- a/libretro-common/include/gfx/scaler/pixconv.h +++ b/libretro-common/include/gfx/scaler/pixconv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (pixconv.h). diff --git a/libretro-common/include/gfx/scaler/scaler.h b/libretro-common/include/gfx/scaler/scaler.h index 64a52e4479..1c1c2b467d 100644 --- a/libretro-common/include/gfx/scaler/scaler.h +++ b/libretro-common/include/gfx/scaler/scaler.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (scaler.h). diff --git a/libretro-common/include/gfx/scaler/scaler_int.h b/libretro-common/include/gfx/scaler/scaler_int.h index eb6b01c8ab..a5ed7dd084 100644 --- a/libretro-common/include/gfx/scaler/scaler_int.h +++ b/libretro-common/include/gfx/scaler/scaler_int.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (scaler_int.h). diff --git a/libretro-common/include/gfx/video_frame.h b/libretro-common/include/gfx/video_frame.h index ddae40547c..70f275940d 100644 --- a/libretro-common/include/gfx/video_frame.h +++ b/libretro-common/include/gfx/video_frame.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (video_frame.h). diff --git a/libretro-common/include/glsm/glsm.h b/libretro-common/include/glsm/glsm.h index 285ffe4b10..8e30acdc04 100644 --- a/libretro-common/include/glsm/glsm.h +++ b/libretro-common/include/glsm/glsm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsm.h). diff --git a/libretro-common/include/glsm/glsmsym.h b/libretro-common/include/glsm/glsmsym.h index bfb7dd9db2..7b12246a88 100644 --- a/libretro-common/include/glsm/glsmsym.h +++ b/libretro-common/include/glsm/glsmsym.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsmsym.h). diff --git a/libretro-common/include/glsym/glsym.h b/libretro-common/include/glsym/glsym.h index 4dd7bfd0a2..c1c13e2a56 100644 --- a/libretro-common/include/glsym/glsym.h +++ b/libretro-common/include/glsym/glsym.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsym). diff --git a/libretro-common/include/glsym/glsym_gl.h b/libretro-common/include/glsym/glsym_gl.h index a3150f08d5..9720c2e1cf 100644 --- a/libretro-common/include/glsym/glsym_gl.h +++ b/libretro-common/include/glsym/glsym_gl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsym). diff --git a/libretro-common/include/glsym/rglgen.h b/libretro-common/include/glsym/rglgen.h index bf127f8570..54dcb62a84 100644 --- a/libretro-common/include/glsym/rglgen.h +++ b/libretro-common/include/glsym/rglgen.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsym). diff --git a/libretro-common/include/glsym/rglgen_headers.h b/libretro-common/include/glsym/rglgen_headers.h index 479d77c61e..06d8530b27 100644 --- a/libretro-common/include/glsym/rglgen_headers.h +++ b/libretro-common/include/glsym/rglgen_headers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro SDK code part (glsym). diff --git a/libretro-common/include/libco.h b/libretro-common/include/libco.h index 9925d7e378..1599cb2ca0 100644 --- a/libretro-common/include/libco.h +++ b/libretro-common/include/libco.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (libco.h). diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h index 020752d702..89947ebe44 100644 --- a/libretro-common/include/libretro.h +++ b/libretro-common/include/libretro.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro API header (libretro.h). diff --git a/libretro-common/include/libretro_dspfilter.h b/libretro-common/include/libretro_dspfilter.h index 4433339488..1b9929c573 100644 --- a/libretro-common/include/libretro_dspfilter.h +++ b/libretro-common/include/libretro_dspfilter.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro API header (libretro_dspfilter.h). diff --git a/libretro-common/include/libretro_vulkan.h b/libretro-common/include/libretro_vulkan.h index 7fb36ec106..f683a0f0b1 100644 --- a/libretro-common/include/libretro_vulkan.h +++ b/libretro-common/include/libretro_vulkan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------------- * The following license statement only applies to this libretro API header (libretro_vulkan.h) diff --git a/libretro-common/include/lists/dir_list.h b/libretro-common/include/lists/dir_list.h index a4d0d263ff..027078238f 100644 --- a/libretro-common/include/lists/dir_list.h +++ b/libretro-common/include/lists/dir_list.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (dir_list.h). diff --git a/libretro-common/include/lists/file_list.h b/libretro-common/include/lists/file_list.h index ad616f0e01..95b0eb5d2c 100644 --- a/libretro-common/include/lists/file_list.h +++ b/libretro-common/include/lists/file_list.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_list.h). diff --git a/libretro-common/include/lists/string_list.h b/libretro-common/include/lists/string_list.h index 386ceab9ad..c15cd0eca7 100644 --- a/libretro-common/include/lists/string_list.h +++ b/libretro-common/include/lists/string_list.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (string_list.h). diff --git a/libretro-common/include/math/complex.h b/libretro-common/include/math/complex.h index 39a5df415a..79173932d1 100644 --- a/libretro-common/include/math/complex.h +++ b/libretro-common/include/math/complex.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (complex.h). diff --git a/libretro-common/include/math/float_minmax.h b/libretro-common/include/math/float_minmax.h index ea7ceda474..d917ef8ef6 100644 --- a/libretro-common/include/math/float_minmax.h +++ b/libretro-common/include/math/float_minmax.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (float_minmax.h). diff --git a/libretro-common/include/math/fxp.h b/libretro-common/include/math/fxp.h index f6717754fc..56b036cd72 100644 --- a/libretro-common/include/math/fxp.h +++ b/libretro-common/include/math/fxp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (fxp.h). diff --git a/libretro-common/include/memalign.h b/libretro-common/include/memalign.h index 6d217437eb..ca809f80c3 100644 --- a/libretro-common/include/memalign.h +++ b/libretro-common/include/memalign.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (memalign.h). diff --git a/libretro-common/include/memmap.h b/libretro-common/include/memmap.h index bc7d9fbef5..5dc1a89330 100644 --- a/libretro-common/include/memmap.h +++ b/libretro-common/include/memmap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (memmap.h). diff --git a/libretro-common/include/net/net_compat.h b/libretro-common/include/net/net_compat.h index 32d73aa241..71f3109a5b 100644 --- a/libretro-common/include/net/net_compat.h +++ b/libretro-common/include/net/net_compat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_compat.h). diff --git a/libretro-common/include/net/net_http.h b/libretro-common/include/net/net_http.h index bac244e94b..1ec56bbc3c 100644 --- a/libretro-common/include/net/net_http.h +++ b/libretro-common/include/net/net_http.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_http.h). diff --git a/libretro-common/include/net/net_http_parse.h b/libretro-common/include/net/net_http_parse.h index a9c65d4d5b..4fc4845cd0 100644 --- a/libretro-common/include/net/net_http_parse.h +++ b/libretro-common/include/net/net_http_parse.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_http.h). diff --git a/libretro-common/include/net/net_ifinfo.h b/libretro-common/include/net/net_ifinfo.h index 982226f895..00158f6833 100644 --- a/libretro-common/include/net/net_ifinfo.h +++ b/libretro-common/include/net/net_ifinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_ifinfo.h). diff --git a/libretro-common/include/net/net_natt.h b/libretro-common/include/net/net_natt.h index 9ef0eb8fba..d3b2c43560 100644 --- a/libretro-common/include/net/net_natt.h +++ b/libretro-common/include/net/net_natt.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_natt.h). diff --git a/libretro-common/include/net/net_socket.h b/libretro-common/include/net/net_socket.h index 3196e128c9..58ad050d74 100644 --- a/libretro-common/include/net/net_socket.h +++ b/libretro-common/include/net/net_socket.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_socket.h). diff --git a/libretro-common/include/queues/fifo_queue.h b/libretro-common/include/queues/fifo_queue.h index bbb5c0bbef..1b0aab541b 100644 --- a/libretro-common/include/queues/fifo_queue.h +++ b/libretro-common/include/queues/fifo_queue.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (fifo_queue.h). diff --git a/libretro-common/include/queues/message_queue.h b/libretro-common/include/queues/message_queue.h index 6dadb8961e..2339e93578 100644 --- a/libretro-common/include/queues/message_queue.h +++ b/libretro-common/include/queues/message_queue.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (message_queue.h). diff --git a/libretro-common/include/queues/task_queue.h b/libretro-common/include/queues/task_queue.h index 36369e9fcf..332af4760d 100644 --- a/libretro-common/include/queues/task_queue.h +++ b/libretro-common/include/queues/task_queue.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (task_queue.h). diff --git a/libretro-common/include/retro_assert.h b/libretro-common/include/retro_assert.h index 5870c3e97b..3ef0300ec6 100644 --- a/libretro-common/include/retro_assert.h +++ b/libretro-common/include/retro_assert.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_assert.h). diff --git a/libretro-common/include/retro_common.h b/libretro-common/include/retro_common.h index 6e9e6bf432..33857234ee 100644 --- a/libretro-common/include/retro_common.h +++ b/libretro-common/include/retro_common.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_common.h). diff --git a/libretro-common/include/retro_common_api.h b/libretro-common/include/retro_common_api.h index 2bded88555..c32501967e 100644 --- a/libretro-common/include/retro_common_api.h +++ b/libretro-common/include/retro_common_api.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_common_api.h). diff --git a/libretro-common/include/retro_dirent.h b/libretro-common/include/retro_dirent.h index 6270287a00..ab02998af3 100644 --- a/libretro-common/include/retro_dirent.h +++ b/libretro-common/include/retro_dirent.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_dirent.h). diff --git a/libretro-common/include/retro_endianness.h b/libretro-common/include/retro_endianness.h index 74f29821cd..ee9dba1b87 100644 --- a/libretro-common/include/retro_endianness.h +++ b/libretro-common/include/retro_endianness.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_endianness.h). diff --git a/libretro-common/include/retro_environment.h b/libretro-common/include/retro_environment.h index fa08ddc5e7..12ee429de8 100644 --- a/libretro-common/include/retro_environment.h +++ b/libretro-common/include/retro_environment.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_environment.h). diff --git a/libretro-common/include/retro_inline.h b/libretro-common/include/retro_inline.h index bdc763ca93..ffdaa4a3ab 100644 --- a/libretro-common/include/retro_inline.h +++ b/libretro-common/include/retro_inline.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_inline.h). diff --git a/libretro-common/include/retro_miscellaneous.h b/libretro-common/include/retro_miscellaneous.h index eb1d665333..52421063f3 100644 --- a/libretro-common/include/retro_miscellaneous.h +++ b/libretro-common/include/retro_miscellaneous.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_miscellaneous.h). diff --git a/libretro-common/include/retro_stat.h b/libretro-common/include/retro_stat.h index a6d53abfb7..b5b24a47c1 100644 --- a/libretro-common/include/retro_stat.h +++ b/libretro-common/include/retro_stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (retro_stat.h). diff --git a/libretro-common/include/rhash.h b/libretro-common/include/rhash.h index a962a22106..7cca800c94 100644 --- a/libretro-common/include/rhash.h +++ b/libretro-common/include/rhash.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rhash.h). diff --git a/libretro-common/include/rthreads/rsemaphore.h b/libretro-common/include/rthreads/rsemaphore.h index 8df8187833..a2e964fb67 100644 --- a/libretro-common/include/rthreads/rsemaphore.h +++ b/libretro-common/include/rthreads/rsemaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rsemaphore.h). diff --git a/libretro-common/include/rthreads/rthreads.h b/libretro-common/include/rthreads/rthreads.h index 9af41fd301..6a33f9e3e5 100644 --- a/libretro-common/include/rthreads/rthreads.h +++ b/libretro-common/include/rthreads/rthreads.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rthreads.h). diff --git a/libretro-common/include/streams/file_stream.h b/libretro-common/include/streams/file_stream.h index 3e896e2f1a..d13290d4d3 100644 --- a/libretro-common/include/streams/file_stream.h +++ b/libretro-common/include/streams/file_stream.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_stream.h). diff --git a/libretro-common/include/streams/interface_stream.h b/libretro-common/include/streams/interface_stream.h index e58fddd590..57fa4a495a 100644 --- a/libretro-common/include/streams/interface_stream.h +++ b/libretro-common/include/streams/interface_stream.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (interface_stream.h). diff --git a/libretro-common/include/streams/memory_stream.h b/libretro-common/include/streams/memory_stream.h index 5f196ea62b..9a2aa819fd 100644 --- a/libretro-common/include/streams/memory_stream.h +++ b/libretro-common/include/streams/memory_stream.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (memory_stream.h). diff --git a/libretro-common/include/streams/trans_stream.h b/libretro-common/include/streams/trans_stream.h index 6cb7420f19..45cd522bd6 100644 --- a/libretro-common/include/streams/trans_stream.h +++ b/libretro-common/include/streams/trans_stream.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (trans_stream.h). diff --git a/libretro-common/include/string/stdstring.h b/libretro-common/include/string/stdstring.h index 78e860bd72..7dbb543d2d 100644 --- a/libretro-common/include/string/stdstring.h +++ b/libretro-common/include/string/stdstring.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (stdstring.h). diff --git a/libretro-common/lists/dir_list.c b/libretro-common/lists/dir_list.c index e27e5d4c54..a2efd966d0 100644 --- a/libretro-common/lists/dir_list.c +++ b/libretro-common/lists/dir_list.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (dir_list.c). diff --git a/libretro-common/lists/file_list.c b/libretro-common/lists/file_list.c index a0bace3657..4de1f999e0 100644 --- a/libretro-common/lists/file_list.c +++ b/libretro-common/lists/file_list.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_list.c). diff --git a/libretro-common/lists/string_list.c b/libretro-common/lists/string_list.c index 93368c4201..bbf64f5649 100644 --- a/libretro-common/lists/string_list.c +++ b/libretro-common/lists/string_list.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (string_list.c). diff --git a/libretro-common/memmap/memalign.c b/libretro-common/memmap/memalign.c index a89a87830d..56d0c94669 100644 --- a/libretro-common/memmap/memalign.c +++ b/libretro-common/memmap/memalign.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (memalign.c). diff --git a/libretro-common/memmap/memmap.c b/libretro-common/memmap/memmap.c index c2d1a174af..a2b56d7070 100644 --- a/libretro-common/memmap/memmap.c +++ b/libretro-common/memmap/memmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2015 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (memmap.c). diff --git a/libretro-common/net/net_compat.c b/libretro-common/net/net_compat.c index 0976068f0b..68c0f62f96 100644 --- a/libretro-common/net/net_compat.c +++ b/libretro-common/net/net_compat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_compat.c). diff --git a/libretro-common/net/net_http.c b/libretro-common/net/net_http.c index 51ce3ce541..90a087d74a 100644 --- a/libretro-common/net/net_http.c +++ b/libretro-common/net/net_http.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_http.c). diff --git a/libretro-common/net/net_http_parse.c b/libretro-common/net/net_http_parse.c index 66ac7d927b..1c3131b9e8 100644 --- a/libretro-common/net/net_http_parse.c +++ b/libretro-common/net/net_http_parse.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_http_parse.c). diff --git a/libretro-common/net/net_ifinfo.c b/libretro-common/net/net_ifinfo.c index 8cec6432bf..41bf90a3e4 100644 --- a/libretro-common/net/net_ifinfo.c +++ b/libretro-common/net/net_ifinfo.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_ifinfo.c). diff --git a/libretro-common/net/net_natt.c b/libretro-common/net/net_natt.c index dc21275e7a..01e6cc94f7 100644 --- a/libretro-common/net/net_natt.c +++ b/libretro-common/net/net_natt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 The RetroArch team +/* Copyright (C) 2016-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_natt.c). diff --git a/libretro-common/net/net_socket.c b/libretro-common/net/net_socket.c index 73c697335a..796dda4188 100644 --- a/libretro-common/net/net_socket.c +++ b/libretro-common/net/net_socket.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_socket.c). diff --git a/libretro-common/queues/fifo_queue.c b/libretro-common/queues/fifo_queue.c index e763cb69cf..df132af09b 100644 --- a/libretro-common/queues/fifo_queue.c +++ b/libretro-common/queues/fifo_queue.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (fifo_queue.c). diff --git a/libretro-common/queues/message_queue.c b/libretro-common/queues/message_queue.c index 9ea7e4ce11..5c5c9cf72a 100644 --- a/libretro-common/queues/message_queue.c +++ b/libretro-common/queues/message_queue.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (message_queue.c). diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index 9e28c2588d..3ff959ce78 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (task_queue.c). diff --git a/libretro-common/rthreads/gx_pthread.h b/libretro-common/rthreads/gx_pthread.h index b8f9d86944..8cb4616231 100644 --- a/libretro-common/rthreads/gx_pthread.h +++ b/libretro-common/rthreads/gx_pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (gx_pthread.h). diff --git a/libretro-common/rthreads/psp_pthread.h b/libretro-common/rthreads/psp_pthread.h index 32b3d4d005..007aa5cb11 100644 --- a/libretro-common/rthreads/psp_pthread.h +++ b/libretro-common/rthreads/psp_pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (psp_pthread.h). diff --git a/libretro-common/rthreads/rsemaphore.c b/libretro-common/rthreads/rsemaphore.c index 9627769a5b..8050e40f15 100644 --- a/libretro-common/rthreads/rsemaphore.c +++ b/libretro-common/rthreads/rsemaphore.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rsemaphore.c). diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c index 1043199135..95e32a2c5e 100644 --- a/libretro-common/rthreads/rthreads.c +++ b/libretro-common/rthreads/rthreads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rthreads.c). diff --git a/libretro-common/rthreads/xenon_sdl_threads.c b/libretro-common/rthreads/xenon_sdl_threads.c index a99af1fb0a..0097673528 100644 --- a/libretro-common/rthreads/xenon_sdl_threads.c +++ b/libretro-common/rthreads/xenon_sdl_threads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (xenon_sdl_threads.c). @@ -20,7 +20,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -// libSDLxenon doesn't implement this yet :[. Implement it very stupidly for now. ;) +/* libSDLxenon doesn't implement this yet :[. Implement it very stupidly for now. ;) */ #include "SDL_thread.h" #include "SDL_mutex.h" diff --git a/libretro-common/samples/formats/png/rpng_test.c b/libretro-common/samples/formats/png/rpng_test.c index 7da75d108b..148544b8ae 100644 --- a/libretro-common/samples/formats/png/rpng_test.c +++ b/libretro-common/samples/formats/png/rpng_test.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (rpng_test.c). diff --git a/libretro-common/samples/net/net_http_test.c b/libretro-common/samples/net/net_http_test.c index e6940a5373..92d1cdec0d 100644 --- a/libretro-common/samples/net/net_http_test.c +++ b/libretro-common/samples/net/net_http_test.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_http_test.c). diff --git a/libretro-common/samples/net/net_ifinfo_test.c b/libretro-common/samples/net/net_ifinfo_test.c index 1b825b3093..63da41472f 100644 --- a/libretro-common/samples/net/net_ifinfo_test.c +++ b/libretro-common/samples/net/net_ifinfo_test.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (net_ifinfo_test.c). diff --git a/libretro-common/streams/file_stream.c b/libretro-common/streams/file_stream.c index b3ad1dcac9..da871d5eaa 100644 --- a/libretro-common/streams/file_stream.c +++ b/libretro-common/streams/file_stream.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (file_stream.c). diff --git a/libretro-common/streams/interface_stream.c b/libretro-common/streams/interface_stream.c index a1f4b159e0..61708b1dc0 100644 --- a/libretro-common/streams/interface_stream.c +++ b/libretro-common/streams/interface_stream.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (interface_stream.c). diff --git a/libretro-common/streams/memory_stream.c b/libretro-common/streams/memory_stream.c index 6bffa3b726..81c666fa3f 100644 --- a/libretro-common/streams/memory_stream.c +++ b/libretro-common/streams/memory_stream.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (memory_stream.c). diff --git a/libretro-common/streams/trans_stream.c b/libretro-common/streams/trans_stream.c index d6acfa5e00..10eea457a7 100644 --- a/libretro-common/streams/trans_stream.c +++ b/libretro-common/streams/trans_stream.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (trans_stream.c). diff --git a/libretro-common/streams/trans_stream_pipe.c b/libretro-common/streams/trans_stream_pipe.c index 34ac61e4c8..f30d5df390 100644 --- a/libretro-common/streams/trans_stream_pipe.c +++ b/libretro-common/streams/trans_stream_pipe.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (trans_stream_pipe.c). diff --git a/libretro-common/streams/trans_stream_zlib.c b/libretro-common/streams/trans_stream_zlib.c index dfa9cacba3..ba2d995a69 100644 --- a/libretro-common/streams/trans_stream_zlib.c +++ b/libretro-common/streams/trans_stream_zlib.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (trans_stream_zlib.c). diff --git a/libretro-common/string/stdstring.c b/libretro-common/string/stdstring.c index e23e7fc38a..7cd05e8b14 100644 --- a/libretro-common/string/stdstring.c +++ b/libretro-common/string/stdstring.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2016 The RetroArch team +/* Copyright (C) 2010-2017 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this file (stdstring.c). From c91a4fa12ee498707a3df023461e906ecc5974d8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 14:23:46 +0100 Subject: [PATCH 334/427] Cleanup --- libretro-common/include/fastcpy.h | 42 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/libretro-common/include/fastcpy.h b/libretro-common/include/fastcpy.h index e1895122d0..13b94d97bd 100644 --- a/libretro-common/include/fastcpy.h +++ b/libretro-common/include/fastcpy.h @@ -25,64 +25,70 @@ #include #include -static INLINE void* memcpy16(void* dst,void* src,size_t size){ +static INLINE void* memcpy16(void* dst,void* src,size_t size) +{ return memcpy(dst,src,size * 2); } -static INLINE void* memcpy32(void* dst,void* src,size_t size){ +static INLINE void* memcpy32(void* dst,void* src,size_t size) +{ return memcpy(dst,src,size * 4); } -static INLINE void* memcpy64(void* dst,void* src,size_t size){ +static INLINE void* memcpy64(void* dst,void* src,size_t size) +{ return memcpy(dst,src,size * 8); } #ifdef USECPPSTDFILL #include -static INLINE void* memset16(void* dst,uint16_t val,size_t size){ +static INLINE void* memset16(void* dst,uint16_t val,size_t size) +{ uint16_t* typedptr = (uint16_t*)dst; std::fill(typedptr, typedptr + size, val); return dst; } -static INLINE void* memset32(void* dst,uint32_t val,size_t size){ +static INLINE void* memset32(void* dst,uint32_t val,size_t size) +{ uint32_t* typedptr = (uint32_t*)dst; std::fill(typedptr, typedptr + size, val); return dst; } -static INLINE void* memset64(void* dst,uint64_t val,size_t size){ +static INLINE void* memset64(void* dst,uint64_t val,size_t size) +{ uint64_t* typedptr = (uint64_t*)dst; std::fill(typedptr, typedptr + size, val); return dst; } #else -static INLINE void* memset16(void* dst,uint16_t val,size_t size){ +static INLINE void* memset16(void* dst,uint16_t val,size_t size) +{ + size_t i; uint16_t* typedptr = (uint16_t*)dst; - size_t i; - for(i = 0;i < size;i++){ + for(i = 0;i < size;i++) typedptr[i] = val; - } return dst; } -static INLINE void* memset32(void* dst,uint32_t val,size_t size){ +static INLINE void* memset32(void* dst,uint32_t val,size_t size) +{ + size_t i; uint32_t* typedptr = (uint32_t*)dst; - size_t i; - for(i = 0;i < size;i++){ + for(i = 0;i < size;i++) typedptr[i] = val; - } return dst; } -static INLINE void* memset64(void* dst,uint64_t val,size_t size){ - uint64_t* typedptr = (uint64_t*)dst; +static INLINE void* memset64(void* dst,uint64_t val,size_t size) +{ size_t i; - for(i = 0;i < size;i++){ + uint64_t* typedptr = (uint64_t*)dst; + for(i = 0;i < size;i++) typedptr[i] = val; - } return dst; } #endif From a1594615f09841791697f4882bc65e7b8aabe503 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 16:22:20 +0100 Subject: [PATCH 335/427] Create runloop_get_status --- gfx/video_driver.c | 12 +++++++++--- runloop.c | 7 +++++++ runloop.h | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index e3747d9b68..46b3b6922c 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2249,6 +2249,9 @@ bool video_driver_texture_unload(uintptr_t *id) void video_driver_build_info(video_frame_info_t *video_info) { + bool is_paused = false; + bool is_idle = false; + bool is_slowmotion = false; settings_t *settings = NULL; video_driver_threaded_lock(); settings = config_get_ptr(); @@ -2311,9 +2314,12 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->xmb_alpha_factor = 0.0f; video_info->menu_wallpaper_opacity = 0.0f; #endif - video_info->runloop_is_paused = runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL); - video_info->runloop_is_idle = runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL); - video_info->runloop_is_slowmotion = runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL); + + runloop_get_status(&is_paused, &is_idle, &is_slowmotion); + + video_info->runloop_is_paused = is_paused; + video_info->runloop_is_idle = is_idle; + video_info->runloop_is_slowmotion = is_slowmotion; video_driver_threaded_unlock(); } diff --git a/runloop.c b/runloop.c index 0ea85b80b0..20fa7128cc 100644 --- a/runloop.c +++ b/runloop.c @@ -204,6 +204,13 @@ static bool rarch_game_specific_options(char **output) return true; } +void runloop_get_status(bool *is_paused, bool *is_idle, + bool *is_slowmotion) +{ + *is_paused = runloop_paused; + *is_idle = runloop_idle; + *is_slowmotion = runloop_slowmotion; +} bool runloop_ctl(enum runloop_ctl_state state, void *data) { diff --git a/runloop.h b/runloop.h index 6d5dbe9b2f..7e1bebbec1 100644 --- a/runloop.h +++ b/runloop.h @@ -204,6 +204,8 @@ int runloop_iterate(unsigned *sleep_ms); void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); +void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion); + bool runloop_ctl(enum runloop_ctl_state state, void *data); RETRO_END_DECLS From 9523afd53cd06556ac99e2a565ea1ddfb3c7aef2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 16:31:10 +0100 Subject: [PATCH 336/427] Use runloop_get_status in audio_driver_flush as well --- audio/audio_driver.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index fe3a77f5d9..f62d1cc5cb 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -507,6 +507,9 @@ void audio_driver_set_nonblocking_state(bool enable) static bool audio_driver_flush(const int16_t *data, size_t samples) { struct resampler_data src_data; + bool is_paused = false; + bool is_idle = false; + bool is_slowmotion = false; static struct retro_perf_counter resampler_proc = {0}; static struct retro_perf_counter audio_convert_s16 = {0}; const void *output_data = NULL; @@ -523,7 +526,9 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) if (recording_data) recording_push_audio(data, samples); - if (runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL) || settings->audio.mute_enable) + runloop_get_status(&is_paused, &is_idle, &is_slowmotion); + + if (is_paused || settings->audio.mute_enable) return true; if (!audio_driver_active || !audio_driver_input_data) return false; @@ -595,7 +600,7 @@ static bool audio_driver_flush(const int16_t *data, size_t samples) src_data.ratio = audio_source_ratio_current; - if (runloop_ctl(RUNLOOP_CTL_IS_SLOWMOTION, NULL)) + if (is_slowmotion) src_data.ratio *= settings->slowmotion_ratio; performance_counter_init(&resampler_proc, "resampler_proc"); From addcbb896a13ae0d0d9e6ddc1f3b7a085373623d Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Sun, 22 Jan 2017 10:43:09 -0500 Subject: [PATCH 337/427] Fixing an incompatibility between stateless mode and the password prompt Previously, the host would time out waiting for the guest to enter a password, as the timeout was not conditionalized on whether the guest was actually playing. This fixes that. --- network/netplay/netplay_frontend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index c010d30b20..ec0266bf52 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -177,7 +177,9 @@ static bool netplay_poll(void) /* Read Netplay input, block if we're configured to stall for input every * frame */ + netplay_update_unread_ptr(netplay_data); if (netplay_data->stateless_mode && + netplay_data->connected_players && netplay_data->unread_frame_count <= netplay_data->self_frame_count) res = netplay_poll_net_input(netplay_data, true); else From c283d2cf26dc321727c17e91b5fc7bc9baa9d067 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 16:44:34 +0100 Subject: [PATCH 338/427] Small micro-opts to input_state --- input/input_driver.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index dda2470d7c..9573f55e78 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -335,14 +335,11 @@ void input_poll(void) int16_t input_state(unsigned port, unsigned device, unsigned idx, unsigned id) { - rarch_joypad_info_t joypad_info; int16_t res = 0; settings_t *settings = config_get_ptr(); device &= RETRO_DEVICE_MASK; - joypad_info.axis_threshold = settings->input.axis_threshold; - if (bsv_movie_ctl(BSV_MOVIE_CTL_PLAYBACK_ON, NULL)) { int16_t ret; @@ -384,8 +381,12 @@ int16_t input_state(unsigned port, unsigned device, if (bind_valid) { + rarch_joypad_info_t joypad_info; + + joypad_info.axis_threshold = settings->input.axis_threshold; joypad_info.joy_idx = settings->input.joypad_map[port]; joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; + res = current_input->input_state( current_input_data, joypad_info, libretro_input_binds, port, device, idx, id); } From c4bfa6b0d2cd0a7ba8a925dc9e79d99e64d8fe73 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 21 Jan 2017 17:41:20 -0500 Subject: [PATCH 339/427] DOS: initial VGA int13 graphics driver --- Makefile.common | 8 + config.def.h | 3 + configuration.c | 2 + gfx/drivers/caca_gfx.c | 16 +- gfx/drivers/vga_gfx.c | 360 ++++++++++++++++++++++++ gfx/drivers_font/vga_font.c | 147 ++++++++++ gfx/font_driver.c | 34 +++ gfx/font_driver.h | 4 +- gfx/video_driver.c | 3 + gfx/video_driver.h | 1 + griffin/griffin.c | 8 + menu/drivers_display/menu_display_vga.c | 101 +++++++ menu/menu_display.c | 7 + menu/menu_display.h | 4 +- 14 files changed, 688 insertions(+), 10 deletions(-) create mode 100644 gfx/drivers/vga_gfx.c create mode 100644 gfx/drivers_font/vga_font.c create mode 100644 menu/drivers_display/menu_display_vga.c diff --git a/Makefile.common b/Makefile.common index ab3538335f..58aa2c0240 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1268,3 +1268,11 @@ ifeq ($(HAVE_COCOA),1) ui/drivers/cocoa/cocoa_common.o \ gfx/drivers_context/cocoa_gl_ctx.o endif + +ifneq ($(findstring DOS,$(OS)),) + OBJ += gfx/drivers/vga_gfx.o gfx/drivers_font/vga_font.o + + ifeq ($(HAVE_MENU_COMMON), 1) + OBJ += menu/drivers_display/menu_display_vga.o + endif +endif diff --git a/config.def.h b/config.def.h index 28ed46adef..8483c0b356 100644 --- a/config.def.h +++ b/config.def.h @@ -53,6 +53,7 @@ enum video_driver_enum VIDEO_DISPMANX, VIDEO_CACA, VIDEO_GDI, + VIDEO_VGA, VIDEO_NULL }; @@ -213,6 +214,8 @@ enum record_driver_enum #define VIDEO_DEFAULT_DRIVER VIDEO_SDL2 #elif defined(_WIN32) && !defined(_XBOX) #define VIDEO_DEFAULT_DRIVER VIDEO_GDI +#elif defined(DJGPP) +#define VIDEO_DEFAULT_DRIVER VIDEO_VGA #elif defined(HAVE_DYLIB) && !defined(ANDROID) #define VIDEO_DEFAULT_DRIVER VIDEO_EXT #else diff --git a/configuration.c b/configuration.c index 76d2271c77..ed64f08c65 100644 --- a/configuration.c +++ b/configuration.c @@ -314,6 +314,8 @@ const char *config_get_default_video(void) return "caca"; case VIDEO_GDI: return "gdi"; + case VIDEO_VGA: + return "vga"; case VIDEO_NULL: break; } diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index ea0ba6bbf0..b18b187dae 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -40,7 +40,7 @@ static unsigned caca_menu_pitch = 0; static unsigned caca_video_width = 0; static unsigned caca_video_height = 0; static unsigned caca_video_pitch = 0; -static bool caca_rgb32 = 0; +static bool caca_rgb32 = false; static void caca_gfx_free(void *data); @@ -120,7 +120,7 @@ static bool caca_gfx_frame(void *data, const void *frame, if (!frame || !frame_width || !frame_height) return true; - if ( caca_video_width != frame_width || + if ( caca_video_width != frame_width || caca_video_height != frame_height || caca_video_pitch != pitch) { @@ -143,9 +143,9 @@ static bool caca_gfx_frame(void *data, const void *frame, width = caca_get_canvas_width(caca_cv); height = caca_get_canvas_height(caca_cv); - if ( frame_to_copy == frame && - frame_width == 4 && - frame_height == 4 && + if ( frame_to_copy == frame && + frame_width == 4 && + frame_height == 4 && (frame_width < width && frame_height < height)) draw = false; @@ -284,9 +284,9 @@ static void caca_set_texture_frame(void *data, caca_menu_frame = NULL; } - if ( !caca_menu_frame || - caca_menu_width != width || - caca_menu_height != height || + if ( !caca_menu_frame || + caca_menu_width != width || + caca_menu_height != height || caca_menu_pitch != pitch) if (pitch && height) caca_menu_frame = (unsigned char*)malloc(pitch * height); diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c new file mode 100644 index 0000000000..67b1b4ae59 --- /dev/null +++ b/gfx/drivers/vga_gfx.c @@ -0,0 +1,360 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + +#include "../common/vga_common.h" + +#include "../font_driver.h" + +#include "../../driver.h" +#include "../../verbosity.h" + +static unsigned char *vga_menu_frame = NULL; +static unsigned vga_menu_width = 0; +static unsigned vga_menu_height = 0; +static unsigned vga_menu_pitch = 0; +static unsigned vga_menu_bits = 0; +static unsigned vga_video_width = 0; +static unsigned vga_video_height = 0; +static unsigned vga_video_pitch = 0; +static unsigned vga_video_bits = 0; +static bool vga_rgb32 = false; + +static void set_mode_13h() +{ + __dpmi_regs r; + + r.x.ax = 0x13; + __dpmi_int(0x10, &r); +} + +static void return_to_text_mode() +{ + __dpmi_regs r; + + r.x.ax = 3; + __dpmi_int(0x10, &r); +} + +static void vga_vsync() +{ + /* wait until any previous retrace has ended */ + do + { + } + while (inportb(0x3DA) & 8); + + /* wait until a new retrace has just begun */ + do + { + } + while (!(inportb(0x3DA) & 8)); +} + +static void vga_gfx_create(void) +{ + set_mode_13h(); +} + +static void *vga_gfx_init(const video_info_t *video, + const input_driver_t **input, void **input_data) +{ + vga_t *vga = (vga_t*)calloc(1, sizeof(*vga)); + + *input = NULL; + *input_data = NULL; + + vga_video_width = video->width; + vga_video_height = video->height; + vga_rgb32 = video->rgb32; + + if (video->rgb32) + vga_video_pitch = video->width * 4; + else + vga_video_pitch = video->width * 2; + + vga_gfx_create(); + + if (video->font_enable) + font_driver_init_osd(NULL, false, FONT_DRIVER_RENDER_VGA); + + return vga; +} + +static bool vga_gfx_frame(void *data, const void *frame, + unsigned frame_width, unsigned frame_height, uint64_t frame_count, + unsigned pitch, const char *msg, video_frame_info_t *video_info) +{ + size_t len = 0; + void *buffer = NULL; + unsigned width, height, bits; + const void *frame_to_copy = frame; + bool draw = true; + + (void)data; + (void)frame; + (void)frame_width; + (void)frame_height; + (void)pitch; + (void)msg; + + if (!frame || !frame_width || !frame_height) + return true; + +#ifdef HAVE_MENU + menu_driver_frame(video_info); +#endif + + if ( vga_video_width != frame_width || + vga_video_height != frame_height || + vga_video_pitch != pitch) + { + if (frame_width > 4 && frame_height > 4) + { + vga_video_width = frame_width; + vga_video_height = frame_height; + vga_video_pitch = pitch; + } + } + + if (vga_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + { + frame_to_copy = vga_menu_frame; + width = vga_menu_width; + height = vga_menu_height; + pitch = vga_menu_pitch; + bits = vga_menu_bits; + } + else + { + width = vga_video_width; + height = vga_video_height; + pitch = vga_video_pitch; + + if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) + draw = false; + + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + draw = false; + } + + if (draw) + { + vga_vsync(); + dosmemput(frame_to_copy, MIN(320,width)*MIN(200,height), 0xA0000); + } + + if (msg) + font_driver_render_msg(video_info, NULL, msg, NULL); + + video_context_driver_update_window_title(video_info); + + return true; +} + +static void vga_gfx_set_nonblock_state(void *data, bool toggle) +{ + (void)data; + (void)toggle; +} + +static bool vga_gfx_alive(void *data) +{ + (void)data; + video_driver_set_size(&vga_video_width, &vga_video_height); + return true; +} + +static bool vga_gfx_focus(void *data) +{ + (void)data; + return true; +} + +static bool vga_gfx_suppress_screensaver(void *data, bool enable) +{ + (void)data; + (void)enable; + return false; +} + +static bool vga_gfx_has_windowed(void *data) +{ + (void)data; + return true; +} + +static void vga_gfx_free(void *data) +{ + (void)data; + + if (vga_menu_frame) + { + free(vga_menu_frame); + vga_menu_frame = NULL; + } + + return_to_text_mode(); +} + +static bool vga_gfx_set_shader(void *data, + enum rarch_shader_type type, const char *path) +{ + (void)data; + (void)type; + (void)path; + + return false; +} + +static void vga_gfx_set_rotation(void *data, + unsigned rotation) +{ + (void)data; + (void)rotation; +} + +static void vga_gfx_viewport_info(void *data, + struct video_viewport *vp) +{ + (void)data; + (void)vp; +} + +static bool vga_gfx_read_viewport(void *data, uint8_t *buffer) +{ + (void)data; + (void)buffer; + + return true; +} + +static void vga_set_texture_frame(void *data, + const void *frame, bool rgb32, unsigned width, unsigned height, + float alpha) +{ + unsigned pitch = width * 2; + + if (rgb32) + pitch = width * 4; + + if (vga_menu_frame) + { + free(vga_menu_frame); + vga_menu_frame = NULL; + } + + if ( !vga_menu_frame || + vga_menu_width != width || + vga_menu_height != height || + vga_menu_pitch != pitch) + if (pitch && height) + vga_menu_frame = (unsigned char*)malloc(pitch * height); + + if (vga_menu_frame && frame && pitch && height) + { + memcpy(vga_menu_frame, frame, pitch * height); + vga_menu_width = width; + vga_menu_height = height; + vga_menu_pitch = pitch; + vga_menu_bits = rgb32 ? 32 : 16; + } +} + +static void vga_set_osd_msg(void *data, const char *msg, + const void *params, void *font) +{ + video_frame_info_t video_info; + video_driver_build_info(&video_info); + font_driver_render_msg(&video_info, font, msg, params); +} + +static const video_poke_interface_t vga_poke_interface = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#ifdef HAVE_FBO + NULL, +#else + NULL, +#endif + NULL, + NULL, + NULL, +#if defined(HAVE_MENU) + vga_set_texture_frame, + NULL, + vga_set_osd_msg, + NULL, +#else + NULL, + NULL, + NULL, + NULL, +#endif + + NULL, +#ifdef HAVE_MENU + NULL, +#endif +}; + +static void vga_gfx_get_poke_interface(void *data, + const video_poke_interface_t **iface) +{ + (void)data; + *iface = &vga_poke_interface; +} + +void vga_gfx_set_viewport(void *data, unsigned viewport_width, + unsigned viewport_height, bool force_full, bool allow_rotate) +{ +} + +video_driver_t video_vga = { + vga_gfx_init, + vga_gfx_frame, + vga_gfx_set_nonblock_state, + vga_gfx_alive, + vga_gfx_focus, + vga_gfx_suppress_screensaver, + vga_gfx_has_windowed, + vga_gfx_set_shader, + vga_gfx_free, + "vga", + vga_gfx_set_viewport, + vga_gfx_set_rotation, + vga_gfx_viewport_info, + vga_gfx_read_viewport, + NULL, /* read_frame_raw */ + +#ifdef HAVE_OVERLAY + NULL, /* overlay_interface */ +#endif + vga_gfx_get_poke_interface, +}; diff --git a/gfx/drivers_font/vga_font.c b/gfx/drivers_font/vga_font.c new file mode 100644 index 0000000000..601934cc63 --- /dev/null +++ b/gfx/drivers_font/vga_font.c @@ -0,0 +1,147 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../font_driver.h" +#include "../../verbosity.h" +#include "../common/vga_common.h" + +typedef struct +{ + const font_renderer_driver_t *vga_font_driver; + void *vga_font_data; + vga_t *vga; +} vga_raster_t; + +static void *vga_init_font(void *data, + const char *font_path, float font_size) +{ + vga_raster_t *font = (vga_raster_t*)calloc(1, sizeof(*font)); + + if (!font) + return NULL; + + font->vga = (vga_t*)data; + + font_size = 1; + + if (!font_renderer_create_default((const void**)&font->vga_font_driver, + &font->vga_font_data, font_path, font_size)) + { + RARCH_WARN("Couldn't initialize font renderer.\n"); + return NULL; + } + + return font; +} + +static void vga_render_free_font(void *data) +{ + +} + +static int vga_get_message_width(void *data, const char *msg, + unsigned msg_len, float scale) +{ + return 0; +} + +static const struct font_glyph *vga_font_get_glyph( + void *data, uint32_t code) +{ + return NULL; +} + +static void vga_render_msg(video_frame_info_t *video_info, + void *data, const char *msg, + const void *userdata) +{ + float x, y, scale; + unsigned width, height; + unsigned newX, newY; + unsigned align; + vga_raster_t *font = (vga_raster_t*)data; + const struct font_params *params = (const struct font_params*)userdata; + + if (!font || string_is_empty(msg)) + return; + + if (params) + { + x = params->x; + y = params->y; + scale = params->scale; + align = params->text_align; + } + else + { + x = video_info->font_msg_pos_x; + y = video_info->font_msg_pos_y; + scale = 1.0f; + align = TEXT_ALIGN_LEFT; + } + + if (!font->vga) + return; + + width = VGA_WIDTH; + height = VGA_HEIGHT; + newY = height - (y * height * scale); + + switch (align) + { + case TEXT_ALIGN_LEFT: + newX = x * width * scale; + break; + case TEXT_ALIGN_RIGHT: + newX = (x * width * scale) - strlen(msg); + break; + case TEXT_ALIGN_CENTER: + newX = (x * width * scale) - (strlen(msg) / 2); + break; + default: + break; + } +} + +static void vga_font_flush_block(unsigned width, unsigned height, + void* data) +{ + (void)data; +} + +static void vga_font_bind_block(void* data, void* userdata) +{ + (void)data; +} + +font_renderer_t vga_font = { + vga_init_font, + vga_render_free_font, + vga_render_msg, + "vga font", + vga_font_get_glyph, /* get_glyph */ + vga_font_bind_block, /* bind_block */ + vga_font_flush_block, /* flush */ + vga_get_message_width /* get_message_width */ +}; diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 5ab340b731..a6342a7a7f 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -178,6 +178,35 @@ static bool caca_font_init_first( } #endif +#ifdef DJGPP +static const font_renderer_t *vga_font_backends[] = { + &vga_font, + NULL, +}; + +static bool vga_font_init_first( + const void **font_driver, void **font_handle, + void *video_data, const char *font_path, float font_size) +{ + unsigned i; + + for (i = 0; vga_font_backends[i]; i++) + { + void *data = vga_font_backends[i]->init( + video_data, font_path, font_size); + + if (!data) + continue; + + *font_driver = vga_font_backends[i]; + *font_handle = data; + return true; + } + + return false; +} +#endif + #if defined(_WIN32) && !defined(_XBOX) static const font_renderer_t *gdi_font_backends[] = { &gdi_font, @@ -335,6 +364,11 @@ static bool font_init_first( case FONT_DRIVER_RENDER_GDI: return gdi_font_init_first(font_driver, font_handle, video_data, font_path, font_size); +#endif +#ifdef DJGPP + case FONT_DRIVER_RENDER_VGA: + return vga_font_init_first(font_driver, font_handle, + video_data, font_path, font_size); #endif case FONT_DRIVER_RENDER_DONT_CARE: /* TODO/FIXME - lookup graphics driver's 'API' */ diff --git a/gfx/font_driver.h b/gfx/font_driver.h index 9e276f34b4..86c6365176 100644 --- a/gfx/font_driver.h +++ b/gfx/font_driver.h @@ -35,7 +35,8 @@ enum font_driver_render_api FONT_DRIVER_RENDER_CTR, FONT_DRIVER_RENDER_VULKAN_API, FONT_DRIVER_RENDER_CACA, - FONT_DRIVER_RENDER_GDI + FONT_DRIVER_RENDER_GDI, + FONT_DRIVER_RENDER_VGA }; enum text_alignment @@ -171,6 +172,7 @@ extern font_renderer_t ctr_font; extern font_renderer_t vulkan_raster_font; extern font_renderer_t caca_font; extern font_renderer_t gdi_font; +extern font_renderer_t vga_font; extern font_renderer_driver_t stb_font_renderer; extern font_renderer_driver_t stb_unicode_font_renderer; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 46b3b6922c..d097f4639b 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -275,6 +275,9 @@ static const video_driver_t *video_drivers[] = { #endif #ifdef HAVE_CACA &video_caca, +#endif +#ifdef DJGPP + &video_vga, #endif &video_null, NULL, diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 71fecbc2a9..054f7ff822 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -578,6 +578,7 @@ extern video_driver_t video_drm; extern video_driver_t video_xshm; extern video_driver_t video_caca; extern video_driver_t video_gdi; +extern video_driver_t video_vga; extern video_driver_t video_null; extern const void *frame_cache_data; diff --git a/griffin/griffin.c b/griffin/griffin.c index c2b5eb0e0f..570b6eba30 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -405,6 +405,10 @@ FONTS #include "../gfx/drivers_font/caca_font.c" #endif +#if defined(DJGPP) +#include "../gfx/drivers_font/vga_font.c" +#endif + #if defined(_WIN32) && !defined(_XBOX) #include "../gfx/drivers_font/gdi_font.c" #endif @@ -1000,6 +1004,10 @@ MENU #include "../menu/drivers_display/menu_display_caca.c" #endif +#ifdef DJGPP +#include "../menu/drivers_display/menu_display_vga.c" +#endif + #if defined(_WIN32) && !defined(_XBOX) #include "../menu/drivers_display/menu_display_gdi.c" #endif diff --git a/menu/drivers_display/menu_display_vga.c b/menu/drivers_display/menu_display_vga.c new file mode 100644 index 0000000000..cf99b8d3b4 --- /dev/null +++ b/menu/drivers_display/menu_display_vga.c @@ -0,0 +1,101 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2011-2016 - Daniel De Matteis + * Copyright (C) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include + +#include +#include + +#include "../../config.def.h" +#include "../../gfx/font_driver.h" +#include "../../gfx/video_context_driver.h" + +#include "../menu_display.h" + +static void *menu_display_vga_get_default_mvp(void) +{ + return NULL; +} + +static void menu_display_vga_blend_begin(void) +{ +} + +static void menu_display_vga_blend_end(void) +{ +} + +static void menu_display_vga_draw(void *data) +{ + (void)data; +} + +static void menu_display_vga_draw_pipeline(void *data) +{ + (void)data; +} + +static void menu_display_vga_viewport(void *data) +{ + (void)data; +} + +static void menu_display_vga_restore_clear_color(void) +{ +} + +static void menu_display_vga_clear_color(menu_display_ctx_clearcolor_t *clearcolor) +{ + (void)clearcolor; +} + +static bool menu_display_vga_font_init_first( + void **font_handle, void *video_data, + const char *font_path, float font_size) +{ + font_data_t **handle = (font_data_t**)font_handle; + *handle = font_driver_init_first(video_data, + font_path, font_size, true, FONT_DRIVER_RENDER_VGA); + return *handle; +} + +static const float *menu_display_vga_get_default_vertices(void) +{ + static float dummy[16] = {0.0f}; + return &dummy[0]; +} + +static const float *menu_display_vga_get_default_tex_coords(void) +{ + static float dummy[16] = {0.0f}; + return &dummy[0]; +} + +menu_display_ctx_driver_t menu_display_ctx_vga = { + menu_display_vga_draw, + menu_display_vga_draw_pipeline, + menu_display_vga_viewport, + menu_display_vga_blend_begin, + menu_display_vga_blend_end, + menu_display_vga_restore_clear_color, + menu_display_vga_clear_color, + menu_display_vga_get_default_mvp, + menu_display_vga_get_default_vertices, + menu_display_vga_get_default_tex_coords, + menu_display_vga_font_init_first, + MENU_VIDEO_DRIVER_VGA, + "menu_display_vga", +}; diff --git a/menu/menu_display.c b/menu/menu_display.c index d4549c7a42..89a675466e 100644 --- a/menu/menu_display.c +++ b/menu/menu_display.c @@ -85,6 +85,9 @@ static menu_display_ctx_driver_t *menu_display_ctx_drivers[] = { #endif #if defined(_WIN32) && !defined(_XBOX) &menu_display_ctx_gdi, +#endif +#ifdef DJGPP + &menu_display_ctx_vga, #endif &menu_display_ctx_null, NULL, @@ -147,6 +150,10 @@ static bool menu_display_check_compatibility( if (string_is_equal(video_driver, "gdi")) return true; break; + case MENU_VIDEO_DRIVER_VGA: + if (string_is_equal(video_driver, "vga")) + return true; + break; } return false; diff --git a/menu/menu_display.h b/menu/menu_display.h index ea32acf50d..e2d43afde5 100644 --- a/menu/menu_display.h +++ b/menu/menu_display.h @@ -97,7 +97,8 @@ enum menu_display_driver_type MENU_VIDEO_DRIVER_VITA2D, MENU_VIDEO_DRIVER_CTR, MENU_VIDEO_DRIVER_CACA, - MENU_VIDEO_DRIVER_GDI + MENU_VIDEO_DRIVER_GDI, + MENU_VIDEO_DRIVER_VGA }; typedef struct menu_display_ctx_clearcolor @@ -302,6 +303,7 @@ extern menu_display_ctx_driver_t menu_display_ctx_vita2d; extern menu_display_ctx_driver_t menu_display_ctx_ctr; extern menu_display_ctx_driver_t menu_display_ctx_caca; extern menu_display_ctx_driver_t menu_display_ctx_gdi; +extern menu_display_ctx_driver_t menu_display_ctx_vga; extern menu_display_ctx_driver_t menu_display_ctx_null; RETRO_END_DECLS From 89fc14d165fafdf61bcecfdff82fb7b2ec2be1cf Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 21 Jan 2017 18:01:30 -0500 Subject: [PATCH 340/427] DOS: horizontal scale test --- gfx/drivers/vga_gfx.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index 67b1b4ae59..e9506b9d1e 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -41,6 +41,11 @@ static unsigned vga_video_pitch = 0; static unsigned vga_video_bits = 0; static bool vga_rgb32 = false; +static float lerp(float x, float y, float a, float b, float d) +{ + return a + (b - a) * ((d - x) / (y - x)); +} + static void set_mode_13h() { __dpmi_regs r; @@ -270,11 +275,28 @@ static void vga_set_texture_frame(void *data, vga_menu_height != height || vga_menu_pitch != pitch) if (pitch && height) - vga_menu_frame = (unsigned char*)malloc(pitch * height); + vga_menu_frame = (unsigned char*)malloc(VGA_WIDTH * VGA_HEIGHT); if (vga_menu_frame && frame && pitch && height) { - memcpy(vga_menu_frame, frame, pitch * height); + unsigned x, y; + + if (rgb32) + { + } + else + { + unsigned short *video_frame = (unsigned short*)frame; + + for(y = 0; y < VGA_HEIGHT; y++) + { + for(x = 0; x < VGA_WIDTH; x++) + { + vga_menu_frame[VGA_WIDTH * y + x] = lerp(0, 65535, 0, 254, video_frame[width * y + x]); + } + } + } + vga_menu_width = width; vga_menu_height = height; vga_menu_pitch = pitch; From 5c83e993ba7c291548e4817702db83f9ff1127bf Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 21 Jan 2017 23:46:04 -0500 Subject: [PATCH 341/427] DOS: use custom VGA color palette, rgui looks nice but still is not green --- gfx/drivers/vga_gfx.c | 51 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index e9506b9d1e..ba11603350 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -46,7 +46,7 @@ static float lerp(float x, float y, float a, float b, float d) return a + (b - a) * ((d - x) / (y - x)); } -static void set_mode_13h() +static void vga_set_mode_13h() { __dpmi_regs r; @@ -54,7 +54,7 @@ static void set_mode_13h() __dpmi_int(0x10, &r); } -static void return_to_text_mode() +static void vga_return_to_text_mode() { __dpmi_regs r; @@ -62,24 +62,57 @@ static void return_to_text_mode() __dpmi_int(0x10, &r); } +static void vga_upload_palette() +{ + unsigned i; + unsigned char r = 0; + unsigned char g = 0; + unsigned char b = 0; + + outp(0x03c8, 0); + + /* RGB332 */ + for (i = 0; i < 256; i++) + { + outp(0x03c9, i * r * (63.0f / 255.0f)); + outp(0x03c9, i * g * (63.0f / 255.0f)); + outp(0x03c9, i * b * (63.0f / 255.0f)); + + r++; + + if (i % 64 == 0) + { + r = 0; + g = 0; + b++; + } + else if (i % 8 == 0) + { + r = 0; + g++; + } + } +} + static void vga_vsync() { /* wait until any previous retrace has ended */ do { } - while (inportb(0x3DA) & 8); + while (inportb(0x3da) & 8); /* wait until a new retrace has just begun */ do { } - while (!(inportb(0x3DA) & 8)); + while (!(inportb(0x3da) & 8)); } static void vga_gfx_create(void) { - set_mode_13h(); + vga_set_mode_13h(); + vga_upload_palette(); } static void *vga_gfx_init(const video_info_t *video, @@ -220,7 +253,7 @@ static void vga_gfx_free(void *data) vga_menu_frame = NULL; } - return_to_text_mode(); + vga_return_to_text_mode(); } static bool vga_gfx_set_shader(void *data, @@ -292,7 +325,11 @@ static void vga_set_texture_frame(void *data, { for(x = 0; x < VGA_WIDTH; x++) { - vga_menu_frame[VGA_WIDTH * y + x] = lerp(0, 65535, 0, 254, video_frame[width * y + x]); + unsigned short pixel = video_frame[width * y + x]; + unsigned r = (7.0f / 15.0f) * ((pixel & 0xF) >> 0); + unsigned g = (7.0f / 15.0f) * ((pixel & 0xF0) >> 4); + unsigned b = (3.0f / 15.0f) * ((pixel & 0xF00) >> 8); + vga_menu_frame[VGA_WIDTH * y + x] = (b << 6) | (g << 3) | r; } } } From 9d3c20929a378dbb0d85caa1779f944a47bdafff Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 10:41:01 -0500 Subject: [PATCH 342/427] DOS: vga palette looks ok now --- gfx/drivers/vga_gfx.c | 28 ++++++++++++---------------- gfx/drivers_font/vga_font.c | 3 +++ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index ba11603350..b191ab95e3 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -41,11 +41,6 @@ static unsigned vga_video_pitch = 0; static unsigned vga_video_bits = 0; static bool vga_rgb32 = false; -static float lerp(float x, float y, float a, float b, float d) -{ - return a + (b - a) * ((d - x) / (y - x)); -} - static void vga_set_mode_13h() { __dpmi_regs r; @@ -74,23 +69,23 @@ static void vga_upload_palette() /* RGB332 */ for (i = 0; i < 256; i++) { - outp(0x03c9, i * r * (63.0f / 255.0f)); - outp(0x03c9, i * g * (63.0f / 255.0f)); - outp(0x03c9, i * b * (63.0f / 255.0f)); - - r++; - - if (i % 64 == 0) + if (i > 0 && i % 64 == 0) { r = 0; g = 0; b++; } - else if (i % 8 == 0) + else if (i > 0 && i % 8 == 0) { r = 0; g++; } + + outp(0x03c9, r * (63.0f / 7.0f)); + outp(0x03c9, g * (63.0f / 7.0f)); + outp(0x03c9, b * (63.0f / 3.0f)); + + r++; } } @@ -156,6 +151,7 @@ static bool vga_gfx_frame(void *data, const void *frame, (void)frame_height; (void)pitch; (void)msg; + (void)bits; if (!frame || !frame_width || !frame_height) return true; @@ -326,9 +322,9 @@ static void vga_set_texture_frame(void *data, for(x = 0; x < VGA_WIDTH; x++) { unsigned short pixel = video_frame[width * y + x]; - unsigned r = (7.0f / 15.0f) * ((pixel & 0xF) >> 0); - unsigned g = (7.0f / 15.0f) * ((pixel & 0xF0) >> 4); - unsigned b = (3.0f / 15.0f) * ((pixel & 0xF00) >> 8); + unsigned r = (7.0f / 15.0f) * ((pixel & 0xF0) >> 4); + unsigned g = (7.0f / 15.0f) * ((pixel & 0xF00) >> 8); + unsigned b = (3.0f / 15.0f) * ((pixel & 0xF000) >> 12); vga_menu_frame[VGA_WIDTH * y + x] = (b << 6) | (g << 3) | r; } } diff --git a/gfx/drivers_font/vga_font.c b/gfx/drivers_font/vga_font.c index 601934cc63..024c2ed49c 100644 --- a/gfx/drivers_font/vga_font.c +++ b/gfx/drivers_font/vga_font.c @@ -83,6 +83,9 @@ static void vga_render_msg(video_frame_info_t *video_info, vga_raster_t *font = (vga_raster_t*)data; const struct font_params *params = (const struct font_params*)userdata; + (void)newX; + (void)newY; + if (!font || string_is_empty(msg)) return; From 47ffe944796da86dc73d16ded601009ec439a8b3 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 10:44:59 -0500 Subject: [PATCH 343/427] DOS: add vga_common header --- gfx/common/vga_common.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gfx/common/vga_common.h diff --git a/gfx/common/vga_common.h b/gfx/common/vga_common.h new file mode 100644 index 0000000000..ad5608c719 --- /dev/null +++ b/gfx/common/vga_common.h @@ -0,0 +1,29 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * copyright (c) 2011-2015 - Daniel De Matteis + * copyright (c) 2016 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#ifndef __VGA_COMMON_H +#define __VGA_COMMON_H + +#define VGA_WIDTH 320 +#define VGA_HEIGHT 200 + +typedef struct vga +{ + bool color; +} vga_t; + +#endif From a9a3f6b078919311cc3dbb5d2a192cdda98cbf7b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 16:48:55 +0100 Subject: [PATCH 344/427] Another cleanup --- input/input_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 9573f55e78..c5092be971 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -376,10 +376,8 @@ int16_t input_state(unsigned port, unsigned device, if (((id < RARCH_FIRST_META_KEY) || (device == RETRO_DEVICE_KEYBOARD))) { bool bind_valid = libretro_input_binds[port] && libretro_input_binds[port][id].valid; - if (device == RETRO_DEVICE_KEYBOARD) - bind_valid = true; - if (bind_valid) + if (bind_valid || device == RETRO_DEVICE_KEYBOARD) { rarch_joypad_info_t joypad_info; From 5bc611c885f317b862b9dcb95b9853d70cf98f96 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 16:54:33 +0100 Subject: [PATCH 345/427] Small cleanup --- input/input_driver.c | 2 +- movie.c | 4 +--- movie.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index c5092be971..e392b578e6 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -370,7 +370,7 @@ int16_t input_state(unsigned port, unsigned device, } } - if (!input_driver_flushing_input + if ( !input_driver_flushing_input && !input_driver_block_libretro_input) { if (((id < RARCH_FIRST_META_KEY) || (device == RETRO_DEVICE_KEYBOARD))) diff --git a/movie.c b/movie.c index 87005f38b7..18127d4ca2 100644 --- a/movie.c +++ b/movie.c @@ -379,8 +379,6 @@ bool bsv_movie_ctl(enum bsv_ctl_state state, void *data) case BSV_MOVIE_CTL_UNSET_START_PLAYBACK: bsv_movie_state.movie_start_playback = false; break; - case BSV_MOVIE_CTL_END: - return bsv_movie_state.movie_end; case BSV_MOVIE_CTL_SET_END_EOF: bsv_movie_state.eof_exit = true; break; @@ -468,7 +466,7 @@ bool bsv_movie_init_handle(const char *path, /* Checks if movie is being played back. */ static bool runloop_check_movie_playback(void) { - if (!bsv_movie_ctl(BSV_MOVIE_CTL_END, NULL)) + if (!bsv_movie_state.movie_end) return false; runloop_msg_queue_push( diff --git a/movie.h b/movie.h index 533b0889ae..63532f363f 100644 --- a/movie.h +++ b/movie.h @@ -64,7 +64,6 @@ enum bsv_ctl_state BSV_MOVIE_CTL_INIT, BSV_MOVIE_CTL_END_EOF, BSV_MOVIE_CTL_SET_END_EOF, - BSV_MOVIE_CTL_END, BSV_MOVIE_CTL_SET_END, BSV_MOVIE_CTL_UNSET_END }; From b04056db118458be239d9b1db900cbfabc0a7bff Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 16:59:55 +0100 Subject: [PATCH 346/427] Create bsv_movie_set_frame_start/bsv_movie_set_frame_end --- movie.c | 17 ++++++----------- movie.h | 6 ++++-- runloop.c | 6 ++---- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/movie.c b/movie.c index 18127d4ca2..bcd4ea242d 100644 --- a/movie.c +++ b/movie.c @@ -239,15 +239,16 @@ error: } /* Used for rewinding while playback/record. */ -static void bsv_movie_set_frame_start(bsv_movie_t *handle) +void bsv_movie_set_frame_start(void) { - if (!handle) - return; - handle->frame_pos[handle->frame_ptr] = ftell(handle->file); + bsv_movie_t *handle = bsv_movie_state.movie; + if (handle) + handle->frame_pos[handle->frame_ptr] = ftell(handle->file); } -static void bsv_movie_set_frame_end(bsv_movie_t *handle) +void bsv_movie_set_frame_end(void) { + bsv_movie_t *handle = bsv_movie_state.movie; if (!handle) return; @@ -401,12 +402,6 @@ bool bsv_movie_ctl(enum bsv_ctl_state state, void *data) case BSV_MOVIE_CTL_INIT: bsv_movie_init_state(); break; - case BSV_MOVIE_CTL_SET_FRAME_START: - bsv_movie_set_frame_start(bsv_movie_state.movie); - break; - case BSV_MOVIE_CTL_SET_FRAME_END: - bsv_movie_set_frame_end(bsv_movie_state.movie); - break; case BSV_MOVIE_CTL_FRAME_REWIND: bsv_movie_frame_rewind(bsv_movie_state.movie); break; diff --git a/movie.h b/movie.h index 63532f363f..e2f9085883 100644 --- a/movie.h +++ b/movie.h @@ -57,8 +57,6 @@ enum bsv_ctl_state BSV_MOVIE_CTL_UNSET_START_PLAYBACK, BSV_MOVIE_CTL_START_PLAYBACK, BSV_MOVIE_CTL_UNSET_PLAYBACK, - BSV_MOVIE_CTL_SET_FRAME_START, - BSV_MOVIE_CTL_SET_FRAME_END, BSV_MOVIE_CTL_FRAME_REWIND, BSV_MOVIE_CTL_DEINIT, BSV_MOVIE_CTL_INIT, @@ -74,6 +72,10 @@ void bsv_movie_set_path(const char *path); void bsv_movie_set_start_path(const char *path); +void bsv_movie_set_frame_start(void); + +void bsv_movie_set_frame_end(void); + bool bsv_movie_ctl(enum bsv_ctl_state state, void *data); bool bsv_movie_check(void); diff --git a/runloop.c b/runloop.c index 20fa7128cc..a35cc012d7 100644 --- a/runloop.c +++ b/runloop.c @@ -1114,8 +1114,7 @@ int runloop_iterate(unsigned *sleep_ms) autosave_lock(); - if (bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) - bsv_movie_ctl(BSV_MOVIE_CTL_SET_FRAME_START, NULL); + bsv_movie_set_frame_start(); camera_driver_ctl(RARCH_CAMERA_CTL_POLL, NULL); @@ -1157,8 +1156,7 @@ int runloop_iterate(unsigned *sleep_ms) input_pop_analog_dpad(auto_binds); } - if (bsv_movie_ctl(BSV_MOVIE_CTL_IS_INITED, NULL)) - bsv_movie_ctl(BSV_MOVIE_CTL_SET_FRAME_END, NULL); + bsv_movie_set_frame_end(); autosave_unlock(); From 12c5cc51c55eac5d129e88006baeb0073f09abc0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 17:03:42 +0100 Subject: [PATCH 347/427] Create bsv_movie_get_input --- input/input_driver.c | 6 +++--- movie.c | 21 +++++++++++---------- movie.h | 5 ++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index e392b578e6..40b76de8aa 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -342,9 +342,9 @@ int16_t input_state(unsigned port, unsigned device, if (bsv_movie_ctl(BSV_MOVIE_CTL_PLAYBACK_ON, NULL)) { - int16_t ret; - if (bsv_movie_ctl(BSV_MOVIE_CTL_GET_INPUT, &ret)) - return ret; + int16_t bsv_result; + if (bsv_movie_get_input(&bsv_result)) + return bsv_result; bsv_movie_ctl(BSV_MOVIE_CTL_SET_END, NULL); } diff --git a/movie.c b/movie.c index bcd4ea242d..cda896b2f0 100644 --- a/movie.c +++ b/movie.c @@ -354,6 +354,17 @@ static void bsv_movie_init_state(void) } } +bool bsv_movie_get_input(int16_t *bsv_data) +{ + bsv_movie_t *handle = bsv_movie_state.movie; + if (fread(bsv_data, sizeof(int16_t), 1, handle->file) != 1) + return false; + + *bsv_data = swap_if_big16(*bsv_data); + + return true; +} + bool bsv_movie_ctl(enum bsv_ctl_state state, void *data) { switch (state) @@ -405,16 +416,6 @@ bool bsv_movie_ctl(enum bsv_ctl_state state, void *data) case BSV_MOVIE_CTL_FRAME_REWIND: bsv_movie_frame_rewind(bsv_movie_state.movie); break; - case BSV_MOVIE_CTL_GET_INPUT: - { - int16_t *bsv_data = (int16_t*)data; - bsv_movie_t *handle = bsv_movie_state.movie; - if (fread(bsv_data, sizeof(int16_t), 1, handle->file) != 1) - return false; - - *bsv_data = swap_if_big16(*bsv_data); - } - break; case BSV_MOVIE_CTL_SET_INPUT: { int16_t *bsv_data = (int16_t*)data; diff --git a/movie.h b/movie.h index e2f9085883..33d079f856 100644 --- a/movie.h +++ b/movie.h @@ -46,9 +46,6 @@ enum bsv_ctl_state BSV_MOVIE_CTL_IS_INITED, BSV_MOVIE_CTL_PLAYBACK_ON, BSV_MOVIE_CTL_PLAYBACK_OFF, - /* Playback. */ - BSV_MOVIE_CTL_GET_INPUT, - /* Recording. */ BSV_MOVIE_CTL_SET_INPUT, BSV_MOVIE_CTL_SET_START_RECORDING, BSV_MOVIE_CTL_UNSET_START_RECORDING, @@ -76,6 +73,8 @@ void bsv_movie_set_frame_start(void); void bsv_movie_set_frame_end(void); +bool bsv_movie_get_input(int16_t *bsv_data); + bool bsv_movie_ctl(enum bsv_ctl_state state, void *data); bool bsv_movie_check(void); From 985c6a4ed28cc520e456a26fe06264a121edc104 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 17:19:10 +0100 Subject: [PATCH 348/427] Create menu_driver_render --- menu/menu_driver.c | 83 ++++++++++++++++++++++++---------------------- menu/menu_driver.h | 3 +- runloop.c | 2 +- 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index d5b3560979..d70b560968 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -252,7 +252,7 @@ static void menu_driver_toggle(bool on) runloop_ctl(RUNLOOP_CTL_FRONTEND_KEY_EVENT_GET, &frontend_key_event); runloop_ctl(RUNLOOP_CTL_KEY_EVENT_GET, &key_event); - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_alive) { bool refresh = false; menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh); @@ -330,6 +330,48 @@ static void menu_update_libretro_info(void) command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL); } +bool menu_driver_render(bool is_idle) +{ + if (!menu_driver_data) + return false; + + if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_FRAMEBUFFER) + != BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_MESSAGEBOX)) + BIT64_SET(menu_driver_data->state, MENU_STATE_RENDER_FRAMEBUFFER); + + if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_FRAMEBUFFER)) + menu_display_set_framebuffer_dirty_flag(); + + if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_MESSAGEBOX) + && !string_is_empty(menu_driver_data->menu_state.msg)) + { + menu_driver_ctl(RARCH_MENU_CTL_RENDER_MESSAGEBOX, NULL); + + if (ui_companion_is_on_foreground()) + { + const ui_companion_driver_t *ui = ui_companion_get_ptr(); + if (ui->render_messagebox) + ui->render_messagebox(menu_driver_data->menu_state.msg); + } + } + + if (BIT64_GET(menu_driver_data->state, MENU_STATE_BLIT)) + { + settings_t *settings = config_get_ptr(); + menu_animation_update_time(settings->menu.timedate_enable); + menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL); + } + + if (menu_driver_alive && !is_idle) + menu_display_libretro(); + + menu_driver_ctl(RARCH_MENU_CTL_SET_TEXTURE, NULL); + + menu_driver_data->state = 0; + + return true; +} + bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) { switch (state) @@ -454,45 +496,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) if (menu_driver_ctx->render) menu_driver_ctx->render(menu_userdata); break; - case RARCH_MENU_CTL_RENDER: - if (!menu_driver_data) - return false; - - if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_FRAMEBUFFER) - != BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_MESSAGEBOX)) - BIT64_SET(menu_driver_data->state, MENU_STATE_RENDER_FRAMEBUFFER); - - if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_FRAMEBUFFER)) - menu_display_set_framebuffer_dirty_flag(); - - if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_MESSAGEBOX) - && !string_is_empty(menu_driver_data->menu_state.msg)) - { - menu_driver_ctl(RARCH_MENU_CTL_RENDER_MESSAGEBOX, NULL); - - if (ui_companion_is_on_foreground()) - { - const ui_companion_driver_t *ui = ui_companion_get_ptr(); - if (ui->render_messagebox) - ui->render_messagebox(menu_driver_data->menu_state.msg); - } - } - - if (BIT64_GET(menu_driver_data->state, MENU_STATE_BLIT)) - { - settings_t *settings = config_get_ptr(); - menu_animation_update_time(settings->menu.timedate_enable); - menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL); - } - - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) - && !runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) - menu_display_libretro(); - - menu_driver_ctl(RARCH_MENU_CTL_SET_TEXTURE, NULL); - - menu_driver_data->state = 0; - break; case RARCH_MENU_CTL_SET_PREVENT_POPULATE: menu_driver_prevent_populate = true; break; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index bc1e836524..7970239bec 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -97,7 +97,6 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_DEINIT, RARCH_MENU_CTL_INIT, RARCH_MENU_CTL_BLIT_RENDER, - RARCH_MENU_CTL_RENDER, RARCH_MENU_CTL_RENDER_MESSAGEBOX, RARCH_MENU_CTL_SET_PREVENT_POPULATE, RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, @@ -383,6 +382,8 @@ extern unsigned int rdb_entry_start_game_selection_ptr; const char *menu_driver_ident(void); +bool menu_driver_render(bool is_idle); + bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data); bool menu_driver_is_binding_state(void); diff --git a/runloop.c b/runloop.c index a35cc012d7..3947b4802c 100644 --- a/runloop.c +++ b/runloop.c @@ -778,7 +778,7 @@ static enum runloop_state runloop_check_state( rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL); if (focused || !runloop_idle) - menu_driver_ctl(RARCH_MENU_CTL_RENDER, NULL); + menu_driver_render(runloop_idle); if (!focused) return RUNLOOP_STATE_SLEEP; From e33f38d5b2ff98573cf34ef25979b3f420a489b3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 17:22:05 +0100 Subject: [PATCH 349/427] Get rid of more MENU_CTL actions --- menu/menu_driver.c | 17 ++++++----------- menu/menu_driver.h | 2 -- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index d70b560968..abc6130bb9 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -345,7 +345,9 @@ bool menu_driver_render(bool is_idle) if (BIT64_GET(menu_driver_data->state, MENU_STATE_RENDER_MESSAGEBOX) && !string_is_empty(menu_driver_data->menu_state.msg)) { - menu_driver_ctl(RARCH_MENU_CTL_RENDER_MESSAGEBOX, NULL); + if (menu_driver_ctx->render_messagebox) + menu_driver_ctx->render_messagebox(menu_userdata, + menu_driver_data->menu_state.msg); if (ui_companion_is_on_foreground()) { @@ -359,7 +361,9 @@ bool menu_driver_render(bool is_idle) { settings_t *settings = config_get_ptr(); menu_animation_update_time(settings->menu.timedate_enable); - menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL); + + if (menu_driver_ctx->render) + menu_driver_ctx->render(menu_userdata); } if (menu_driver_alive && !is_idle) @@ -487,15 +491,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) memset(&menu_driver_system, 0, sizeof(struct retro_system_info)); } break; - case RARCH_MENU_CTL_RENDER_MESSAGEBOX: - if (menu_driver_ctx->render_messagebox) - menu_driver_ctx->render_messagebox(menu_userdata, - menu_driver_data->menu_state.msg); - break; - case RARCH_MENU_CTL_BLIT_RENDER: - if (menu_driver_ctx->render) - menu_driver_ctx->render(menu_userdata); - break; case RARCH_MENU_CTL_SET_PREVENT_POPULATE: menu_driver_prevent_populate = true; break; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 7970239bec..7a0b1bc8a0 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -96,8 +96,6 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_SET_PENDING_SHUTDOWN, RARCH_MENU_CTL_DEINIT, RARCH_MENU_CTL_INIT, - RARCH_MENU_CTL_BLIT_RENDER, - RARCH_MENU_CTL_RENDER_MESSAGEBOX, RARCH_MENU_CTL_SET_PREVENT_POPULATE, RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, RARCH_MENU_CTL_IS_PREVENT_POPULATE, From 73e621ad32468c01e3ebf752de388f6fa4c5e241 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 17:25:32 +0100 Subject: [PATCH 350/427] Do only one call to RARCH_MENU_CTL_IS_ALIVE --- runloop.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/runloop.c b/runloop.c index 3947b4802c..0f4b2000af 100644 --- a/runloop.c +++ b/runloop.c @@ -689,6 +689,7 @@ static enum runloop_state runloop_check_state( uint64_t current_input, uint64_t old_input, uint64_t trigger_input, + bool menu_is_alive, unsigned *sleep_ms) { static bool old_focus = true; @@ -706,11 +707,7 @@ static enum runloop_state runloop_check_state( if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY)) { - bool fullscreen_toggled = !runloop_paused; -#ifdef HAVE_MENU - fullscreen_toggled = fullscreen_toggled || - menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); -#endif + bool fullscreen_toggled = !runloop_paused || menu_is_alive; if (fullscreen_toggled) command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); @@ -761,7 +758,7 @@ static enum runloop_state runloop_check_state( } #ifdef HAVE_MENU - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_is_alive) { menu_ctx_iterate_t iter; core_poll(); @@ -798,7 +795,7 @@ static enum runloop_state runloop_check_state( #ifdef HAVE_MENU if (menu_event_kb_is_set(RETROK_F1) == 1) { - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_is_alive) { if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) @@ -812,7 +809,7 @@ static enum runloop_state runloop_check_state( runloop_cmd_triggered(trigger_input, RARCH_MENU_TOGGLE)) || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) { - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_is_alive) { if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) @@ -827,7 +824,7 @@ static enum runloop_state runloop_check_state( else menu_event_kb_set(false, RETROK_F1); - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_is_alive) { if (!settings->menu.throttle_framerate && !settings->fastforward_ratio) return RUNLOOP_STATE_MENU_ITERATE; @@ -1046,10 +1043,15 @@ int runloop_iterate(unsigned *sleep_ms) static uint64_t last_input = 0; settings_t *settings = config_get_ptr(); uint64_t old_input = last_input; +#ifdef HAVE_MENU + bool menu_is_alive = menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); +#else + bool menu_is_alive = false; +#endif uint64_t current_input = #ifdef HAVE_MENU - menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) ? + menu_is_alive ? input_menu_keys_pressed(old_input, &last_input, &trigger_input, runloop_paused) : #endif @@ -1088,6 +1090,7 @@ int runloop_iterate(unsigned *sleep_ms) current_input, old_input, trigger_input, + menu_is_alive, sleep_ms)) { case RUNLOOP_STATE_QUIT: From d4b7edff4a39550da3529087f27762108c3be434 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 17:30:32 +0100 Subject: [PATCH 351/427] Cut down on menu_driver_ctl usage from within video drivers --- gfx/drivers/caca_gfx.c | 4 ++-- gfx/drivers/gdi_gfx.c | 4 ++-- gfx/drivers/vga_gfx.c | 4 ++-- gfx/video_driver.c | 3 +++ gfx/video_driver.h | 2 ++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index b18b187dae..1c5a24d842 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -137,7 +137,7 @@ static bool caca_gfx_frame(void *data, const void *frame, if (!caca_cv) return true; - if (caca_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (caca_menu_frame && video_info->menu_is_alive) frame_to_copy = caca_menu_frame; width = caca_get_canvas_width(caca_cv); @@ -149,7 +149,7 @@ static bool caca_gfx_frame(void *data, const void *frame, (frame_width < width && frame_height < height)) draw = false; - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (video_info->menu_is_alive) draw = false; caca_clear_canvas(caca_cv); diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index b5acf4730b..c02517f195 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -184,7 +184,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, } } - if (gdi_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (gdi_menu_frame && video_info->menu_is_alive) { frame_to_copy = gdi_menu_frame; width = gdi_menu_width; @@ -201,7 +201,7 @@ static bool gdi_gfx_frame(void *data, const void *frame, if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) draw = false; - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (video_info->menu_is_alive) draw = false; } diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index b191ab95e3..2cd19893bf 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -172,7 +172,7 @@ static bool vga_gfx_frame(void *data, const void *frame, } } - if (vga_menu_frame && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (vga_menu_frame && video_info->menu_is_alive) { frame_to_copy = vga_menu_frame; width = vga_menu_width; @@ -189,7 +189,7 @@ static bool vga_gfx_frame(void *data, const void *frame, if (frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) draw = false; - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (video_info->menu_is_alive) draw = false; } diff --git a/gfx/video_driver.c b/gfx/video_driver.c index d097f4639b..40f9cf8a20 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -39,6 +39,7 @@ #endif #ifdef HAVE_MENU +#include "../menu/menu_driver.h" #include "../menu/menu_setting.h" #endif @@ -2289,6 +2290,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->libretro_running = false; #ifdef HAVE_MENU + video_info->menu_is_alive = menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); video_info->menu_footer_opacity = settings->menu.footer.opacity; video_info->menu_header_opacity = settings->menu.header.opacity; video_info->materialui_color_theme = settings->menu.materialui.menu_color_theme; @@ -2305,6 +2307,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)); #else + video_info->menu_is_alive = false; video_info->menu_footer_opacity = 0.0f; video_info->menu_header_opacity = 0.0f; video_info->materialui_color_theme = 0; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 054f7ff822..ec42341613 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -131,6 +131,8 @@ typedef struct video_frame_info bool runloop_is_slowmotion; bool runloop_is_idle; bool runloop_is_paused; + + bool menu_is_alive; } video_frame_info_t; /* Optionally implemented interface to poke more From 8c216bd2335aaab9230482f3a76c813dc1423508 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 11:31:54 -0500 Subject: [PATCH 352/427] task title must point to memory that can be freed --- tasks/task_netplay_crc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 7e49775768..6234f3e17a 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -50,13 +50,13 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) size_t i, j; task_set_progress(task, 0); - task_set_title(task, "Checking for ROM presence."); + task_set_title(task, strdup("Checking for ROM presence.")); task_set_finished(task, false); if (!state->lpl_list) { task_set_progress(task, 100); - task_set_title(task, "Playlist directory not found."); + task_set_title(task, strdup("Playlist directory not found.")); task_set_finished(task, true); return; } @@ -81,7 +81,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) if (string_is_equal(playlist->entries[j].crc32, "6BE4CA95|crc")) { task_set_progress(task, 100); - task_set_title(task, "Game found."); + task_set_title(task, strdup("Game found.")); task_set_finished(task, true); string_list_free(state->lpl_list); return; @@ -94,7 +94,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) no_playlists: string_list_free(state->lpl_list); task_set_progress(task, 100); - task_set_title(task, "No game found."); + task_set_title(task, strdup("No game found.")); task_set_finished(task, true); return; } From 45d4a8865c8911b9efa297f8a90752ce34d20949 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 11:33:20 -0500 Subject: [PATCH 353/427] free task state when finished --- tasks/task_netplay_crc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 6234f3e17a..22ae3484b6 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -58,6 +58,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) task_set_progress(task, 100); task_set_title(task, strdup("Playlist directory not found.")); task_set_finished(task, true); + free(state); return; } @@ -84,6 +85,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) task_set_title(task, strdup("Game found.")); task_set_finished(task, true); string_list_free(state->lpl_list); + free(state); return; } @@ -96,6 +98,7 @@ no_playlists: task_set_progress(task, 100); task_set_title(task, strdup("No game found.")); task_set_finished(task, true); + free(state); return; } From 90bc170829a9f30cd88cd2f3bf990215209b16e2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 18:05:07 +0100 Subject: [PATCH 354/427] Get rid of runloop_ctl calls inside audio drivers --- audio/audio_driver.c | 6 +++--- audio/audio_driver.h | 4 ++-- audio/audio_thread_wrapper.c | 8 +++++--- audio/drivers/alsa.c | 2 +- audio/drivers/alsa_qsa.c | 2 +- audio/drivers/alsathread.c | 2 +- audio/drivers/coreaudio.c | 2 +- audio/drivers/ctr_csnd_audio.c | 6 ++---- audio/drivers/ctr_dsp_audio.c | 6 ++---- audio/drivers/dsound.c | 2 +- audio/drivers/gx_audio.c | 2 +- audio/drivers/jack.c | 2 +- audio/drivers/nullaudio.c | 2 +- audio/drivers/openal.c | 2 +- audio/drivers/opensl.c | 2 +- audio/drivers/oss.c | 2 +- audio/drivers/ps3_audio.c | 2 +- audio/drivers/psp_audio.c | 2 +- audio/drivers/pulse.c | 2 +- audio/drivers/roar.c | 2 +- audio/drivers/rsound.c | 2 +- audio/drivers/rwebaudio.c | 2 +- audio/drivers/sdl_audio.c | 2 +- audio/drivers/wiiu_audio.c | 6 ++---- audio/drivers/xaudio.cpp | 2 +- audio/drivers/xenon360_audio.c | 2 +- command.c | 2 +- 27 files changed, 37 insertions(+), 41 deletions(-) diff --git a/audio/audio_driver.c b/audio/audio_driver.c index f62d1cc5cb..084c1e573e 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -470,7 +470,7 @@ static bool audio_driver_init_internal(bool audio_cb_inited) && !settings->audio.mute_enable && audio_cb_inited ) - audio_driver_start(); + audio_driver_start(false); return true; @@ -968,12 +968,12 @@ bool audio_driver_toggle_mute(void) return true; } -bool audio_driver_start(void) +bool audio_driver_start(bool is_shutdown) { if (!current_audio || !current_audio->start || !audio_driver_context_audio_data) return false; - return current_audio->start(audio_driver_context_audio_data); + return current_audio->start(audio_driver_context_audio_data, is_shutdown); } bool audio_driver_stop(void) diff --git a/audio/audio_driver.h b/audio/audio_driver.h index bf2e27fe59..10ce09f044 100644 --- a/audio/audio_driver.h +++ b/audio/audio_driver.h @@ -55,7 +55,7 @@ typedef struct audio_driver bool (*stop)(void *data); /* Starts driver. */ - bool (*start)(void *data); + bool (*start)(void *data, bool is_shutdown); /* Is the audio driver currently running? */ bool (*alive)(void *data); @@ -171,7 +171,7 @@ bool audio_driver_find_driver(void); bool audio_driver_toggle_mute(void); -bool audio_driver_start(void); +bool audio_driver_start(bool is_shutdown); bool audio_driver_stop(void); diff --git a/audio/audio_thread_wrapper.c b/audio/audio_thread_wrapper.c index 05ae867c37..7e383a112d 100644 --- a/audio/audio_thread_wrapper.c +++ b/audio/audio_thread_wrapper.c @@ -35,6 +35,7 @@ typedef struct audio_thread bool stopped; bool stopped_ack; bool is_paused; + bool is_shutdown; bool use_float; int inited; @@ -100,7 +101,7 @@ static void audio_thread_loop(void *data) scond_wait(thr->cond, thr->lock); } - thr->driver->start(thr->driver_data); + thr->driver->start(thr->driver_data, thr->is_shutdown); } slock_unlock(thr->lock); @@ -197,7 +198,7 @@ static bool audio_thread_stop(void *data) return true; } -static bool audio_thread_start(void *data) +static bool audio_thread_start(void *data, bool is_shutdown) { audio_thread_t *thr = (audio_thread_t*)data; @@ -206,7 +207,8 @@ static bool audio_thread_start(void *data) audio_driver_enable_callback(); - thr->is_paused = false; + thr->is_paused = false; + thr->is_shutdown = is_shutdown; audio_thread_unblock(thr); return true; diff --git a/audio/drivers/alsa.c b/audio/drivers/alsa.c index 2be0ff06f3..3bdf9b41bc 100644 --- a/audio/drivers/alsa.c +++ b/audio/drivers/alsa.c @@ -271,7 +271,7 @@ static void alsa_set_nonblock_state(void *data, bool state) alsa->nonblock = state; } -static bool alsa_start(void *data) +static bool alsa_start(void *data, bool is_shutdown) { alsa_t *alsa = (alsa_t*)data; diff --git a/audio/drivers/alsa_qsa.c b/audio/drivers/alsa_qsa.c index 71edeea6cb..ef0fbab51d 100644 --- a/audio/drivers/alsa_qsa.c +++ b/audio/drivers/alsa_qsa.c @@ -290,7 +290,7 @@ static bool alsa_qsa_alive(void *data) return false; } -static bool alsa_qsa_start(void *data) +static bool alsa_qsa_start(void *data, bool is_shutdown) { alsa_t *alsa = (alsa_t*)data; diff --git a/audio/drivers/alsathread.c b/audio/drivers/alsathread.c index 977705b1a0..c4e9d06f65 100644 --- a/audio/drivers/alsathread.c +++ b/audio/drivers/alsathread.c @@ -318,7 +318,7 @@ static void alsa_thread_set_nonblock_state(void *data, bool state) alsa->nonblock = state; } -static bool alsa_thread_start(void *data) +static bool alsa_thread_start(void *data, bool is_shutdown) { alsa_thread_t *alsa = (alsa_thread_t*)data; diff --git a/audio/drivers/coreaudio.c b/audio/drivers/coreaudio.c index a17ead090f..bac9e59d0a 100644 --- a/audio/drivers/coreaudio.c +++ b/audio/drivers/coreaudio.c @@ -397,7 +397,7 @@ static bool coreaudio_stop(void *data) return dev->is_paused ? true : false; } -static bool coreaudio_start(void *data) +static bool coreaudio_start(void *data, bool is_shutdown) { coreaudio_t *dev = (coreaudio_t*)data; if (!dev) diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index 270e95aeeb..9310f3a255 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -20,7 +20,6 @@ #include "../audio_driver.h" #include "../../performance_counters.h" -#include "../../runloop.h" typedef struct { @@ -242,14 +241,13 @@ static bool ctr_csnd_audio_alive(void *data) return ctr->playing; } -static bool ctr_csnd_audio_start(void *data) +static bool ctr_csnd_audio_start(void *data, bool is_shutdown) { ctr_csnd_audio_t* ctr = (ctr_csnd_audio_t*)data; /* Prevents restarting audio when the menu * is toggled off on shutdown */ - - if (runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)) + if (is_shutdown) return true; #if 0 diff --git a/audio/drivers/ctr_dsp_audio.c b/audio/drivers/ctr_dsp_audio.c index 91d7f4e940..e261879d87 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -19,7 +19,6 @@ #include "../audio_driver.h" #include "../../performance_counters.h" -#include "../../runloop.h" #include "../../ctr/ctr_debug.h" typedef struct @@ -162,14 +161,13 @@ static bool ctr_dsp_audio_alive(void *data) return ctr->playing; } -static bool ctr_dsp_audio_start(void *data) +static bool ctr_dsp_audio_start(void *data, bool is_shutdown) { ctr_dsp_audio_t* ctr = (ctr_dsp_audio_t*)data; /* Prevents restarting audio when the menu * is toggled off on shutdown */ - - if (runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)) + if (is_shutdown) return true; ndspSetMasterVol(1.0); diff --git a/audio/drivers/dsound.c b/audio/drivers/dsound.c index 9264b3e705..1af78d9c15 100644 --- a/audio/drivers/dsound.c +++ b/audio/drivers/dsound.c @@ -396,7 +396,7 @@ static bool dsound_stop(void *data) return (ds->is_paused) ? true : false; } -static bool dsound_start(void *data) +static bool dsound_start(void *data, bool is_shutdown) { dsound_t *ds = (dsound_t*)data; diff --git a/audio/drivers/gx_audio.c b/audio/drivers/gx_audio.c index 5d6c6680df..d495c4e6f2 100644 --- a/audio/drivers/gx_audio.c +++ b/audio/drivers/gx_audio.c @@ -173,7 +173,7 @@ static void gx_audio_set_nonblock_state(void *data, bool state) wa->nonblock = state; } -static bool gx_audio_start(void *data) +static bool gx_audio_start(void *data, bool is_shutdown) { gx_audio_t *wa = (gx_audio_t*)data; diff --git a/audio/drivers/jack.c b/audio/drivers/jack.c index 08ce009148..ee0cb78d70 100644 --- a/audio/drivers/jack.c +++ b/audio/drivers/jack.c @@ -322,7 +322,7 @@ static void ja_set_nonblock_state(void *data, bool state) jd->nonblock = state; } -static bool ja_start(void *data) +static bool ja_start(void *data, bool is_shutdown) { jack_t *jd = (jack_t*)data; if (jd) diff --git a/audio/drivers/nullaudio.c b/audio/drivers/nullaudio.c index 694940f53a..d0d9c0d36b 100644 --- a/audio/drivers/nullaudio.c +++ b/audio/drivers/nullaudio.c @@ -55,7 +55,7 @@ static bool null_audio_alive(void *data) return true; } -static bool null_audio_start(void *data) +static bool null_audio_start(void *data, bool is_shutdown) { (void)data; return true; diff --git a/audio/drivers/openal.c b/audio/drivers/openal.c index 61200262ad..fc94f78e29 100644 --- a/audio/drivers/openal.c +++ b/audio/drivers/openal.c @@ -235,7 +235,7 @@ static void al_set_nonblock_state(void *data, bool state) al->nonblock = state; } -static bool al_start(void *data) +static bool al_start(void *data, bool is_shutdown) { al_t *al = (al_t*)data; if (al) diff --git a/audio/drivers/opensl.c b/audio/drivers/opensl.c index 0de157d433..7fe162ef57 100644 --- a/audio/drivers/opensl.c +++ b/audio/drivers/opensl.c @@ -221,7 +221,7 @@ static void sl_set_nonblock_state(void *data, bool state) sl->nonblock = state; } -static bool sl_start(void *data) +static bool sl_start(void *data, bool is_shutdown) { sl_t *sl = (sl_t*)data; sl->is_paused = (SLPlayItf_SetPlayState(sl->player, SL_PLAYSTATE_PLAYING) diff --git a/audio/drivers/oss.c b/audio/drivers/oss.c index 8a68573793..c7b84bc8bf 100644 --- a/audio/drivers/oss.c +++ b/audio/drivers/oss.c @@ -125,7 +125,7 @@ static bool oss_stop(void *data) return true; } -static bool oss_start(void *data) +static bool oss_start(void *data, bool is_shutdown) { (void)data; oss_is_paused = false; diff --git a/audio/drivers/ps3_audio.c b/audio/drivers/ps3_audio.c index 28bfb68825..38358babf5 100644 --- a/audio/drivers/ps3_audio.c +++ b/audio/drivers/ps3_audio.c @@ -177,7 +177,7 @@ static bool ps3_audio_stop(void *data) return true; } -static bool ps3_audio_start(void *data) +static bool ps3_audio_start(void *data, bool is_shutdown) { ps3_audio_t *aud = data; if (!aud->started) diff --git a/audio/drivers/psp_audio.c b/audio/drivers/psp_audio.c index 0b7c3e305e..0181c9614a 100644 --- a/audio/drivers/psp_audio.c +++ b/audio/drivers/psp_audio.c @@ -285,7 +285,7 @@ static bool psp_audio_stop(void *data) return true; } -static bool psp_audio_start(void *data) +static bool psp_audio_start(void *data, bool is_shutdown) { SceKernelThreadInfo info; psp_audio_t* psp = (psp_audio_t*)data; diff --git a/audio/drivers/pulse.c b/audio/drivers/pulse.c index c1beefcd06..61e47fd08f 100644 --- a/audio/drivers/pulse.c +++ b/audio/drivers/pulse.c @@ -291,7 +291,7 @@ static bool pulse_alive(void *data) return !pa->is_paused; } -static bool pulse_start(void *data) +static bool pulse_start(void *data, bool is_shutdown) { bool ret; pa_t *pa = (pa_t*)data; diff --git a/audio/drivers/roar.c b/audio/drivers/roar.c index 5b92bf1b69..374287ae10 100644 --- a/audio/drivers/roar.c +++ b/audio/drivers/roar.c @@ -109,7 +109,7 @@ static void ra_set_nonblock_state(void *data, bool state) roar->nonblocking = state; } -static bool ra_start(void *data) +static bool ra_start(void *data, bool is_shutdown) { roar_t *roar = (roar_t*)data; if (roar) diff --git a/audio/drivers/rsound.c b/audio/drivers/rsound.c index ff5bf749f1..258f42aa2a 100644 --- a/audio/drivers/rsound.c +++ b/audio/drivers/rsound.c @@ -177,7 +177,7 @@ static bool rs_alive(void *data) return false; } -static bool rs_start(void *data) +static bool rs_start(void *data, bool is_shutdown) { rsd_t *rsd = (rsd_t*)data; if (rsd_start(rsd->rd) < 0) diff --git a/audio/drivers/rwebaudio.c b/audio/drivers/rwebaudio.c index 1323389112..5a90e69233 100644 --- a/audio/drivers/rwebaudio.c +++ b/audio/drivers/rwebaudio.c @@ -76,7 +76,7 @@ static bool rwebaudio_alive(void *data) return !rwebaudio_is_paused; } -static bool rwebaudio_start(void *data) +static bool rwebaudio_start(void *data, bool is_shutdown) { (void)data; rwebaudio_is_paused = false; diff --git a/audio/drivers/sdl_audio.c b/audio/drivers/sdl_audio.c index a1bf693a12..0f36c15726 100644 --- a/audio/drivers/sdl_audio.c +++ b/audio/drivers/sdl_audio.c @@ -203,7 +203,7 @@ static bool sdl_audio_alive(void *data) return !sdl->is_paused; } -static bool sdl_audio_start(void *data) +static bool sdl_audio_start(void *data, bool is_shutdown) { sdl_audio_t *sdl = (sdl_audio_t*)data; sdl->is_paused = false; diff --git a/audio/drivers/wiiu_audio.c b/audio/drivers/wiiu_audio.c index 68f7620b37..a3b9116cf9 100644 --- a/audio/drivers/wiiu_audio.c +++ b/audio/drivers/wiiu_audio.c @@ -34,7 +34,6 @@ #include "audio/audio_driver.h" #include "performance_counters.h" -#include "runloop.h" typedef struct { @@ -180,14 +179,13 @@ static int ax_audio_limit(int in) return in; } -static bool ax_audio_start(void* data) +static bool ax_audio_start(void* data, bool is_shutdown) { ax_audio_t* ax = (ax_audio_t*)data; /* Prevents restarting audio when the menu * is toggled off on shutdown */ - - if (runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)) + if (is_shutdown) return true; //set back to playing on enough buffered data diff --git a/audio/drivers/xaudio.cpp b/audio/drivers/xaudio.cpp index 74c29396af..42f6ce5944 100644 --- a/audio/drivers/xaudio.cpp +++ b/audio/drivers/xaudio.cpp @@ -316,7 +316,7 @@ static void xa_set_nonblock_state(void *data, bool state) xa->nonblock = state; } -static bool xa_start(void *data) +static bool xa_start(void *data, bool is_shutdown) { xa_t *xa = (xa_t*)data; xa->is_paused = false; diff --git a/audio/drivers/xenon360_audio.c b/audio/drivers/xenon360_audio.c index 4ab1236718..b72e01fc4d 100644 --- a/audio/drivers/xenon360_audio.c +++ b/audio/drivers/xenon360_audio.c @@ -112,7 +112,7 @@ static void xenon360_audio_set_nonblock_state(void *data, bool state) xa->nonblock = state; } -static bool xenon360_audio_start(void *data) +static bool xenon360_audio_start(void *data, bool is_shutdown) { xenon_audio_t *xa = data; xa->is_paused = false; diff --git a/command.c b/command.c index 8326787a9e..e3c39434d7 100644 --- a/command.c +++ b/command.c @@ -2055,7 +2055,7 @@ bool command_event(enum event_command cmd, void *data) if (audio_driver_alive()) return false; - if (settings && !settings->audio.mute_enable && !audio_driver_start()) + if (settings && !settings->audio.mute_enable && !audio_driver_start(runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL))) { RARCH_ERR("%s\n", msg_hash_to_str(MSG_FAILED_TO_START_AUDIO_DRIVER)); From 2f504b40571079bceacd66d8143972ed942cb2fd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 18:17:48 +0100 Subject: [PATCH 355/427] (gfx/drivers) Get rid of remaining runloop.h / runloop_ctl references inside gfx/drivers --- gfx/drivers/caca_gfx.c | 2 +- gfx/drivers/ctr_gfx.c | 2 +- gfx/drivers/d3d.cpp | 3 +-- .../d3d_renderchains/render_chain_cg.cpp | 1 - gfx/drivers/dispmanx_gfx.c | 3 +-- gfx/drivers/drm_gfx.c | 3 +-- gfx/drivers/exynos_gfx.c | 3 +-- gfx/drivers/gdi_gfx.c | 2 +- gfx/drivers/gl.c | 5 ++-- gfx/drivers/gx_gfx.c | 3 +-- gfx/drivers/nullgfx.c | 2 +- gfx/drivers/omap_gfx.c | 3 +-- gfx/drivers/psp1_gfx.c | 3 +-- gfx/drivers/sdl2_gfx.c | 5 ++-- gfx/drivers/sdl_gfx.c | 3 +-- gfx/drivers/sunxi_gfx.c | 1 - gfx/drivers/vg.c | 4 +--- gfx/drivers/vga_gfx.c | 2 +- gfx/drivers/vita2d_gfx.c | 3 +-- gfx/drivers/vulkan.c | 6 ++--- gfx/drivers/wiiu_gfx.c | 4 ++-- gfx/drivers/xenon360_gfx.c | 3 +-- gfx/drivers/xshm_gfx.c | 2 +- gfx/drivers/xvideo.c | 2 +- gfx/video_driver.c | 9 +++---- gfx/video_driver.h | 4 ++-- gfx/video_thread_wrapper.c | 8 ++++--- record/record_driver.c | 6 ++--- record/record_driver.h | 2 +- tasks/task_screenshot.c | 24 +++++++++++-------- 30 files changed, 57 insertions(+), 66 deletions(-) diff --git a/gfx/drivers/caca_gfx.c b/gfx/drivers/caca_gfx.c index 1c5a24d842..0e4885133d 100644 --- a/gfx/drivers/caca_gfx.c +++ b/gfx/drivers/caca_gfx.c @@ -261,7 +261,7 @@ static void caca_gfx_viewport_info(void *data, (void)vp; } -static bool caca_gfx_read_viewport(void *data, uint8_t *buffer) +static bool caca_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index e47f9a31cc..b83183dff2 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -1146,7 +1146,7 @@ static void ctr_get_poke_interface(void* data, *iface = &ctr_poke_interface; } -static bool ctr_read_viewport(void* data, uint8_t* buffer) +static bool ctr_read_viewport(void* data, uint8_t* buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index 3000b0d9b4..03f1af93d0 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -53,7 +53,6 @@ #include "../../performance_counters.h" #include "../../defines/d3d_defines.h" -#include "../../runloop.h" #include "../../verbosity.h" #if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL) @@ -1475,7 +1474,7 @@ static bool d3d_frame(void *data, const void *frame, return true; } -static bool d3d_read_viewport(void *data, uint8_t *buffer) +static bool d3d_read_viewport(void *data, uint8_t *buffer, bool is_idle) { d3d_video_t *d3d = (d3d_video_t*)data; diff --git a/gfx/drivers/d3d_renderchains/render_chain_cg.cpp b/gfx/drivers/d3d_renderchains/render_chain_cg.cpp index fb6a72afff..7c25bcbf5c 100644 --- a/gfx/drivers/d3d_renderchains/render_chain_cg.cpp +++ b/gfx/drivers/d3d_renderchains/render_chain_cg.cpp @@ -38,7 +38,6 @@ #include "../../video_driver.h" #include "../../../performance_counters.h" #include "../../../configuration.h" -#include "../../../runloop.h" #include "../../../verbosity.h" #define cg_d3d9_set_param_1f(param, x) if (param) cgD3D9SetUniform(param, x) diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index 485445c2fd..9ac5001319 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -30,7 +30,6 @@ #include "../../driver.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "../video_context_driver.h" #include "../font_driver.h" @@ -599,7 +598,7 @@ static void dispmanx_gfx_set_rotation(void *data, unsigned rotation) (void)rotation; } -static bool dispmanx_gfx_read_viewport(void *data, uint8_t *buffer) +static bool dispmanx_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/drm_gfx.c b/gfx/drivers/drm_gfx.c index e92bb1a895..0b861d8cee 100644 --- a/gfx/drivers/drm_gfx.c +++ b/gfx/drivers/drm_gfx.c @@ -39,7 +39,6 @@ #include "../font_driver.h" #include "../video_context_driver.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "drm_pixformats.h" @@ -940,7 +939,7 @@ static void drm_gfx_set_rotation(void *data, unsigned rotation) (void)rotation; } -static bool drm_gfx_read_viewport(void *data, uint8_t *buffer) +static bool drm_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 30bd481baf..7cb08690cb 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -44,7 +44,6 @@ #include "../font_driver.h" #include "../../configuration.h" #include "../../retroarch.h" -#include "../../runloop.h" /* TODO: Honor these properties: vsync, menu rotation, menu alpha, aspect ratio change */ @@ -1521,7 +1520,7 @@ static bool exynos_gfx_set_shader(void *data, return false; } -static bool exynos_gfx_read_viewport(void *data, uint8_t *buffer) +static bool exynos_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index c02517f195..8daeff9a62 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -355,7 +355,7 @@ static void gdi_gfx_viewport_info(void *data, (void)vp; } -static bool gdi_gfx_read_viewport(void *data, uint8_t *buffer) +static bool gdi_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index dc3da7ae1a..102313b44b 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -47,7 +47,6 @@ #include "../../performance_counters.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "../../verbosity.h" #include "../common/gl_common.h" @@ -2360,7 +2359,7 @@ static void gl_viewport_info(void *data, struct video_viewport *vp) vp->y = top_dist; } -static bool gl_read_viewport(void *data, uint8_t *buffer) +static bool gl_read_viewport(void *data, uint8_t *buffer, bool is_idle) { #ifndef NO_GL_READ_PIXELS static struct retro_perf_counter read_viewport = {0}; @@ -2443,7 +2442,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer) goto error; } - if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) + if (!is_idle) video_driver_cached_frame(); video_frame_convert_rgba_to_bgr( diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index d41fc3cc8f..fc0b9f6012 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -42,7 +42,6 @@ #include "../../defines/gx_defines.h" #include "../../configuration.h" #include "../../driver.h" -#include "../../runloop.h" extern syssram* __SYS_LockSram(void); extern u32 __SYS_UnlockSram(u32 write); @@ -1180,7 +1179,7 @@ static void gx_viewport_info(void *data, struct video_viewport *vp) *vp = gx->vp; } -static bool gx_read_viewport(void *data, uint8_t *buffer) +static bool gx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/nullgfx.c b/gfx/drivers/nullgfx.c index 858bad3aea..b3d66d428b 100644 --- a/gfx/drivers/nullgfx.c +++ b/gfx/drivers/nullgfx.c @@ -105,7 +105,7 @@ static void null_gfx_viewport_info(void *data, (void)vp; } -static bool null_gfx_read_viewport(void *data, uint8_t *buffer) +static bool null_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index 2f799421f7..f9b6679357 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -48,7 +48,6 @@ #include "../../configuration.h" #include "../../driver.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "../video_context_driver.h" @@ -1097,7 +1096,7 @@ static void omap_gfx_set_rotation(void *data, unsigned rotation) (void)rotation; } -static bool omap_gfx_read_viewport(void *data, uint8_t *buffer) +static bool omap_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 958bad4003..49f28e5330 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -35,7 +35,6 @@ #include "../font_driver.h" #include "../../defines/psp_defines.h" -#include "../../runloop.h" #ifndef SCEGU_SCR_WIDTH #define SCEGU_SCR_WIDTH 480 @@ -871,7 +870,7 @@ static void psp_get_poke_interface(void *data, *iface = &psp_poke_interface; } -static bool psp_read_viewport(void *data, uint8_t *buffer) +static bool psp_read_viewport(void *data, uint8_t *buffer, bool is_idle) { void* src_buffer; int i, j, src_bufferwidth, src_pixelformat, src_x, src_y, src_x_max, src_y_max; diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 11f7354a8e..6b9cea9b80 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -40,7 +40,6 @@ #include "../../configuration.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "../../performance_counters.h" #include "../../verbosity.h" #include "../video_context_driver.h" @@ -627,7 +626,7 @@ static void sdl2_gfx_viewport_info(void *data, struct video_viewport *vp) *vp = vid->vp; } -static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer) +static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { SDL_Surface *surf = NULL, *bgr24 = NULL; sdl2_video_t *vid = (sdl2_video_t*)data; @@ -636,7 +635,7 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer) performance_counter_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport"); performance_counter_start(&sdl2_gfx_read_viewport); - if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) + if (!is_idle) video_driver_cached_frame(); surf = SDL_GetWindowSurface(vid->window); diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index 01eb8959f2..805c15a4e5 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -43,7 +43,6 @@ #include "../video_driver.h" #include "../../configuration.h" -#include "../../runloop.h" #include "../../performance_counters.h" #include "../video_context_driver.h" @@ -576,7 +575,7 @@ static void sdl_gfx_set_rotation(void *data, unsigned rotation) (void)rotation; } -static bool sdl_gfx_read_viewport(void *data, uint8_t *buffer) +static bool sdl_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index 2d7aeeef26..0d6e4d5a61 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -36,7 +36,6 @@ #include "../font_driver.h" #include "../../retroarch.h" -#include "../../runloop.h" #define NUMPAGES 2 diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 3da5d3df9e..6608c5da88 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -40,11 +40,9 @@ #include "../video_context_driver.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "../../driver.h" #include "../../performance_counters.h" #include "../../content.h" -#include "../../runloop.h" #include "../../verbosity.h" #include "../../configuration.h" @@ -502,7 +500,7 @@ static void vg_viewport_info(void *data, (void)vp; } -static bool vg_read_viewport(void *data, uint8_t *buffer) +static bool vg_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/vga_gfx.c b/gfx/drivers/vga_gfx.c index 2cd19893bf..edcc496410 100644 --- a/gfx/drivers/vga_gfx.c +++ b/gfx/drivers/vga_gfx.c @@ -276,7 +276,7 @@ static void vga_gfx_viewport_info(void *data, (void)vp; } -static bool vga_gfx_read_viewport(void *data, uint8_t *buffer) +static bool vga_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 9caaacc6ea..07ba4550c5 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -32,7 +32,6 @@ #include "../common/vita2d_common.h" #include "../../driver.h" -#include "../../runloop.h" #include "../video_coord_array.h" #include "../video_context_driver.h" #include "../../verbosity.h" @@ -561,7 +560,7 @@ static void vita2d_gfx_viewport_info(void *data, *vp = vita->vp; } -static bool vita2d_gfx_read_viewport(void *data, uint8_t *buffer) +static bool vita2d_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 2385cb1046..0481a84896 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -45,7 +45,6 @@ #include "../../performance_counters.h" #include "../../retroarch.h" -#include "../../runloop.h" #include "../../verbosity.h" #include "../video_context_driver.h" @@ -2262,7 +2261,7 @@ static void vulkan_viewport_info(void *data, struct video_viewport *vp) vp->full_height = height; } -static bool vulkan_read_viewport(void *data, uint8_t *buffer) +static bool vulkan_read_viewport(void *data, uint8_t *buffer, bool is_idle) { struct vk_texture *staging = NULL; vk_t *vk = (vk_t*)data; @@ -2305,7 +2304,8 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer) * with conversion. */ vk->readback.pending = true; - if (!runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) + + if (!is_idle) video_driver_cached_frame(); vkQueueWaitIdle(vk->context->queue); diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index 9ab075f1f8..9ee8ed829c 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -768,7 +768,7 @@ static void wiiu_gfx_viewport_info(void* data, *vp = wiiu->vp; } -static bool wiiu_gfx_read_viewport(void* data, uint8_t* buffer) +static bool wiiu_gfx_read_viewport(void* data, uint8_t* buffer, bool is_idle) { (void)data; (void)buffer; @@ -777,7 +777,7 @@ static bool wiiu_gfx_read_viewport(void* data, uint8_t* buffer) } static uintptr_t wiiu_gfx_load_texture(void* video_data, void* data, - bool threaded, enum texture_filter_type filter_type) + bool threaded, enum texture_filter_type filter_type) { return 0; } diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 59723790d5..881b8731cd 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -29,7 +29,6 @@ #include "../font_driver.h" #include "../../driver.h" -#include "../../runloop.h" #define XE_W 512 #define XE_H 512 @@ -299,7 +298,7 @@ static void xenon360_gfx_viewport_info(void *data, struct video_viewport *vp) (void)vp; } -static bool xenon360_gfx_read_viewport(void *data, uint8_t *buffer) +static bool xenon360_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/drivers/xshm_gfx.c b/gfx/drivers/xshm_gfx.c index 5bc22c81c3..b283121211 100644 --- a/gfx/drivers/xshm_gfx.c +++ b/gfx/drivers/xshm_gfx.c @@ -158,7 +158,7 @@ static void xshm_gfx_viewport_info(void *data, struct video_viewport *vp) } -static bool xshm_gfx_read_viewport(void *data, uint8_t *buffer) +static bool xshm_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle) { return false; } diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index 499195e66b..772165fa01 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -892,7 +892,7 @@ static void xv_set_rotation(void *data, unsigned rotation) (void)rotation; } -static bool xv_read_viewport(void *data, uint8_t *buffer) +static bool xv_read_viewport(void *data, uint8_t *buffer, bool is_idle) { (void)data; (void)buffer; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 40f9cf8a20..e682147593 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -1102,7 +1102,8 @@ static bool video_driver_frame_filter( if (video_info->post_filter_record && recording_data) recording_dump_frame(video_driver_state_buffer, - *output_width, *output_height, *output_pitch); + *output_width, *output_height, *output_pitch, + video_info->runloop_is_idle); return true; } @@ -1634,10 +1635,10 @@ void video_driver_apply_state_changes(void) video_driver_poke->apply_state_changes(video_driver_data); } -bool video_driver_read_viewport(uint8_t *buffer) +bool video_driver_read_viewport(uint8_t *buffer, bool is_idle) { if ( current_video->read_viewport - && current_video->read_viewport(video_driver_data, buffer)) + && current_video->read_viewport(video_driver_data, buffer, is_idle)) return true; return false; @@ -2169,7 +2170,7 @@ void video_driver_frame(const void *data, unsigned width, || video_driver_record_gpu_buffer ) && recording_data ) - recording_dump_frame(data, width, height, pitch); + recording_dump_frame(data, width, height, pitch, video_info.runloop_is_idle); if (data && video_driver_state_filter && video_driver_frame_filter(data, &video_info, width, height, pitch, diff --git a/gfx/video_driver.h b/gfx/video_driver.h index ec42341613..505d733ffa 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -242,7 +242,7 @@ typedef struct video_driver void (*viewport_info)(void *data, struct video_viewport *vp); /* Reads out in BGR byte order (24bpp). */ - bool (*read_viewport)(void *data, uint8_t *buffer); + bool (*read_viewport)(void *data, uint8_t *buffer, bool is_idle); /* Returns a pointer to a newly allocated buffer that can * (and must) be passed to free() by the caller, containing a @@ -305,7 +305,7 @@ void video_driver_hide_mouse(void); void video_driver_set_nonblock_state(bool toggle); bool video_driver_find_driver(void); void video_driver_apply_state_changes(void); -bool video_driver_read_viewport(uint8_t *buffer); +bool video_driver_read_viewport(uint8_t *buffer, bool is_idle); bool video_driver_cached_frame(void); uint64_t video_driver_get_frame_count(void); bool video_driver_frame_filter_alive(void); diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index d0834f12b1..ce76aa5fb5 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -187,6 +187,7 @@ struct thread_video bool suppress_screensaver; bool has_windowed; bool nonblock; + bool is_idle; retro_time_t last_time; unsigned hit_count; @@ -393,7 +394,7 @@ static bool video_thread_handle_packet( if (thr->driver->read_viewport) ret = thr->driver->read_viewport(thr->driver_data, - (uint8_t*)pkt.data.v); + (uint8_t*)pkt.data.v, thr->is_idle); pkt.data.b = ret; thr->frame.within_thread = false; @@ -916,7 +917,7 @@ static void video_thread_viewport_info(void *data, struct video_viewport *vp) slock_unlock(thr->lock); } -static bool video_thread_read_viewport(void *data, uint8_t *buffer) +static bool video_thread_read_viewport(void *data, uint8_t *buffer, bool is_idle) { thread_video_t *thr = (thread_video_t*)data; thread_packet_t pkt = { CMD_READ_VIEWPORT }; @@ -924,7 +925,8 @@ static bool video_thread_read_viewport(void *data, uint8_t *buffer) if (!thr) return false; - pkt.data.v = buffer; + pkt.data.v = buffer; + thr->is_idle = is_idle; video_thread_send_and_wait_user_to_thread(thr, &pkt); diff --git a/record/record_driver.c b/record/record_driver.c index d3d2b1769b..fc68b0cf87 100644 --- a/record/record_driver.c +++ b/record/record_driver.c @@ -183,7 +183,7 @@ bool record_driver_init_first(const record_driver_t **backend, void **data, } void recording_dump_frame(const void *data, unsigned width, - unsigned height, size_t pitch) + unsigned height, size_t pitch, bool is_idle) { struct ffemu_video_data ffemu_data = {0}; @@ -205,7 +205,7 @@ void recording_dump_frame(const void *data, unsigned width, msg_hash_to_str(MSG_VIEWPORT_SIZE_CALCULATION_FAILED)); command_event(CMD_EVENT_GPU_RECORD_DEINIT, NULL); - recording_dump_frame(data, width, height, pitch); + recording_dump_frame(data, width, height, pitch, is_idle); return; } @@ -229,7 +229,7 @@ void recording_dump_frame(const void *data, unsigned width, /* Big bottleneck. * Since we might need to do read-backs asynchronously, * it might take 3-4 times before this returns true. */ - if (!video_driver_read_viewport(gpu_buf)) + if (!video_driver_read_viewport(gpu_buf, is_idle)) return; ffemu_data.pitch = recording_gpu_width * 3; diff --git a/record/record_driver.h b/record/record_driver.h index d124042b94..7fefc072b9 100644 --- a/record/record_driver.h +++ b/record/record_driver.h @@ -145,7 +145,7 @@ bool record_driver_init_first(const record_driver_t **backend, void **data, const struct ffemu_params *params); void recording_dump_frame(const void *data, unsigned width, - unsigned height, size_t pitch); + unsigned height, size_t pitch, bool is_idle); bool recording_deinit(void); diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index c8318a4736..8687ab3b73 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -76,6 +76,7 @@ typedef struct bool bgr24; bool silence; void *userbuf; + bool is_idle; bool is_paused; bool history_list_enable; } screenshot_task_state_t; @@ -189,7 +190,9 @@ static bool screenshot_dump( const void *frame, unsigned width, unsigned height, - int pitch, bool bgr24, void *userbuf, bool savestate, + int pitch, bool bgr24, + void *userbuf, bool savestate, + bool is_idle, bool is_paused) { char screenshot_path[PATH_MAX_LENGTH]; @@ -211,6 +214,7 @@ static bool screenshot_dump( screenshot_dir = screenshot_path; } + state->is_idle = is_idle; state->is_paused = is_paused; state->bgr24 = bgr24; state->height = height; @@ -263,7 +267,7 @@ static bool screenshot_dump( #if !defined(VITA) static bool take_screenshot_viewport(const char *name_base, bool savestate, - bool is_paused) + bool is_idle, bool is_paused) { struct video_viewport vp; uint8_t *buffer = NULL; @@ -286,13 +290,13 @@ static bool take_screenshot_viewport(const char *name_base, bool savestate, if (!buffer) return false; - if (!video_driver_read_viewport(buffer)) + if (!video_driver_read_viewport(buffer, is_idle)) goto error; /* Data read from viewport is in bottom-up order, suitable for BMP. */ if (!screenshot_dump(name_base, buffer, vp.width, vp.height, - vp.width * 3, true, buffer, savestate, is_paused)) + vp.width * 3, true, buffer, savestate, is_idle, is_paused)) goto error; return true; @@ -305,7 +309,7 @@ error: #endif static bool take_screenshot_raw(const char *name_base, void *userbuf, - bool savestate, bool is_paused) + bool savestate, bool is_idle, bool is_paused) { size_t pitch; unsigned width, height; @@ -318,7 +322,7 @@ static bool take_screenshot_raw(const char *name_base, void *userbuf, */ if (!screenshot_dump(name_base, (const uint8_t*)data + (height - 1) * pitch, - width, height, -pitch, false, userbuf, savestate, is_paused)) + width, height, -pitch, false, userbuf, savestate, is_idle, is_paused)) return false; return true; @@ -347,14 +351,14 @@ static bool take_screenshot_choice(const char *name_base, bool savestate, if (!is_idle) video_driver_cached_frame(); #if defined(VITA) - return take_screenshot_raw(name_base, NULL, savestate, is_paused); + return take_screenshot_raw(name_base, NULL, savestate, is_idle, is_paused); #else - return take_screenshot_viewport(name_base, savestate, is_paused); + return take_screenshot_viewport(name_base, savestate, is_idle, is_paused); #endif } if (!video_driver_cached_frame_has_valid_framebuffer()) - return take_screenshot_raw(name_base, NULL, savestate, is_paused); + return take_screenshot_raw(name_base, NULL, savestate, is_idle, is_paused); if (!video_driver_supports_read_frame_raw()) return false; @@ -371,7 +375,7 @@ static bool take_screenshot_choice(const char *name_base, bool savestate, if (frame_data) { video_driver_set_cached_frame_ptr(frame_data); - if (take_screenshot_raw(name_base, frame_data, savestate, is_paused)) + if (take_screenshot_raw(name_base, frame_data, savestate, is_idle, is_paused)) ret = true; } From f770ea856018422241190cb245e46c0e19554e95 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 18:22:45 +0100 Subject: [PATCH 356/427] (movie.c) Try to be more safe in init_playback --- movie.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/movie.c b/movie.c index cda896b2f0..dc87fa4d38 100644 --- a/movie.c +++ b/movie.c @@ -110,14 +110,16 @@ static bool init_playback(bsv_movie_t *handle, const char *path) if (state_size) { - retro_ctx_serialize_info_t serial_info; retro_ctx_size_info_t info; + retro_ctx_serialize_info_t serial_info; + uint8_t *buf = (uint8_t*)malloc(state_size); - handle->state = (uint8_t*)malloc(state_size); - handle->state_size = state_size; - if (!handle->state) + if (!buf) return false; + handle->state = buf; + handle->state_size = state_size; + if (fread(handle->state, 1, state_size, handle->file) != state_size) { RARCH_ERR("%s\n", msg_hash_to_str(MSG_COULD_NOT_READ_STATE_FROM_MOVIE)); From 1ea3bea0eef85d795fadb0c3580406d96fa292aa Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 18:29:22 +0100 Subject: [PATCH 357/427] Don't pass video_info by value to context_driver init function --- gfx/common/drm_common.c | 4 ++-- gfx/common/drm_common.h | 2 +- gfx/drivers_context/android_ctx.c | 2 +- gfx/drivers_context/cgl_ctx.c | 2 +- gfx/drivers_context/cocoa_gl_ctx.m | 2 +- gfx/drivers_context/d3d_ctx.cpp | 2 +- gfx/drivers_context/drm_ctx.c | 2 +- gfx/drivers_context/emscriptenegl_ctx.c | 2 +- gfx/drivers_context/gdi_ctx.cpp | 2 +- gfx/drivers_context/gfx_null_ctx.c | 2 +- gfx/drivers_context/khr_display_ctx.c | 2 +- gfx/drivers_context/mali_fbdev_ctx.c | 2 +- gfx/drivers_context/opendingux_fbdev_ctx.c | 2 +- gfx/drivers_context/osmesa_ctx.c | 2 +- gfx/drivers_context/ps3_ctx.c | 2 +- gfx/drivers_context/qnx_ctx.c | 2 +- gfx/drivers_context/sdl_gl_ctx.c | 2 +- gfx/drivers_context/vc_egl_ctx.c | 2 +- gfx/drivers_context/vivante_fbdev_ctx.c | 2 +- gfx/drivers_context/wayland_ctx.c | 2 +- gfx/drivers_context/wgl_ctx.cpp | 2 +- gfx/drivers_context/x_ctx.c | 2 +- gfx/drivers_context/xegl_ctx.c | 2 +- gfx/video_context_driver.c | 2 +- gfx/video_context_driver.h | 2 +- 25 files changed, 26 insertions(+), 26 deletions(-) diff --git a/gfx/common/drm_common.c b/gfx/common/drm_common.c index e9ddf2e82e..b1d11ec999 100644 --- a/gfx/common/drm_common.c +++ b/gfx/common/drm_common.c @@ -64,11 +64,11 @@ bool drm_get_resources(int fd) return true; } -bool drm_get_connector(int fd, video_frame_info_t video_info) +bool drm_get_connector(int fd, video_frame_info_t *video_info) { unsigned i; unsigned monitor_index = 0; - unsigned monitor = MAX(video_info.monitor_index, 1); + unsigned monitor = MAX(video_info->monitor_index, 1); /* Enumerate all connectors. */ diff --git a/gfx/common/drm_common.h b/gfx/common/drm_common.h index 5a855f92be..e66e1c1704 100644 --- a/gfx/common/drm_common.h +++ b/gfx/common/drm_common.h @@ -53,7 +53,7 @@ void drm_setup(int fd); void drm_free(void); -bool drm_get_connector(int fd, video_frame_info_t video_info); +bool drm_get_connector(int fd, video_frame_info_t *video_info); static INLINE bool drm_wait_flip(int timeout) { diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index cc0b0eddf8..2d50909dcd 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -100,7 +100,7 @@ static void android_gfx_ctx_destroy(void *data) free(data); } -static void *android_gfx_ctx_init(video_frame_info_t video_info, void *video_driver) +static void *android_gfx_ctx_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_OPENGLES EGLint n, major, minor; diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 72dc6c5fc3..571476f4b7 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -275,7 +275,7 @@ static CGSSurfaceID attach_gl_context_to_window(CGLContextObj glCtx, return sid; } -static void *gfx_ctx_cgl_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_cgl_init(video_frame_info_t *video_info, void *video_driver) { CGError err; gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)calloc(1, sizeof(gfx_ctx_cgl_data_t)); diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index fa3c650e25..99b32e4022 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -213,7 +213,7 @@ void cocoagl_gfx_ctx_update(void) #endif } -static void *cocoagl_gfx_ctx_init(video_frame_info_t video_info, void *video_driver) +static void *cocoagl_gfx_ctx_init(video_frame_info_t *video_info, void *video_driver) { (void)video_driver; diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index b8bf02febd..d5716269c7 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -165,7 +165,7 @@ static bool gfx_ctx_d3d_bind_api(void *data, #endif } -static void *gfx_ctx_d3d_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_d3d_init(video_frame_info_t *video_info, void *video_driver) { win32_monitor_init(); diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 090d706234..3500443857 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -330,7 +330,7 @@ static void gfx_ctx_drm_destroy_resources(gfx_ctx_drm_data_t *drm) g_next_bo = NULL; } -static void *gfx_ctx_drm_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_drm_init(video_frame_info_t *video_info, void *video_driver) { int fd, i; unsigned monitor_index; diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 9052715e89..7a459c7a4d 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -99,7 +99,7 @@ static void gfx_ctx_emscripten_destroy(void *data) free(data); } -static void *gfx_ctx_emscripten_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_emscripten_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_EGL unsigned width, height; diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index 8f751d33c6..cb67ceab01 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -124,7 +124,7 @@ static void gfx_ctx_gdi_get_video_size(void *data, } } -static void *gfx_ctx_gdi_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_gdi_init(video_frame_info_t *video_info, void *video_driver) { WNDCLASSEX wndclass = {0}; diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 16ba9b7883..e4c1c7ea4d 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -108,7 +108,7 @@ static void gfx_ctx_null_bind_hw_render(void *data, bool enable) (void)enable; } -static void *gfx_ctx_null_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_null_init(video_frame_info_t *video_info, void *video_driver) { (void)video_driver; diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index 8d77a8a30f..d767a01c09 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -52,7 +52,7 @@ static void gfx_ctx_khr_display_get_video_size(void *data, *height = khr->height; } -static void *gfx_ctx_khr_display_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_khr_display_init(video_frame_info_t *video_info, void *video_driver) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)calloc(1, sizeof(*khr)); if (!khr) diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index cb1561ee9d..bc2d7c3a0e 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -87,7 +87,7 @@ static void gfx_ctx_mali_fbdev_get_video_size(void *data, *height = mali->height; } -static void *gfx_ctx_mali_fbdev_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_mali_fbdev_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_EGL EGLint n; diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 411221e5b4..5170be9065 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -55,7 +55,7 @@ static void gfx_ctx_opendingux_destroy(void *data) } } -static void *gfx_ctx_opendingux_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_opendingux_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_EGL EGLint n; diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index d9381a6d9f..2d064efd59 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -141,7 +141,7 @@ static void osmesa_fifo_write(gfx_ctx_osmesa_data_t *osmesa) } } -static void *osmesa_ctx_init(video_frame_info_t video_info, void *video_driver) +static void *osmesa_ctx_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_OSMESA_CREATE_CONTEXT_ATTRIBS const int attribs[] = { diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index d781046fb6..2cece19adb 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -197,7 +197,7 @@ static void gfx_ctx_ps3_get_video_size(void *data, #endif } -static void *gfx_ctx_ps3_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_ps3_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_PSGL PSGLdeviceParameters params; diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 670853b8a8..ce49599a23 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -72,7 +72,7 @@ static void gfx_ctx_qnx_destroy(void *data) free(data); } -static void *gfx_ctx_qnx_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_qnx_init(video_frame_info_t *video_info, void *video_driver) { EGLint n; EGLint major, minor; diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index c7c2dd5425..17711fe0d7 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -71,7 +71,7 @@ static void sdl_ctx_destroy_resources(gfx_ctx_sdl_data_t *sdl) SDL_QuitSubSystem(SDL_INIT_VIDEO); } -static void *sdl_ctx_init(video_frame_info_t video_info, void *video_driver) +static void *sdl_ctx_init(video_frame_info_t *video_info, void *video_driver) { gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*) calloc(1, sizeof(gfx_ctx_sdl_data_t)); diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index a7614353a6..5a05be5f96 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -136,7 +136,7 @@ static void gfx_ctx_vc_get_video_size(void *data, static void gfx_ctx_vc_destroy(void *data); -static void *gfx_ctx_vc_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_vc_init(video_frame_info_t *video_info, void *video_driver) { VC_DISPMANX_ALPHA_T alpha; EGLint n, major, minor; diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 422fc1feec..b271791571 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -58,7 +58,7 @@ static void gfx_ctx_vivante_destroy(void *data) } -static void *gfx_ctx_vivante_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_vivante_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_EGL EGLint n; diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 5f3d495702..b16f463d69 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -773,7 +773,7 @@ static bool gfx_ctx_wl_get_metrics(void *data, EGL_DEPTH_SIZE, 0 #endif -static void *gfx_ctx_wl_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_wl_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_OPENGL static const EGLint egl_attribs_gl[] = { diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 8b96d4e543..3f02ce7462 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -427,7 +427,7 @@ static void gfx_ctx_wgl_get_video_size(void *data, } } -static void *gfx_ctx_wgl_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_wgl_init(video_frame_info_t *video_info, void *video_driver) { WNDCLASSEX wndclass = {0}; diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index b9a1a94553..2092651680 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -401,7 +401,7 @@ static bool gfx_ctx_x_set_resize(void *data, return false; } -static void *gfx_ctx_x_init(video_frame_info_t video_info, void *data) +static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) { int nelements = 0; int major = 0; diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index f8b4bda4a1..2d54b26de0 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -91,7 +91,7 @@ EGL_BLUE_SIZE, 1, \ EGL_ALPHA_SIZE, 0, \ EGL_DEPTH_SIZE, 0 -static void *gfx_ctx_xegl_init(video_frame_info_t video_info, void *video_driver) +static void *gfx_ctx_xegl_init(video_frame_info_t *video_info, void *video_driver) { #ifdef HAVE_EGL static const EGLint egl_attribs_gl[] = { diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 8fba6894a2..c0617944d8 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -191,7 +191,7 @@ static const gfx_ctx_driver_t *video_context_driver_init( video_driver_build_info(&video_info); - ctx_data = ctx->init(video_info, data); + ctx_data = ctx->init(&video_info, data); if (!ctx_data) return NULL; diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 660a953e12..65dadf11f8 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -67,7 +67,7 @@ typedef struct gfx_ctx_driver * to hold a pointer to it as the context never outlives the video driver. * * The context driver is responsible for it's own data.*/ - void* (*init)(video_frame_info_t video_info, void *video_driver); + void* (*init)(video_frame_info_t *video_info, void *video_driver); void (*destroy)(void *data); /* Which API to bind to. */ From 33cc168eb9e689415ba943d392a978689cd988ff Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 12:29:29 -0500 Subject: [PATCH 358/427] allow connecting to lobby port instead of the port in settings --- command.c | 8 ++++++-- menu/cbs/menu_cbs_ok.c | 2 ++ network/netplay/netplay_frontend.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/command.c b/command.c index c40d703ea5..bfcf708684 100644 --- a/command.c +++ b/command.c @@ -2443,12 +2443,16 @@ bool command_event(enum event_command cmd, void *data) break; case CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED: { - char *hostname = (char *) data; + /* buf is expected to be address:port, there must be a better way + to do this but for now I'll just use a string list */ + char *buf = (char *) data; + static struct string_list *hostname = NULL; + hostname = string_split(buf, ":"); settings_t *settings = config_get_ptr(); command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); if (!init_netplay_deferred( - hostname, settings->netplay.port)) + hostname->elems[0].data, atoi(hostname->elems[1].data))) { command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); return false; diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index cbfdbc6e6b..0abace4aa6 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3130,6 +3130,8 @@ static int action_ok_netplay_connect_room(const char *path, /* For testing purposes strlcpy(tmp_hostname, "192.168.1.241", sizeof(tmp_hostname));*/ strlcpy(tmp_hostname, netplay_room_list[idx - 1].address, sizeof(tmp_hostname)); + snprintf(tmp_hostname, sizeof(tmp_hostname), "%s:%d", + netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); /* If we haven't yet started, this will load on its own */ if (!content_is_inited()) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 619d7f3ca4..09c9211591 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -947,7 +947,7 @@ bool init_netplay(void *direct_host, const char *server, unsigned port) netplay_data = (netplay_t*)netplay_new( netplay_is_client ? direct_host : NULL, netplay_is_client ? (!netplay_client_deferred ? server : server_address_deferred) : NULL, - port ? port : RARCH_DEFAULT_PORT, + port ? ( !netplay_client_deferred ? port : server_port_deferred) : RARCH_DEFAULT_PORT, settings->netplay.stateless_mode, settings->netplay.check_frames, &cbs, settings->netplay.nat_traversal, settings->username, quirks); From 5e7d9affe34cdd7221d5331ba33cd3dca092c5e4 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 12:33:14 -0500 Subject: [PATCH 359/427] free netplay_room_list before allocating again --- menu/cbs/menu_cbs_ok.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 0abace4aa6..b219bbba07 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3349,6 +3349,9 @@ finish: room_data = string_split(buf, "\n"); + if (netplay_room_list) + free(netplay_room_list); + netplay_room_count = room_data->size / 8; netplay_room_list = (struct netplay_room*)malloc(sizeof(struct netplay_room) * netplay_room_count); From 469aed2e0f628eedd297a619a3256bf1104dc5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 22 Jan 2017 18:39:19 +0100 Subject: [PATCH 360/427] Improve the task, with hostname and corename --- menu/cbs/menu_cbs_ok.c | 9 ++------- tasks/task_netplay_crc.c | 34 +++++++++++++++++++++++++++++++--- tasks/tasks_internal.h | 3 ++- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index b219bbba07..0cde92d32f 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3136,13 +3136,8 @@ static int action_ok_netplay_connect_room(const char *path, /* If we haven't yet started, this will load on its own */ if (!content_is_inited()) { - runloop_msg_queue_push( - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED), - 1, 480, true); - /* Enable Netplay itself */ - - if (!command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, (void *) tmp_hostname)) - return -1; + task_push_netplay_crc_scan(netplay_room_list[idx - 1].gamecrc, + tmp_hostname, netplay_room_list[idx - 1].corename); } else { diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 22ae3484b6..0b3a08ec8d 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -31,17 +31,35 @@ #include "../verbosity.h" #include "../configuration.h" #include "../playlist.h" +#include "../command.h" typedef struct { struct string_list *lpl_list; char crc[PATH_MAX_LENGTH]; + char path[PATH_MAX_LENGTH]; + char hostname[512]; + char corename[PATH_MAX_LENGTH]; + bool found; } netplay_crc_handle_t; static void netplay_crc_scan_callback(void *task_data, void *user_data, const char *error) { printf("CALLBACK\n"); + + netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; + + if (!state) + return; + + printf("%s\n", state->hostname); + printf("%s\n", state->path); + printf("%s\n", state->corename); + + command_event(CMD_EVENT_NETPLAY_INIT, state->hostname); + + free(state); } static void task_netplay_crc_scan_handler(retro_task_t *task) @@ -81,11 +99,13 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) printf("%s\n", playlist->entries[j].crc32); if (string_is_equal(playlist->entries[j].crc32, "6BE4CA95|crc")) { + strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); + state->found = true; + task_set_data(task, state); task_set_progress(task, 100); task_set_title(task, strdup("Game found.")); task_set_finished(task, true); string_list_free(state->lpl_list); - free(state); return; } @@ -98,11 +118,11 @@ no_playlists: task_set_progress(task, 100); task_set_title(task, strdup("No game found.")); task_set_finished(task, true); - free(state); return; } -bool task_push_netplay_crc_scan(uint32_t crc) +bool task_push_netplay_crc_scan(uint32_t crc, + const char *hostname, const char *corename) { settings_t *settings = config_get_ptr(); retro_task_t *task = (retro_task_t *)calloc(1, sizeof(*task)); @@ -114,9 +134,17 @@ bool task_push_netplay_crc_scan(uint32_t crc) state->crc[0] = '\0'; snprintf(state->crc, sizeof(state->crc), "%08X|crc", crc); + state->hostname[0] = '\0'; + snprintf(state->hostname, sizeof(state->hostname), "%s", hostname); + + state->corename[0] = '\0'; + snprintf(state->corename, sizeof(state->corename), "%s", corename); + state->lpl_list = dir_list_new(settings->directory.playlist, NULL, true, true, true, false); + state->found = false; + /* blocking means no other task can run while this one is running, * which is the default */ task->type = TASK_TYPE_BLOCKING; diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 51bbfea46f..2da59a4eb0 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -98,7 +98,8 @@ bool task_push_wifi_scan(void); bool task_push_netplay_lan_scan(void); -bool task_push_netplay_crc_scan(uint32_t crc); +bool task_push_netplay_crc_scan(uint32_t crc, + const char *hostname, const char *corename); #endif From 680d281cb94d52b956f20f342e04b91d1aab122e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sun, 22 Jan 2017 18:53:33 +0100 Subject: [PATCH 361/427] Unhardcode CRC --- tasks/task_netplay_crc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 0b3a08ec8d..8b05bff0b8 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -97,7 +97,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) for (j = 0; j < playlist->size; j++) { printf("%s\n", playlist->entries[j].crc32); - if (string_is_equal(playlist->entries[j].crc32, "6BE4CA95|crc")) + if (string_is_equal(playlist->entries[j].crc32, state->crc)) { strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); state->found = true; From a0e6a24f38a40d1e0a06d46500001aeb5b9aabee Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 13:07:30 -0500 Subject: [PATCH 362/427] use deferred netplay init --- menu/cbs/menu_cbs_ok.c | 2 +- network/netplay/netplay_frontend.c | 2 -- tasks/task_netplay_crc.c | 5 +---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 0cde92d32f..a403645904 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3132,7 +3132,7 @@ static int action_ok_netplay_connect_room(const char *path, strlcpy(tmp_hostname, netplay_room_list[idx - 1].address, sizeof(tmp_hostname)); snprintf(tmp_hostname, sizeof(tmp_hostname), "%s:%d", netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); - + RARCH_LOG("%s %s %08x", netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].gamename, netplay_room_list[idx - 1].gamecrc); /* If we haven't yet started, this will load on its own */ if (!content_is_inited()) { diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 09c9211591..f63c178155 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -164,8 +164,6 @@ static bool get_self_input_state(netplay_t *netplay) bool init_netplay_deferred(const char* server, unsigned port) { - - RARCH_LOG("deferred! %s\n", server); if (!string_is_empty(server) && port != 0) { strlcpy(server_address_deferred, server, sizeof(server_address_deferred)); diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 8b05bff0b8..47fbf7d32e 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -46,8 +46,6 @@ typedef struct static void netplay_crc_scan_callback(void *task_data, void *user_data, const char *error) { - printf("CALLBACK\n"); - netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; if (!state) @@ -56,8 +54,7 @@ static void netplay_crc_scan_callback(void *task_data, printf("%s\n", state->hostname); printf("%s\n", state->path); printf("%s\n", state->corename); - - command_event(CMD_EVENT_NETPLAY_INIT, state->hostname); + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); free(state); } From fc68abebddb801535219968b72489811cbe0c5c7 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 13:39:27 -0500 Subject: [PATCH 363/427] find the core from core_info --- tasks/task_netplay_crc.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 47fbf7d32e..76bc184a3f 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -32,6 +32,7 @@ #include "../configuration.h" #include "../playlist.h" #include "../command.h" +#include "../core_info.h" typedef struct { @@ -47,13 +48,24 @@ static void netplay_crc_scan_callback(void *task_data, void *user_data, const char *error) { netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; + core_info_list_t *info = NULL; + int i; + core_info_get_list(&info); if (!state) return; - printf("%s\n", state->hostname); - printf("%s\n", state->path); - printf("%s\n", state->corename); + for (i=0; i < info->count; i++) + { + if(string_is_equal(info->list[i].core_name, state->corename)) + break; + } + + printf("Hostname: %s\n", state->hostname); + printf("Content: %s\n", state->path); + printf("Corename: %s\n", state->corename); + printf("Corepath: %s\n", info->list[i].path); + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); free(state); From d96ea42be7c59a62cbc440a4c67bde5f237f5ac7 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 13:47:10 -0500 Subject: [PATCH 364/427] add back UTF8 BOM to fix msvc builds --- intl/msg_hash_chs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intl/msg_hash_chs.c b/intl/msg_hash_chs.c index 56e0651fc3..cdc0cee8ce 100644 --- a/intl/msg_hash_chs.c +++ b/intl/msg_hash_chs.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. +/* RetroArch - A frontend for libretro. * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch is free software: you can redistribute it and/or modify it under the terms From a2d37adc5303dae742afa341480bff7024265a10 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 13:47:56 -0500 Subject: [PATCH 365/427] Windows 95 does not have GetFileAttributesEx --- libretro-common/file/retro_stat.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/libretro-common/file/retro_stat.c b/libretro-common/file/retro_stat.c index f792613f0d..372cbde020 100644 --- a/libretro-common/file/retro_stat.c +++ b/libretro-common/file/retro_stat.c @@ -30,6 +30,7 @@ #ifdef _MSC_VER #define setmode _setmode #endif +#include #ifdef _XBOX #include #define INVALID_FILE_ATTRIBUTES -1 @@ -101,12 +102,12 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) if (cellFsStat(path, &buf) < 0) return false; #elif defined(_WIN32) - WIN32_FILE_ATTRIBUTE_DATA file_info; - GET_FILEEX_INFO_LEVELS fInfoLevelId = GetFileExInfoStandard; + DWORD file_info = GetFileAttributes(path); + struct _stat buf; - DWORD ret = GetFileAttributesEx(path, fInfoLevelId, &file_info); + _stat(path, &buf); - if (ret == 0) + if (file_info == INVALID_FILE_ATTRIBUTES) return false; #else struct stat buf; @@ -114,13 +115,8 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) return false; #endif -#if defined(_WIN32) - if (size) - *size = file_info.nFileSizeLow; -#else if (size) *size = buf.st_size; -#endif switch (mode) { @@ -130,7 +126,7 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) #elif defined(__CELLOS_LV2__) return ((buf.st_mode & S_IFMT) == S_IFDIR); #elif defined(_WIN32) - return (file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + return (file_info & FILE_ATTRIBUTE_DIRECTORY); #else return S_ISDIR(buf.st_mode); #endif From b9eb1c0222d6dd87dc1b4c905ed56403e778c01f Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 13:48:45 -0500 Subject: [PATCH 366/427] add NoAccel configs in msvc2005 that disable GL and D3D --- pkg/msvc/RetroArch-msvc2005.sln | 6 + pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj | 174 +++++++++++++++++++ 2 files changed, 180 insertions(+) diff --git a/pkg/msvc/RetroArch-msvc2005.sln b/pkg/msvc/RetroArch-msvc2005.sln index 8fd5a544c9..e1e948b204 100644 --- a/pkg/msvc/RetroArch-msvc2005.sln +++ b/pkg/msvc/RetroArch-msvc2005.sln @@ -4,12 +4,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RetroArch-msvc2005", "msvc- EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug NoAccel|Win32 = Debug NoAccel|Win32 Debug|Win32 = Debug|Win32 + Release NoAccel|Win32 = Release NoAccel|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Debug NoAccel|Win32.ActiveCfg = Debug NoAccel|Win32 + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Debug NoAccel|Win32.Build.0 = Debug NoAccel|Win32 {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Debug|Win32.ActiveCfg = Debug|Win32 {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Debug|Win32.Build.0 = Debug|Win32 + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Release NoAccel|Win32.ActiveCfg = Release NoAccel|Win32 + {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Release NoAccel|Win32.Build.0 = Release NoAccel|Win32 {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Release|Win32.ActiveCfg = Release|Win32 {1FEFA874-F6A6-4CE6-9DB4-3B291A364CE5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection diff --git a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj index 6ccefc1c91..159f0092a5 100644 --- a/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj +++ b/pkg/msvc/msvc-2005/RetroArch-msvc2005.vcproj @@ -173,6 +173,164 @@ Name="VCPostBuildEventTool" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -201,6 +359,22 @@ CompileAs="2" /> + + + + + + Date: Sun, 22 Jan 2017 13:51:10 -0500 Subject: [PATCH 367/427] caca: don't leave X coord uninitialized with unknown font alignment --- gfx/drivers_font/caca_font.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_font/caca_font.c b/gfx/drivers_font/caca_font.c index 05b2d6185e..349bd7ab1a 100644 --- a/gfx/drivers_font/caca_font.c +++ b/gfx/drivers_font/caca_font.c @@ -112,16 +112,15 @@ static void caca_render_msg(video_frame_info_t *video_info, switch (align) { - case TEXT_ALIGN_LEFT: - newX = x * width * scale; - break; case TEXT_ALIGN_RIGHT: newX = (x * width * scale) - strlen(msg); break; case TEXT_ALIGN_CENTER: newX = (x * width * scale) - (strlen(msg) / 2); break; + case TEXT_ALIGN_LEFT: default: + newX = x * width * scale; break; } From c8081bc3df9cf16da66fa401a762f5138f059f66 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 13:52:35 -0500 Subject: [PATCH 368/427] it loads now --- tasks/task_netplay_crc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 76bc184a3f..16f7ba0da7 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -49,6 +49,8 @@ static void netplay_crc_scan_callback(void *task_data, { netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; core_info_list_t *info = NULL; + content_ctx_info_t content_info = {0}; + int i; core_info_get_list(&info); @@ -67,6 +69,12 @@ static void netplay_crc_scan_callback(void *task_data, printf("Corepath: %s\n", info->list[i].path); command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); + task_push_content_load_default( + info->list[i].path, state->path, + &content_info, + CORE_TYPE_PLAIN, + CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, + NULL, NULL); free(state); } From 4feab7a268fc75e9e169f2c5c2a980c211c7898f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 20:04:58 +0100 Subject: [PATCH 369/427] (trans_stream_zlib.c) Add some early returns in case it's a NULL pointer --- libretro-common/streams/trans_stream_zlib.c | 27 ++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/libretro-common/streams/trans_stream_zlib.c b/libretro-common/streams/trans_stream_zlib.c index ba2d995a69..81e3612625 100644 --- a/libretro-common/streams/trans_stream_zlib.c +++ b/libretro-common/streams/trans_stream_zlib.c @@ -60,6 +60,8 @@ static void zlib_deflate_stream_free(void *data) static void zlib_inflate_stream_free(void *data) { struct zlib_trans_stream *z = (struct zlib_trans_stream *) data; + if (!z) + return; if (z->inited) inflateEnd(&z->z); free(z); @@ -90,8 +92,13 @@ static bool zlib_inflate_define(void *data, const char *prop, uint32_t val) static void zlib_deflate_set_in(void *data, const uint8_t *in, uint32_t in_size) { struct zlib_trans_stream *z = (struct zlib_trans_stream *) data; - z->z.next_in = (uint8_t *) in; - z->z.avail_in = in_size; + + if (!z) + return; + + z->z.next_in = (uint8_t *) in; + z->z.avail_in = in_size; + if (!z->inited) { deflateInit(&z->z, z->ex); @@ -102,8 +109,12 @@ static void zlib_deflate_set_in(void *data, const uint8_t *in, uint32_t in_size) static void zlib_inflate_set_in(void *data, const uint8_t *in, uint32_t in_size) { struct zlib_trans_stream *z = (struct zlib_trans_stream *) data; - z->z.next_in = (uint8_t *) in; - z->z.avail_in = in_size; + + if (!z) + return; + + z->z.next_in = (uint8_t *) in; + z->z.avail_in = in_size; if (!z->inited) { inflateInit2(&z->z, z->ex); @@ -114,8 +125,12 @@ static void zlib_inflate_set_in(void *data, const uint8_t *in, uint32_t in_size) static void zlib_set_out(void *data, uint8_t *out, uint32_t out_size) { struct zlib_trans_stream *z = (struct zlib_trans_stream *) data; - z->z.next_out = out; - z->z.avail_out = out_size; + + if (!z) + return; + + z->z.next_out = out; + z->z.avail_out = out_size; } static bool zlib_deflate_trans( From 67f850c3dc5594597792b46205437ffde3b9a018 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 20:06:11 +0100 Subject: [PATCH 370/427] Prevent another NULL pointer dereference --- libretro-common/streams/memory_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/streams/memory_stream.c b/libretro-common/streams/memory_stream.c index 81c666fa3f..31f0457895 100644 --- a/libretro-common/streams/memory_stream.c +++ b/libretro-common/streams/memory_stream.c @@ -41,7 +41,7 @@ struct memstream static void memstream_update_pos(memstream_t *stream) { - if (stream->ptr > stream->max_ptr) + if (stream && stream->ptr > stream->max_ptr) stream->max_ptr = stream->ptr; } From 7c722fca9aea2df75af319268a34ce8ef3b9ce23 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 20:30:47 +0100 Subject: [PATCH 371/427] (nbio_stdio.c) Try to prevent 'argument cannot be negative' coverity warning --- libretro-common/file/nbio/nbio_stdio.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/libretro-common/file/nbio/nbio_stdio.c b/libretro-common/file/nbio/nbio_stdio.c index 6e2a2f6f34..826d7a496d 100644 --- a/libretro-common/file/nbio/nbio_stdio.c +++ b/libretro-common/file/nbio/nbio_stdio.c @@ -23,7 +23,9 @@ static const char * modes[]={ "rb", "wb", "r+b", "rb", "wb", "r+b" }; struct nbio_t* nbio_open(const char * filename, unsigned mode) { + void *buf = NULL; struct nbio_t* handle = NULL; + size_t len = 0; FILE* f = fopen(filename, modes[mode]); if (!f) return NULL; @@ -34,7 +36,6 @@ struct nbio_t* nbio_open(const char * filename, unsigned mode) goto error; handle->f = f; - handle->len = 0; switch (mode) { @@ -43,16 +44,20 @@ struct nbio_t* nbio_open(const char * filename, unsigned mode) break; default: fseek(handle->f, 0, SEEK_END); - handle->len = ftell(handle->f); + len = ftell(handle->f); break; } handle->mode = mode; - handle->data = malloc(handle->len); - if (handle->len && !handle->data) + if (len) + buf = malloc(len); + + if (!buf) goto error; + handle->data = buf; + handle->len = len; handle->progress = handle->len; handle->op = -2; @@ -60,13 +65,7 @@ struct nbio_t* nbio_open(const char * filename, unsigned mode) error: if (handle) - { - if (handle->data) - free(handle->data); - handle->data = NULL; free(handle); - } - handle = NULL; fclose(f); return NULL; } From 36b2c48cb55e8720a0766c49810a516f8b2773af Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 21:19:39 +0100 Subject: [PATCH 372/427] Fix CXX_BUILD --- menu/cbs/menu_cbs_ok.c | 65 ++++++++++++++++++++--------- network/netplay/netplay_discovery.c | 8 +++- network/netplay/netplay_discovery.h | 26 ++++++------ 3 files changed, 66 insertions(+), 33 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 1c19c249ac..6f7dfb117a 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3121,20 +3121,30 @@ static int action_ok_netplay_connect_room(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { #ifdef HAVE_NETWORKING + char tmp_hostname[512]; settings_t *settings = config_get_ptr(); + tmp_hostname[0] = '\0'; + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); - char tmp_hostname[512]; - /* For testing purposes strlcpy(tmp_hostname, "192.168.1.241", sizeof(tmp_hostname));*/ - strlcpy(tmp_hostname, netplay_room_list[idx - 1].address, sizeof(tmp_hostname)); - snprintf(tmp_hostname, sizeof(tmp_hostname), "%s:%d", - netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); - RARCH_LOG("%s %s %08x", netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].gamename, netplay_room_list[idx - 1].gamecrc); + strlcpy(tmp_hostname, + netplay_room_list[idx - 1].address, + sizeof(tmp_hostname)); + snprintf(tmp_hostname, + sizeof(tmp_hostname), + "%s:%d", + netplay_room_list[idx - 1].address, + netplay_room_list[idx - 1].port); + + RARCH_LOG("%s %s %08x", netplay_room_list[idx - 1].address, + netplay_room_list[idx - 1].gamename, + netplay_room_list[idx - 1].gamecrc); + /* If we haven't yet started, this will load on its own */ if (!content_is_inited()) { @@ -3211,8 +3221,8 @@ static int action_ok_netplay_lan_scan(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { #ifdef HAVE_NETWORKING - struct netplay_host_list *hosts; - struct netplay_host *host; + struct netplay_host_list *hosts = NULL; + struct netplay_host *host = NULL; /* Figure out what host we're connecting to */ if (!netplay_discovery_driver_ctl(RARCH_NETPLAY_DISCOVERY_CTL_LAN_GET_RESPONSES, &hosts)) @@ -3311,6 +3321,7 @@ static int action_ok_push_scan_file(const char *path, return action_ok_push_content_list(path, label, type, idx, entry_idx); } +#ifdef HAVE_NETWORKING static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const char *err) { char buf[PATH_MAX_LENGTH]; @@ -3340,8 +3351,8 @@ finish: int i, j = 0; char tmp[PATH_MAX_LENGTH]; static struct string_list *room_data = NULL; - file_list_t *file_list = NULL; - file_list = menu_entries_get_selection_buf_ptr(0); + file_list_t *file_list = menu_entries_get_selection_buf_ptr(0); + menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, file_list); room_data = string_split(buf, "\n"); @@ -3350,15 +3361,18 @@ finish: free(netplay_room_list); netplay_room_count = room_data->size / 8; - netplay_room_list = (struct netplay_room*)malloc(sizeof(struct netplay_room) * netplay_room_count); + netplay_room_list = (struct netplay_room*) + malloc(sizeof(struct netplay_room) * netplay_room_count); - /*for (int i = 0; i < room_data->size; i++) +#if 0 + for (int i = 0; i < room_data->size; i++) { strlcpy(tmp, room_data->elems[i].data, sizeof(tmp)); RARCH_LOG("tmp %s\n", tmp); - }*/ + } +#endif menu_entries_append_enum(file_list, "Refresh Room List", msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS), @@ -3368,11 +3382,22 @@ finish: RARCH_LOG ("Found %d rooms\n", netplay_room_count); for (i = 0; i < netplay_room_count; i++) { - strlcpy(netplay_room_list[i].nickname, room_data->elems[j + 0].data, sizeof(netplay_room_list[i].nickname)); - strlcpy(netplay_room_list[i].address, room_data->elems[j + 1].data, sizeof(netplay_room_list[i].address)); - strlcpy(netplay_room_list[i].corename, room_data->elems[j + 3].data, sizeof(netplay_room_list[i].corename)); - strlcpy(netplay_room_list[i].coreversion, room_data->elems[j + 4].data, sizeof(netplay_room_list[i].coreversion)); - strlcpy(netplay_room_list[i].gamename, room_data->elems[j + 5].data, sizeof(netplay_room_list[i].coreversion)); + strlcpy(netplay_room_list[i].nickname, + room_data->elems[j + 0].data, + sizeof(netplay_room_list[i].nickname)); + strlcpy(netplay_room_list[i].address, + room_data->elems[j + 1].data, + sizeof(netplay_room_list[i].address)); + strlcpy(netplay_room_list[i].corename, + room_data->elems[j + 3].data, + sizeof(netplay_room_list[i].corename)); + strlcpy(netplay_room_list[i].coreversion, + room_data->elems[j + 4].data, + sizeof(netplay_room_list[i].coreversion)); + strlcpy(netplay_room_list[i].gamename, + room_data->elems[j + 5].data, + sizeof(netplay_room_list[i].coreversion)); + netplay_room_list[i].port = atoi(room_data->elems[j + 2].data); netplay_room_list[i].gamecrc = atoi(room_data->elems[j + 6].data); netplay_room_list[i].timestamp = atoi(room_data->elems[j + 7].data); @@ -3396,7 +3421,8 @@ finish: netplay_room_list[i].timestamp); j+=8; char s[PATH_MAX_LENGTH]; - snprintf(s, sizeof(s), "Nickname: %s", netplay_room_list[i].nickname); + snprintf(s, sizeof(s), "Nickname: %s", + netplay_room_list[i].nickname); menu_entries_append_enum(file_list, s, msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), @@ -3429,6 +3455,7 @@ static int action_ok_push_netplay_refresh_rooms(const char *path, task_push_http_transfer(url, true, NULL, netplay_refresh_rooms_cb, NULL); return 0; } +#endif static int action_ok_scan_directory_list(const char *path, diff --git a/network/netplay/netplay_discovery.c b/network/netplay/netplay_discovery.c index baf536bb7c..a6c3429d27 100644 --- a/network/netplay/netplay_discovery.c +++ b/network/netplay/netplay_discovery.c @@ -63,8 +63,12 @@ struct ad_packet bool netplay_lan_ad_client(void); /* LAN discovery sockets */ -static int lan_ad_server_fd = -1; -static int lan_ad_client_fd = -1; +static int lan_ad_server_fd = -1; +static int lan_ad_client_fd = -1; + +int netplay_room_count = 0; + +struct netplay_room *netplay_room_list = NULL; /* Packet buffer for advertisement and responses */ static struct ad_packet ad_packet_buffer; diff --git a/network/netplay/netplay_discovery.h b/network/netplay/netplay_discovery.h index 2eec52aafe..e3254c94a3 100644 --- a/network/netplay/netplay_discovery.h +++ b/network/netplay/netplay_discovery.h @@ -30,19 +30,21 @@ enum rarch_netplay_discovery_ctl_state RARCH_NETPLAY_DISCOVERY_CTL_LAN_CLEAR_RESPONSES }; -struct netplay_host { - struct sockaddr addr; - socklen_t addrlen; +struct netplay_host +{ + struct sockaddr addr; + socklen_t addrlen; - char nick[NETPLAY_HOST_STR_LEN]; - char core[NETPLAY_HOST_STR_LEN]; - char core_version[NETPLAY_HOST_STR_LEN]; - char content[NETPLAY_HOST_STR_LEN]; + char nick[NETPLAY_HOST_STR_LEN]; + char core[NETPLAY_HOST_STR_LEN]; + char core_version[NETPLAY_HOST_STR_LEN]; + char content[NETPLAY_HOST_STR_LEN]; }; -struct netplay_host_list { - struct netplay_host *hosts; - size_t size; +struct netplay_host_list +{ + struct netplay_host *hosts; + size_t size; }; /* data is ordered like this on the server, I left it in this ordered @@ -59,9 +61,9 @@ struct netplay_room int timestamp; }; -struct netplay_room *netplay_room_list; +extern struct netplay_room *netplay_room_list; -int netplay_room_count; +extern int netplay_room_count; /** Initialize Netplay discovery */ bool init_netplay_discovery(void); From 178d959cad33f1a630f2e5d86411f1943d70cbc7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 21:24:57 +0100 Subject: [PATCH 373/427] Fix C89_BUILD --- command.c | 6 ++++-- menu/cbs/menu_cbs_ok.c | 5 ++++- menu/cbs/menu_cbs_sublabel.c | 4 +++- menu/menu_displaylist.c | 9 ++++++--- network/netplay/netplay_frontend.c | 8 +++++--- tasks/task_netplay_crc.c | 23 ++++++++--------------- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/command.c b/command.c index bbc61603a2..99fcbb0a84 100644 --- a/command.c +++ b/command.c @@ -2453,12 +2453,14 @@ bool command_event(enum event_command cmd, void *data) { /* buf is expected to be address:port, there must be a better way to do this but for now I'll just use a string list */ - char *buf = (char *) data; + char *buf = (char *)data; static struct string_list *hostname = NULL; + settings_t *settings = config_get_ptr(); + hostname = string_split(buf, ":"); - settings_t *settings = config_get_ptr(); command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + if (!init_netplay_deferred( hostname->elems[0].data, atoi(hostname->elems[1].data))) { diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 6f7dfb117a..ba05aa082c 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3350,6 +3350,7 @@ finish: { int i, j = 0; char tmp[PATH_MAX_LENGTH]; + char s[PATH_MAX_LENGTH]; static struct string_list *room_data = NULL; file_list_t *file_list = menu_entries_get_selection_buf_ptr(0); @@ -3419,10 +3420,12 @@ finish: netplay_room_list[i].gamename, netplay_room_list[i].gamecrc, netplay_room_list[i].timestamp); + j+=8; - char s[PATH_MAX_LENGTH]; + snprintf(s, sizeof(s), "Nickname: %s", netplay_room_list[i].nickname); + menu_entries_append_enum(file_list, s, msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index cc9cb3ac92..816a58f4f1 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -156,7 +156,9 @@ static int action_bind_sublabel_netplay_room( snprintf(s,len, "%s (%s)\n%s (%08x)", netplay_room_list[i - 1].corename, netplay_room_list[i - 1].coreversion, netplay_room_list[i - 1].gamename, netplay_room_list[i - 1].gamecrc); - //strlcpy(s, netplay_room_list[i - 1].corename, len); +#if 0 + strlcpy(s, netplay_room_list[i - 1].corename, len); +#endif return 0; } diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 18ade8a5cf..27392939bc 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2961,10 +2961,13 @@ static int menu_displaylist_parse_netplay_room_list( for (i = 0; i < netplay_room_count; i++) { char s[PATH_MAX_LENGTH]; - snprintf(s, sizeof(s), "Nickname: %s", netplay_room_list[i].nickname); - const char *label = s; + + s[0] = '\0'; + + snprintf(s, sizeof(s), + "Nickname: %s", netplay_room_list[i].nickname); menu_entries_append_enum(info->list, - label, + s, msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM), MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM, MENU_WIFI, 0, 0); diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index fc5dc88c7a..61316177ac 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -425,14 +425,16 @@ static void netplay_announce_cb(void *task_data, void *user_data, const char *er static void netplay_announce() { + char buf [2048]; + char url [2048] = "http://lobby.libretro.com/raw/?"; rarch_system_info_t *system = NULL; settings_t *settings = config_get_ptr(); - uint32_t *content_crc_ptr = NULL; + uint32_t *content_crc_ptr = NULL; + content_get_crc(&content_crc_ptr); runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); - char url [2048] = "http://lobby.libretro.com/raw/?"; - char buf [2048]; + buf[0] = '\0'; snprintf(buf, sizeof(buf), "%susername=%s&corename=%s&coreversion=%s&" diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index 16f7ba0da7..a497b90d58 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -47,11 +47,11 @@ typedef struct static void netplay_crc_scan_callback(void *task_data, void *user_data, const char *error) { - netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; - core_info_list_t *info = NULL; + int i; + netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; + core_info_list_t *info = NULL; content_ctx_info_t content_info = {0}; - int i; core_info_get_list(&info); if (!state) @@ -63,11 +63,6 @@ static void netplay_crc_scan_callback(void *task_data, break; } - printf("Hostname: %s\n", state->hostname); - printf("Content: %s\n", state->path); - printf("Corename: %s\n", state->corename); - printf("Corepath: %s\n", info->list[i].path); - command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); task_push_content_load_default( info->list[i].path, state->path, @@ -81,8 +76,8 @@ static void netplay_crc_scan_callback(void *task_data, static void task_netplay_crc_scan_handler(retro_task_t *task) { - netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; size_t i, j; + netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; task_set_progress(task, 0); task_set_title(task, strdup("Checking for ROM presence.")); @@ -102,18 +97,16 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) for (i = 0; i < state->lpl_list->size; i++) { + playlist_t *playlist = NULL; const char *lpl_path = state->lpl_list->elems[i].data; if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) continue; - printf("%s\n", lpl_path); - - playlist_t *playlist = playlist_init(lpl_path, 99999); + playlist = playlist_init(lpl_path, 99999); for (j = 0; j < playlist->size; j++) { - printf("%s\n", playlist->entries[j].crc32); if (string_is_equal(playlist->entries[j].crc32, state->crc)) { strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); @@ -141,8 +134,8 @@ no_playlists: bool task_push_netplay_crc_scan(uint32_t crc, const char *hostname, const char *corename) { - settings_t *settings = config_get_ptr(); - retro_task_t *task = (retro_task_t *)calloc(1, sizeof(*task)); + settings_t *settings = config_get_ptr(); + retro_task_t *task = (retro_task_t *)calloc(1, sizeof(*task)); netplay_crc_handle_t *state = (netplay_crc_handle_t*)calloc(1, sizeof(*state)); if (!task || !state) From 2f7f8b01c9e33491a865d339805dbc116bfc6a04 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 21:25:35 +0100 Subject: [PATCH 374/427] Cleanups --- command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command.c b/command.c index 99fcbb0a84..61d2a97108 100644 --- a/command.c +++ b/command.c @@ -2425,9 +2425,11 @@ bool command_event(enum event_command cmd, void *data) break; case CMD_EVENT_NETPLAY_INIT: { - char *hostname = (char *) data; + char *hostname = (char *) data; settings_t *settings = config_get_ptr(); + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + if (!init_netplay( NULL, hostname ? hostname : settings->netplay.server, settings->netplay.port)) @@ -2440,7 +2442,9 @@ bool command_event(enum event_command cmd, void *data) case CMD_EVENT_NETPLAY_INIT_DIRECT: { settings_t *settings = config_get_ptr(); + command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); + if (!init_netplay( data, NULL, settings->netplay.port)) { From b462e0aaf056be0a93bf2eaec751acdd2f83f8de Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 21:27:36 +0100 Subject: [PATCH 375/427] Fix non-HAVE_NETWORKING targets --- menu/cbs/menu_cbs_ok.c | 2 ++ menu/cbs/menu_cbs_sublabel.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index ba05aa082c..1bacae0650 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -4184,9 +4184,11 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_SCAN_FILE: BIND_ACTION_OK(cbs, action_ok_push_scan_file); break; +#ifdef HAVE_NETWORKING case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS: BIND_ACTION_OK(cbs, action_ok_push_netplay_refresh_rooms); break; +#endif case MENU_ENUM_LABEL_FAVORITES: BIND_ACTION_OK(cbs, action_ok_push_content_list); break; diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index 816a58f4f1..c065abce9c 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -144,6 +144,7 @@ static int action_bind_sublabel_cheevos_entry( return 0; } +#ifdef HAVE_NETWORKING static int action_bind_sublabel_netplay_room( file_list_t *list, unsigned type, unsigned i, @@ -161,6 +162,7 @@ static int action_bind_sublabel_netplay_room( #endif return 0; } +#endif static int action_bind_sublabel_generic( file_list_t *list, @@ -259,9 +261,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_entry); break; +#ifdef HAVE_NETWORKING case MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_netplay_room); break; +#endif case MENU_ENUM_LABEL_CHEEVOS_ENABLE: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_enable); break; From b594ab3d11a641d6a7012680d81e547d00368e3d Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 15:31:27 -0500 Subject: [PATCH 376/427] remove these, no longer needed --- menu/cbs/menu_cbs_ok.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 1bacae0650..7e69666299 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3130,11 +3130,6 @@ static int action_ok_netplay_connect_room(const char *path, command_event(CMD_EVENT_NETPLAY_DEINIT, NULL); netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); - /* For testing purposes - strlcpy(tmp_hostname, "192.168.1.241", sizeof(tmp_hostname));*/ - strlcpy(tmp_hostname, - netplay_room_list[idx - 1].address, - sizeof(tmp_hostname)); snprintf(tmp_hostname, sizeof(tmp_hostname), "%s:%d", From 1410668d34fb40a418b3279adeb508796ffe4bcb Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 22 Jan 2017 21:33:59 +0100 Subject: [PATCH 377/427] Cleanups --- command.c | 1 - menu/cbs/menu_cbs_ok.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/command.c b/command.c index 61d2a97108..21cf34109a 100644 --- a/command.c +++ b/command.c @@ -2459,7 +2459,6 @@ bool command_event(enum event_command cmd, void *data) to do this but for now I'll just use a string list */ char *buf = (char *)data; static struct string_list *hostname = NULL; - settings_t *settings = config_get_ptr(); hostname = string_split(buf, ":"); diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 1bacae0650..2a44a23be2 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3122,7 +3122,6 @@ static int action_ok_netplay_connect_room(const char *path, { #ifdef HAVE_NETWORKING char tmp_hostname[512]; - settings_t *settings = config_get_ptr(); tmp_hostname[0] = '\0'; @@ -3327,7 +3326,6 @@ static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const cha char buf[PATH_MAX_LENGTH]; http_transfer_data_t *data = (http_transfer_data_t*)task_data; - menu_file_transfer_t *state = (menu_file_transfer_t*)user_data; buf[0] = '\0'; @@ -3349,7 +3347,6 @@ finish: else { int i, j = 0; - char tmp[PATH_MAX_LENGTH]; char s[PATH_MAX_LENGTH]; static struct string_list *room_data = NULL; file_list_t *file_list = menu_entries_get_selection_buf_ptr(0); From 692bedf7d348e171493ab779cb3edfe9351c0100 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 15:42:38 -0500 Subject: [PATCH 378/427] just reload the game when connecting to a netplay lobby --- menu/cbs/menu_cbs_ok.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 7e69666299..d01a2efca9 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3140,18 +3140,8 @@ static int action_ok_netplay_connect_room(const char *path, netplay_room_list[idx - 1].gamename, netplay_room_list[idx - 1].gamecrc); - /* If we haven't yet started, this will load on its own */ - if (!content_is_inited()) - { - task_push_netplay_crc_scan(netplay_room_list[idx - 1].gamecrc, - tmp_hostname, netplay_room_list[idx - 1].corename); - } - else - { - /* Enable Netplay itself */ - if (!command_event(CMD_EVENT_NETPLAY_INIT, (void *) tmp_hostname)) - return -1; - } + task_push_netplay_crc_scan(netplay_room_list[idx - 1].gamecrc, + tmp_hostname, netplay_room_list[idx - 1].corename); #else return -1; From 8698525f867585e6d2e71ad57cbf5bdde2b321a6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 21:42:42 +0100 Subject: [PATCH 379/427] Only show the frame when libretro_running is true --- gfx/drivers/gl.c | 2 +- gfx/drivers/sdl2_gfx.c | 2 +- gfx/drivers/vulkan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 102313b44b..e870d6eb7f 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1166,7 +1166,7 @@ static bool gl_frame(void *data, const void *frame, glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); /* Can be NULL for frame dupe / NULL render. */ - if (frame) + if (frame && video_info->libretro_running) { #ifdef HAVE_FBO if (!gl->hw_render_fbo_init) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 6b9cea9b80..222c74d976 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -507,7 +507,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, if (vid->should_resize) sdl_refresh_viewport(vid); - if (frame) + if (frame && video_info->libretro_running) { static struct retro_perf_counter sdl_copy_frame = {0}; diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 0481a84896..037aa3cd42 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1523,10 +1523,10 @@ static bool vulkan_frame(void *data, const void *frame, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - struct vk_per_frame *chain; VkSemaphore signal_semaphores[2]; VkClearValue clear_value; vk_t *vk = (vk_t*)data; + struct vk_per_frame *chain = NULL; static struct retro_perf_counter frame_run = {0}; static struct retro_perf_counter begin_cmd = {0}; static struct retro_perf_counter build_cmd = {0}; @@ -1597,7 +1597,7 @@ static bool vulkan_frame(void *data, const void *frame, /* Upload texture */ performance_counter_start(©_frame); - if (frame && !vk->hw.enable) + if (frame && !vk->hw.enable && video_info->libretro_running) { unsigned y; uint8_t *dst = NULL; From 8ad2b5000f11cd7b6330d2a2e550e4832eb7c042 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 21:47:52 +0100 Subject: [PATCH 380/427] Prevent memcpy if data->data is NULL --- menu/cbs/menu_cbs_ok.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 2a44a23be2..da2f410004 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3332,9 +3332,12 @@ static void netplay_refresh_rooms_cb(void *task_data, void *user_data, const cha if (!data || err) goto finish; - memcpy(buf, data->data, data->len * sizeof(char)); - buf[data->len] = '\0'; - + if (data) + { + if (data->data) + memcpy(buf, data->data, data->len * sizeof(char)); + buf[data->len] = '\0'; + } finish: if (!err && !strstr(buf, file_path_str(FILE_PATH_NETPLAY_ROOM_LIST_URL))) From 50f3a3318de572d23e53872f1035930b6c7b4aa2 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 16:02:24 -0500 Subject: [PATCH 381/427] cleanup this --- menu/cbs/menu_cbs_ok.c | 7 +++++-- tasks/task_netplay_crc.c | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index d01a2efca9..a8f65b8b89 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3136,7 +3136,8 @@ static int action_ok_netplay_connect_room(const char *path, netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); - RARCH_LOG("%s %s %08x", netplay_room_list[idx - 1].address, + RARCH_LOG("Connecting to: %s with game: %s/%08x", + netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].gamename, netplay_room_list[idx - 1].gamecrc); @@ -3388,6 +3389,8 @@ finish: netplay_room_list[i].gamecrc = atoi(room_data->elems[j + 6].data); netplay_room_list[i].timestamp = atoi(room_data->elems[j + 7].data); +/* Uncomment this to debug mismatched room parameters*/ +#if 0 RARCH_LOG("Room Data: %d\n" "Nickname: %s\n" "Address: %s\n" @@ -3405,7 +3408,7 @@ finish: netplay_room_list[i].gamename, netplay_room_list[i].gamecrc, netplay_room_list[i].timestamp); - +#endif j+=8; snprintf(s, sizeof(s), "Nickname: %s", diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index a497b90d58..e2b972ad3e 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -80,13 +80,13 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; task_set_progress(task, 0); - task_set_title(task, strdup("Checking for ROM presence.")); + task_set_title(task, strdup("Looking for compatible content...")); task_set_finished(task, false); if (!state->lpl_list) { task_set_progress(task, 100); - task_set_title(task, strdup("Playlist directory not found.")); + task_set_title(task, strdup("Playlist directory not found")); task_set_finished(task, true); free(state); return; @@ -113,7 +113,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) state->found = true; task_set_data(task, state); task_set_progress(task, 100); - task_set_title(task, strdup("Game found.")); + task_set_title(task, strdup("Compatible content found")); task_set_finished(task, true); string_list_free(state->lpl_list); return; @@ -126,7 +126,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) no_playlists: string_list_free(state->lpl_list); task_set_progress(task, 100); - task_set_title(task, strdup("No game found.")); + task_set_title(task, strdup("Couldn't find compatible content")); task_set_finished(task, true); return; } @@ -161,7 +161,7 @@ bool task_push_netplay_crc_scan(uint32_t crc, task->state = state; task->handler = task_netplay_crc_scan_handler; task->callback = netplay_crc_scan_callback; - task->title = strdup("Checking for ROM presence."); + task->title = strdup("Looking for matching content..."); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); From 7d624fdedb4a3655d9fc22afe4d1b4dd96491832 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 22:18:00 +0100 Subject: [PATCH 382/427] Push some build fixes when compiling with --disable-opengl --disable-shaderpipeline --- gfx/drivers_context/drm_ctx.c | 1 + gfx/drivers_context/x_ctx.c | 2 +- menu/drivers_display/menu_display_vulkan.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 3500443857..ed6df8a230 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 2092651680..0dad497fc8 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -109,7 +109,6 @@ static gfx_ctx_x_data_t *current_context_data = NULL; #ifdef HAVE_OPENGL static PFNGLXCREATECONTEXTATTRIBSARBPROC glx_create_context_attribs; -#endif static int GLXExtensionSupported(Display *dpy, const char *extension) { @@ -134,6 +133,7 @@ static int GLXExtensionSupported(Display *dpy, const char *extension) return 0; } +#endif static int x_nul_handler(Display *dpy, XErrorEvent *event) { diff --git a/menu/drivers_display/menu_display_vulkan.c b/menu/drivers_display/menu_display_vulkan.c index 85b81ccfcb..3e99dc454f 100644 --- a/menu/drivers_display/menu_display_vulkan.c +++ b/menu/drivers_display/menu_display_vulkan.c @@ -66,6 +66,7 @@ static unsigned to_display_pipeline( return ((type == MENU_DISPLAY_PRIM_TRIANGLESTRIP) << 1) | (blend << 0); } +#ifdef HAVE_SHADERPIPELINE static unsigned to_menu_pipeline( enum menu_display_prim_type type, unsigned pipeline) { @@ -79,6 +80,7 @@ static unsigned to_menu_pipeline( return 0; } } +#endif static void menu_display_vk_viewport(void *data) { From d3707fe3b0fa8ae60a53e9eb125f240de9ad7a1d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 22:28:24 +0100 Subject: [PATCH 383/427] See if this works --- gfx/video_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index e682147593..b32c2a693a 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2307,6 +2307,8 @@ void video_driver_build_info(video_frame_info_t *video_info) if (!settings->menu.pause_libretro) video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)); + else if (!video_info->menu_is_alive) + video_info->libretro_running = true; #else video_info->menu_is_alive = false; video_info->menu_footer_opacity = 0.0f; From a104c737388542c806ebe5ec6cdeed9126f2e835 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Jan 2017 23:19:35 +0100 Subject: [PATCH 384/427] Go back to this --- gfx/drivers/gl.c | 2 +- gfx/drivers/vulkan.c | 2 +- gfx/video_driver.c | 2 -- runloop.c | 12 +++++------- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index e870d6eb7f..31a3c97729 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1166,7 +1166,7 @@ static bool gl_frame(void *data, const void *frame, glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); /* Can be NULL for frame dupe / NULL render. */ - if (frame && video_info->libretro_running) + if (frame) { #ifdef HAVE_FBO if (!gl->hw_render_fbo_init) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 037aa3cd42..bf11f453a7 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1597,7 +1597,7 @@ static bool vulkan_frame(void *data, const void *frame, /* Upload texture */ performance_counter_start(©_frame); - if (frame && !vk->hw.enable && video_info->libretro_running) + if (frame && !vk->hw.enable) { unsigned y; uint8_t *dst = NULL; diff --git a/gfx/video_driver.c b/gfx/video_driver.c index b32c2a693a..e682147593 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2307,8 +2307,6 @@ void video_driver_build_info(video_frame_info_t *video_info) if (!settings->menu.pause_libretro) video_info->libretro_running = (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)); - else if (!video_info->menu_is_alive) - video_info->libretro_running = true; #else video_info->menu_is_alive = false; video_info->menu_footer_opacity = 0.0f; diff --git a/runloop.c b/runloop.c index 0f4b2000af..fb0bd6fd9b 100644 --- a/runloop.c +++ b/runloop.c @@ -689,7 +689,6 @@ static enum runloop_state runloop_check_state( uint64_t current_input, uint64_t old_input, uint64_t trigger_input, - bool menu_is_alive, unsigned *sleep_ms) { static bool old_focus = true; @@ -707,7 +706,7 @@ static enum runloop_state runloop_check_state( if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY)) { - bool fullscreen_toggled = !runloop_paused || menu_is_alive; + bool fullscreen_toggled = !runloop_paused || menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); if (fullscreen_toggled) command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); @@ -758,7 +757,7 @@ static enum runloop_state runloop_check_state( } #ifdef HAVE_MENU - if (menu_is_alive) + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { menu_ctx_iterate_t iter; core_poll(); @@ -795,7 +794,7 @@ static enum runloop_state runloop_check_state( #ifdef HAVE_MENU if (menu_event_kb_is_set(RETROK_F1) == 1) { - if (menu_is_alive) + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) @@ -809,7 +808,7 @@ static enum runloop_state runloop_check_state( runloop_cmd_triggered(trigger_input, RARCH_MENU_TOGGLE)) || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) { - if (menu_is_alive) + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) @@ -824,7 +823,7 @@ static enum runloop_state runloop_check_state( else menu_event_kb_set(false, RETROK_F1); - if (menu_is_alive) + if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) { if (!settings->menu.throttle_framerate && !settings->fastforward_ratio) return RUNLOOP_STATE_MENU_ITERATE; @@ -1090,7 +1089,6 @@ int runloop_iterate(unsigned *sleep_ms) current_input, old_input, trigger_input, - menu_is_alive, sleep_ms)) { case RUNLOOP_STATE_QUIT: From 97c629ebc3737fcc81a5d3317694ca40bbb2ffd3 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 17:43:05 -0500 Subject: [PATCH 385/427] this could be freed before loading so let's prevent that --- tasks/task_netplay_crc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c index e2b972ad3e..3e01e526ce 100644 --- a/tasks/task_netplay_crc.c +++ b/tasks/task_netplay_crc.c @@ -63,9 +63,12 @@ static void netplay_crc_scan_callback(void *task_data, break; } + static char content_path[PATH_MAX_LENGTH]; + snprintf(content_path, sizeof(content_path), "%s", state->path); + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); task_push_content_load_default( - info->list[i].path, state->path, + info->list[i].path, content_path, &content_info, CORE_TYPE_PLAIN, CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, From 45514e60a74e9710f33282eb8c0f441547b80255 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 17:57:49 -0500 Subject: [PATCH 386/427] console build fix --- menu/drivers/xmb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 932192fedf..d61166f0b2 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1484,8 +1484,10 @@ static xmb_node_t* xmb_get_node(xmb_handle_t *xmb, unsigned i) return &xmb->history_tab_node; case XMB_SYSTEM_TAB_ADD: return &xmb->add_tab_node; +#ifdef HAVE_NETWORKING case XMB_SYSTEM_TAB_NETPLAY: return &xmb->netplay_tab_node; +#endif default: if (i > xmb->system_tab_end) return xmb_get_userdata_from_horizontal_list( @@ -3817,12 +3819,14 @@ static void xmb_list_cache(void *data, enum menu_list_type type, unsigned action menu_stack->list[stack_size - 1].type = MENU_ADD_TAB; break; +#ifdef HAVE_NETWORKING case XMB_SYSTEM_TAB_NETPLAY: menu_stack->list[stack_size - 1].label = strdup(msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB)); menu_stack->list[stack_size - 1].type = MENU_NETPLAY_TAB; break; +#endif default: menu_stack->list[stack_size - 1].label = strdup(msg_hash_to_str(MENU_ENUM_LABEL_HORIZONTAL_MENU)); From 0d5b3b9273042cdd5e135bab822a8ded60e71fd2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 00:37:39 +0100 Subject: [PATCH 387/427] Create menu_driver_is_alive --- command.c | 6 +++--- gfx/common/win32_common.cpp | 2 +- gfx/video_driver.c | 2 +- input/drivers_joypad/ps3_joypad.c | 2 +- input/drivers_joypad/psp_joypad.c | 2 +- input/input_overlay.c | 2 +- menu/drivers/rgui.c | 2 +- menu/drivers/xui.cpp | 2 +- menu/menu_driver.c | 12 ++++++------ menu/menu_driver.h | 3 ++- retroarch.c | 2 +- runloop.c | 12 ++++++------ 12 files changed, 25 insertions(+), 24 deletions(-) diff --git a/command.c b/command.c index 21cf34109a..04195bfe5b 100644 --- a/command.c +++ b/command.c @@ -1878,7 +1878,7 @@ bool command_event(enum event_command cmd, void *data) return command_event_resize_windowed_scale(); case CMD_EVENT_MENU_TOGGLE: #ifdef HAVE_MENU - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL); else rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL); @@ -1969,7 +1969,7 @@ bool command_event(enum event_command cmd, void *data) command_event(CMD_EVENT_GAME_FOCUS_TOGGLE, (void*)(intptr_t)-1); #ifdef HAVE_MENU menu_display_set_framebuffer_dirty_flag(); - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL); #endif break; @@ -2382,7 +2382,7 @@ bool command_event(enum event_command cmd, void *data) #ifdef HAVE_MENU settings_t *settings = config_get_ptr(); - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { if (settings->menu.pause_libretro) command_event(CMD_EVENT_AUDIO_STOP, NULL); diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 5af34e5fe8..21d578d48f 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -542,7 +542,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, HDC hdc = BeginPaint(hwnd, &ps); #ifdef HAVE_MENU - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !gdi_has_menu_frame()) + if (menu_driver_is_alive() && !gdi_has_menu_frame()) { RECT rect; GetClientRect(hwnd, &rect); diff --git a/gfx/video_driver.c b/gfx/video_driver.c index e682147593..5211b90ab9 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2291,7 +2291,7 @@ void video_driver_build_info(video_frame_info_t *video_info) video_info->libretro_running = false; #ifdef HAVE_MENU - video_info->menu_is_alive = menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); + video_info->menu_is_alive = menu_driver_is_alive(); video_info->menu_footer_opacity = settings->menu.footer.opacity; video_info->menu_header_opacity = settings->menu.header.opacity; video_info->materialui_color_theme = settings->menu.materialui.menu_color_theme; diff --git a/input/drivers_joypad/ps3_joypad.c b/input/drivers_joypad/ps3_joypad.c index 1cd6aaab6f..35fc7dadc9 100644 --- a/input/drivers_joypad/ps3_joypad.c +++ b/input/drivers_joypad/ps3_joypad.c @@ -181,7 +181,7 @@ static void ps3_joypad_poll(void) *state_cur |= (state_tmp.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_TRIANGLE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X) : 0; *state_cur |= (state_tmp.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_SQUARE) ? (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y) : 0; - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { int value = 0; if (cellSysutilGetSystemParamInt(CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN, &value) == 0) diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index dcc802bd67..757c536b98 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -250,7 +250,7 @@ static void psp_joypad_poll(void) #endif #if defined(VITA) if (psp2_model == SCE_KERNEL_MODEL_VITA - && !menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) + && !menu_driver_is_alive() && settings->input.backtouch_enable) { unsigned i; diff --git a/input/input_overlay.c b/input/input_overlay.c index cc000042b5..3a04b2738c 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -487,7 +487,7 @@ void input_overlay_loaded(void *task_data, void *user_data, const char *err) #ifdef HAVE_MENU /* We can't display when the menu is up */ - if (data->hide_in_menu && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (data->hide_in_menu && menu_driver_is_alive()) { if (data->overlay_enable) goto abort_load; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 7a7175adad..9ddfeaea23 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -415,7 +415,7 @@ static void rgui_render(void *data) msg_force = menu_display_get_msg_force(); if (menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL) - && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) && !msg_force) + && menu_driver_is_alive() && !msg_force) return; if (runloop_ctl(RUNLOOP_CTL_IS_IDLE, NULL)) diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index 0d2c89ca62..0d733de233 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -539,7 +539,7 @@ static void xui_render(void *data) if ( menu_entries_ctl(MENU_ENTRIES_CTL_NEEDS_REFRESH, NULL) - && menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL) + && menu_driver_is_alive() && !msg_force ) return; diff --git a/menu/menu_driver.c b/menu/menu_driver.c index abc6130bb9..5575af35e7 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -304,10 +304,7 @@ const char *menu_driver_ident(void) void menu_driver_frame(video_frame_info_t *video_info) { - if (!menu_driver_alive) - return; - - if (menu_driver_ctx->frame) + if (menu_driver_alive && menu_driver_ctx->frame) menu_driver_ctx->frame(menu_userdata, video_info); } @@ -376,6 +373,11 @@ bool menu_driver_render(bool is_idle) return true; } +bool menu_driver_is_alive(void) +{ + return menu_driver_alive; +} + bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) { switch (state) @@ -507,8 +509,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) case RARCH_MENU_CTL_UNSET_TOGGLE: menu_driver_toggle(false); break; - case RARCH_MENU_CTL_IS_ALIVE: - return menu_driver_alive; case RARCH_MENU_CTL_SET_OWN_DRIVER: menu_driver_data_own = true; break; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 5eafc3f88b..f67f3fc8d8 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -104,7 +104,6 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_IS_TOGGLE, RARCH_MENU_CTL_SET_TOGGLE, RARCH_MENU_CTL_UNSET_TOGGLE, - RARCH_MENU_CTL_IS_ALIVE, RARCH_MENU_CTL_DESTROY, RARCH_MENU_CTL_IS_SET_TEXTURE, RARCH_MENU_CTL_SET_OWN_DRIVER, @@ -392,6 +391,8 @@ void menu_driver_set_binding_state(bool on); void menu_driver_frame(video_frame_info_t *video_info); +bool menu_driver_is_alive(void); + extern menu_ctx_driver_t menu_ctx_xui; extern menu_ctx_driver_t menu_ctx_rgui; extern menu_ctx_driver_t menu_ctx_mui; diff --git a/retroarch.c b/retroarch.c index 786f0877c3..4c4da02cfb 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1080,7 +1080,7 @@ bool retroarch_main_init(int argc, char *argv[]) { #ifdef HAVE_MENU /* Check if menu was active prior to core initialization */ - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { /* Attempt initializing dummy core */ current_core_type = CORE_TYPE_DUMMY; diff --git a/runloop.c b/runloop.c index fb0bd6fd9b..f23fcaf096 100644 --- a/runloop.c +++ b/runloop.c @@ -706,7 +706,7 @@ static enum runloop_state runloop_check_state( if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY)) { - bool fullscreen_toggled = !runloop_paused || menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); + bool fullscreen_toggled = !runloop_paused || menu_driver_is_alive(); if (fullscreen_toggled) command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); @@ -757,7 +757,7 @@ static enum runloop_state runloop_check_state( } #ifdef HAVE_MENU - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { menu_ctx_iterate_t iter; core_poll(); @@ -794,7 +794,7 @@ static enum runloop_state runloop_check_state( #ifdef HAVE_MENU if (menu_event_kb_is_set(RETROK_F1) == 1) { - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) @@ -808,7 +808,7 @@ static enum runloop_state runloop_check_state( runloop_cmd_triggered(trigger_input, RARCH_MENU_TOGGLE)) || rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) { - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { if (rarch_ctl(RARCH_CTL_IS_INITED, NULL) && !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)) @@ -823,7 +823,7 @@ static enum runloop_state runloop_check_state( else menu_event_kb_set(false, RETROK_F1); - if (menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL)) + if (menu_driver_is_alive()) { if (!settings->menu.throttle_framerate && !settings->fastforward_ratio) return RUNLOOP_STATE_MENU_ITERATE; @@ -1043,7 +1043,7 @@ int runloop_iterate(unsigned *sleep_ms) settings_t *settings = config_get_ptr(); uint64_t old_input = last_input; #ifdef HAVE_MENU - bool menu_is_alive = menu_driver_ctl(RARCH_MENU_CTL_IS_ALIVE, NULL); + bool menu_is_alive = menu_driver_is_alive(); #else bool menu_is_alive = false; #endif From 3306f5274a5ddfec929764342ef067f105c62075 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 18:39:07 -0500 Subject: [PATCH 388/427] add name matching --- Makefile.common | 2 +- griffin/griffin.c | 2 +- menu/cbs/menu_cbs_ok.c | 2 +- tasks/task_netplay_find_content.c | 221 ++++++++++++++++++++++++++++++ 4 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 tasks/task_netplay_find_content.c diff --git a/Makefile.common b/Makefile.common index 71fb5c5f4f..f9247a28bb 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1166,7 +1166,7 @@ ifeq ($(HAVE_NETWORKING), 1) tasks/task_http.o \ tasks/task_netplay_lan_scan.o \ tasks/task_wifi.o \ - tasks/task_netplay_crc.o + tasks/task_netplay_find_content.o ifneq ($(HAVE_SOCKET_LEGACY),1) OBJ += $(LIBRETRO_COMM_DIR)/net/net_ifinfo.o diff --git a/griffin/griffin.c b/griffin/griffin.c index 70a1363f49..da7724432d 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -910,7 +910,7 @@ NETPLAY #include "../tasks/task_http.c" #include "../tasks/task_netplay_lan_scan.c" #include "../tasks/task_wifi.c" -#include "../tasks/task_netplay_crc.c" +#include "../tasks/task_netplay_find_content.c" #endif /*============================================================ diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index c9545c871c..0e9622f86e 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3135,7 +3135,7 @@ static int action_ok_netplay_connect_room(const char *path, netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].port); - RARCH_LOG("Connecting to: %s with game: %s/%08x", + RARCH_LOG("Connecting to: %s with game: %s/%08x\n", netplay_room_list[idx - 1].address, netplay_room_list[idx - 1].gamename, netplay_room_list[idx - 1].gamecrc); diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c new file mode 100644 index 0000000000..c91606e438 --- /dev/null +++ b/tasks/task_netplay_find_content.c @@ -0,0 +1,221 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2016 - Jean-André Santoni + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tasks_internal.h" +#include "../file_path_special.h" +#include "../verbosity.h" +#include "../configuration.h" +#include "../playlist.h" +#include "../command.h" +#include "../core_info.h" + +typedef struct +{ + struct string_list *lpl_list; + char crc[PATH_MAX_LENGTH]; + char path[PATH_MAX_LENGTH]; + char hostname[512]; + char corename[PATH_MAX_LENGTH]; + bool found; +} netplay_crc_handle_t; + +static void netplay_crc_scan_callback(void *task_data, + void *user_data, const char *error) +{ + int i; + netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; + core_info_list_t *info = NULL; + content_ctx_info_t content_info = {0}; + + core_info_get_list(&info); + + if (!state) + return; + + for (i=0; i < info->count; i++) + { + if(string_is_equal(info->list[i].core_name, state->corename)) + break; + } + + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); + task_push_content_load_default( + info->list[i].path, state->path, + &content_info, + CORE_TYPE_PLAIN, + CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, + NULL, NULL); + + free(state); +} + +static void task_netplay_crc_scan_handler(retro_task_t *task) +{ + size_t i, j; + netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; + + task_set_progress(task, 0); + task_set_title(task, strdup("Looking for compatible content...")); + task_set_finished(task, false); + + if (!state->lpl_list) + { + task_set_progress(task, 100); + task_set_title(task, strdup("Playlist directory not found")); + task_set_finished(task, true); + free(state); + return; + } + + if (state->lpl_list->size == 0) + goto no_playlists; + + if (atoi(state->crc) != 0) + { + for (i = 0; i < state->lpl_list->size; i++) + { + playlist_t *playlist = NULL; + const char *lpl_path = state->lpl_list->elems[i].data; + + if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) + continue; + + playlist = playlist_init(lpl_path, 99999); + { + for (j = 0; j < playlist->size; j++) + { + if (string_is_equal(playlist->entries[j].crc32, state->crc)) + { + strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); + state->found = true; + task_set_data(task, state); + task_set_progress(task, 100); + task_set_title(task, strdup("Compatible content found")); + task_set_finished(task, true); + string_list_free(state->lpl_list); + return; + } + task_set_progress(task, (int)(j/playlist->size*100.0)); + } + } + } + } + else + { + for (i = 0; i < state->lpl_list->size; i++) + { + playlist_t *playlist = NULL; + const char *lpl_path = state->lpl_list->elems[i].data; + + if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) + continue; + + playlist = playlist_init(lpl_path, 99999); + { + for (j = 0; j < playlist->size; j++) + { + printf("paths: %s %s\n", playlist->entries[j].path, state->path); + if (strstr(playlist->entries[j].path, state->path)) + { + strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); + state->found = true; + task_set_data(task, state); + task_set_progress(task, 100); + task_set_title(task, strdup("Compatible content found")); + task_set_finished(task, true); + string_list_free(state->lpl_list); + return; + } + + task_set_progress(task, (int)(j/playlist->size*100.0)); + } + } + } + } + + + +/* +else +{ + +} + +*/ +no_playlists: + string_list_free(state->lpl_list); + task_set_progress(task, 100); + task_set_title(task, strdup("Couldn't find compatible content")); + task_set_finished(task, true); + return; +} + +bool task_push_netplay_crc_scan(uint32_t crc, + const char *hostname, const char *corename) +{ + settings_t *settings = config_get_ptr(); + retro_task_t *task = (retro_task_t *)calloc(1, sizeof(*task)); + netplay_crc_handle_t *state = (netplay_crc_handle_t*)calloc(1, sizeof(*state)); + + if (!task || !state) + goto error; + + state->crc[0] = '\0'; + snprintf(state->crc, sizeof(state->crc), "%08X|crc", crc); + + state->hostname[0] = '\0'; + snprintf(state->hostname, sizeof(state->hostname), "%s", hostname); + + state->corename[0] = '\0'; + snprintf(state->corename, sizeof(state->corename), "%s", corename); + + state->lpl_list = dir_list_new(settings->directory.playlist, + NULL, true, true, true, false); + + state->found = false; + + /* blocking means no other task can run while this one is running, + * which is the default */ + task->type = TASK_TYPE_BLOCKING; + task->state = state; + task->handler = task_netplay_crc_scan_handler; + task->callback = netplay_crc_scan_callback; + task->title = strdup("Looking for matching content..."); + + task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); + + return true; + +error: + if (state) + free(state); + if (task) + free(task); + + return false; +} From 4ea31e99aadf136603e11f2e3dd75bb3a7716667 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 00:39:20 +0100 Subject: [PATCH 389/427] Remove some header includes --- gfx/drivers_context/cocoa_gl_ctx.m | 1 - gfx/drivers_context/emscriptenegl_ctx.c | 1 - gfx/drivers_context/mali_fbdev_ctx.c | 1 - gfx/drivers_context/osmesa_ctx.c | 1 - gfx/drivers_context/vc_egl_ctx.c | 1 - gfx/drivers_context/wayland_ctx.c | 1 - 6 files changed, 6 deletions(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 99b32e4022..b98040b2fb 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -41,7 +41,6 @@ #import "../../ui/drivers/cocoa/cocoa_common.h" #include "../video_context_driver.h" #include "../../configuration.h" -#include "../../runloop.h" #include "../../verbosity.h" #if defined(HAVE_COCOATOUCH) diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 7a459c7a4d..2ea79c5e18 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -25,7 +25,6 @@ #include "../../config.h" #endif -#include "../../runloop.h" #include "../video_context_driver.h" #ifdef HAVE_EGL diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index bc2d7c3a0e..cf1fac9557 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -37,7 +37,6 @@ #endif #include "../../frontend/frontend_driver.h" -#include "../../runloop.h" typedef struct { diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index 2d064efd59..c262f60985 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -31,7 +31,6 @@ #include #include "../../configuration.h" -#include "../../runloop.h" #include "../common/gl_common.h" #if (OSMESA_MAJOR_VERSION * 1000 + OSMESA_MINOR_VERSION) >= 11002 diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 5a05be5f96..d1baaaca67 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -32,7 +32,6 @@ #include #include "../../configuration.h" -#include "../../runloop.h" #include "../video_context_driver.h" #include "../../frontend/frontend_driver.h" diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index b16f463d69..94de2fb605 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -43,7 +43,6 @@ #endif #include "../../frontend/frontend_driver.h" -#include "../../runloop.h" #include "../../input/input_keyboard.h" #include "../../input/input_keymaps.h" #include "../../input/input_joypad_driver.h" From 2be1355b570ee696b0c2aaf547aeb13eab1a42ab Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 18:57:50 -0500 Subject: [PATCH 390/427] this should work as soon as the server component is updated --- menu/cbs/menu_cbs_ok.c | 1 + tasks/task_netplay_crc.c | 180 ------------------------------ tasks/task_netplay_find_content.c | 7 +- tasks/tasks_internal.h | 2 +- 4 files changed, 7 insertions(+), 183 deletions(-) delete mode 100644 tasks/task_netplay_crc.c diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 0e9622f86e..723a970153 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3141,6 +3141,7 @@ static int action_ok_netplay_connect_room(const char *path, netplay_room_list[idx - 1].gamecrc); task_push_netplay_crc_scan(netplay_room_list[idx - 1].gamecrc, + netplay_room_list[idx - 1].gamename, tmp_hostname, netplay_room_list[idx - 1].corename); #else diff --git a/tasks/task_netplay_crc.c b/tasks/task_netplay_crc.c deleted file mode 100644 index 3e01e526ce..0000000000 --- a/tasks/task_netplay_crc.c +++ /dev/null @@ -1,180 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2016 - Jean-André Santoni - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tasks_internal.h" -#include "../file_path_special.h" -#include "../verbosity.h" -#include "../configuration.h" -#include "../playlist.h" -#include "../command.h" -#include "../core_info.h" - -typedef struct -{ - struct string_list *lpl_list; - char crc[PATH_MAX_LENGTH]; - char path[PATH_MAX_LENGTH]; - char hostname[512]; - char corename[PATH_MAX_LENGTH]; - bool found; -} netplay_crc_handle_t; - -static void netplay_crc_scan_callback(void *task_data, - void *user_data, const char *error) -{ - int i; - netplay_crc_handle_t *state = (netplay_crc_handle_t*)task_data; - core_info_list_t *info = NULL; - content_ctx_info_t content_info = {0}; - - core_info_get_list(&info); - - if (!state) - return; - - for (i=0; i < info->count; i++) - { - if(string_is_equal(info->list[i].core_name, state->corename)) - break; - } - - static char content_path[PATH_MAX_LENGTH]; - snprintf(content_path, sizeof(content_path), "%s", state->path); - - command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); - task_push_content_load_default( - info->list[i].path, content_path, - &content_info, - CORE_TYPE_PLAIN, - CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, - NULL, NULL); - - free(state); -} - -static void task_netplay_crc_scan_handler(retro_task_t *task) -{ - size_t i, j; - netplay_crc_handle_t *state = (netplay_crc_handle_t*)task->state; - - task_set_progress(task, 0); - task_set_title(task, strdup("Looking for compatible content...")); - task_set_finished(task, false); - - if (!state->lpl_list) - { - task_set_progress(task, 100); - task_set_title(task, strdup("Playlist directory not found")); - task_set_finished(task, true); - free(state); - return; - } - - if (state->lpl_list->size == 0) - goto no_playlists; - - for (i = 0; i < state->lpl_list->size; i++) - { - playlist_t *playlist = NULL; - const char *lpl_path = state->lpl_list->elems[i].data; - - if (!strstr(lpl_path, file_path_str(FILE_PATH_LPL_EXTENSION))) - continue; - - playlist = playlist_init(lpl_path, 99999); - - for (j = 0; j < playlist->size; j++) - { - if (string_is_equal(playlist->entries[j].crc32, state->crc)) - { - strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); - state->found = true; - task_set_data(task, state); - task_set_progress(task, 100); - task_set_title(task, strdup("Compatible content found")); - task_set_finished(task, true); - string_list_free(state->lpl_list); - return; - } - - task_set_progress(task, (int)(j/playlist->size*100.0)); - } - } - -no_playlists: - string_list_free(state->lpl_list); - task_set_progress(task, 100); - task_set_title(task, strdup("Couldn't find compatible content")); - task_set_finished(task, true); - return; -} - -bool task_push_netplay_crc_scan(uint32_t crc, - const char *hostname, const char *corename) -{ - settings_t *settings = config_get_ptr(); - retro_task_t *task = (retro_task_t *)calloc(1, sizeof(*task)); - netplay_crc_handle_t *state = (netplay_crc_handle_t*)calloc(1, sizeof(*state)); - - if (!task || !state) - goto error; - - state->crc[0] = '\0'; - snprintf(state->crc, sizeof(state->crc), "%08X|crc", crc); - - state->hostname[0] = '\0'; - snprintf(state->hostname, sizeof(state->hostname), "%s", hostname); - - state->corename[0] = '\0'; - snprintf(state->corename, sizeof(state->corename), "%s", corename); - - state->lpl_list = dir_list_new(settings->directory.playlist, - NULL, true, true, true, false); - - state->found = false; - - /* blocking means no other task can run while this one is running, - * which is the default */ - task->type = TASK_TYPE_BLOCKING; - task->state = state; - task->handler = task_netplay_crc_scan_handler; - task->callback = netplay_crc_scan_callback; - task->title = strdup("Looking for matching content..."); - - task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); - - return true; - -error: - if (state) - free(state); - if (task) - free(task); - - return false; -} diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index c91606e438..ca15731e7a 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -139,9 +139,10 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) { for (j = 0; j < playlist->size; j++) { - printf("paths: %s %s\n", playlist->entries[j].path, state->path); + /*printf("State: %s Entry: %s\n", state->path, playlist->entries[j].path);*/ if (strstr(playlist->entries[j].path, state->path)) { + printf("Match! %s %s\n", playlist->entries[j].path, state->path); strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); state->found = true; task_set_data(task, state); @@ -175,7 +176,7 @@ no_playlists: return; } -bool task_push_netplay_crc_scan(uint32_t crc, +bool task_push_netplay_crc_scan(uint32_t crc, char* name, const char *hostname, const char *corename) { settings_t *settings = config_get_ptr(); @@ -187,6 +188,8 @@ bool task_push_netplay_crc_scan(uint32_t crc, state->crc[0] = '\0'; snprintf(state->crc, sizeof(state->crc), "%08X|crc", crc); + state->path[0] = '\0'; + snprintf(state->path, sizeof(state->path), "%s", name); state->hostname[0] = '\0'; snprintf(state->hostname, sizeof(state->hostname), "%s", hostname); diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 958afb17ec..61bedf861a 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -98,7 +98,7 @@ bool task_push_wifi_scan(void); bool task_push_netplay_lan_scan(void); -bool task_push_netplay_crc_scan(uint32_t crc, +bool task_push_netplay_crc_scan(uint32_t crc, char* name, const char *hostname, const char *corename); #endif From 6247d6ea1d12abec5949ee8b433884f81b817b57 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:02:33 +0100 Subject: [PATCH 391/427] Update check_window - we no longer need runloop.h inside context driver --- gfx/common/x11_common.c | 3 ++- gfx/common/x11_common.h | 2 +- gfx/drivers_context/android_ctx.c | 7 +++---- gfx/drivers_context/cgl_ctx.c | 2 +- gfx/drivers_context/cocoa_gl_ctx.m | 2 +- gfx/drivers_context/d3d_ctx.cpp | 2 +- gfx/drivers_context/drm_ctx.c | 2 +- gfx/drivers_context/emscriptenegl_ctx.c | 2 +- gfx/drivers_context/gdi_ctx.cpp | 2 +- gfx/drivers_context/gfx_null_ctx.c | 2 +- gfx/drivers_context/khr_display_ctx.c | 5 ++--- gfx/drivers_context/mali_fbdev_ctx.c | 2 +- gfx/drivers_context/opendingux_fbdev_ctx.c | 2 +- gfx/drivers_context/osmesa_ctx.c | 2 +- gfx/drivers_context/ps3_ctx.c | 7 ++++--- gfx/drivers_context/qnx_ctx.c | 6 +++--- gfx/drivers_context/sdl_gl_ctx.c | 6 ++++-- gfx/drivers_context/vc_egl_ctx.c | 3 ++- gfx/drivers_context/vivante_fbdev_ctx.c | 3 ++- gfx/drivers_context/wayland_ctx.c | 3 ++- gfx/drivers_context/wgl_ctx.cpp | 3 ++- gfx/drivers_context/x_ctx.c | 10 +++++++--- gfx/video_context_driver.c | 5 ++++- gfx/video_context_driver.h | 2 +- 24 files changed, 49 insertions(+), 36 deletions(-) diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 2337b59f41..5d664464d4 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -633,7 +633,8 @@ bool x11_alive(void *data) } void x11_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { unsigned new_width = *width; unsigned new_height = *height; diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index 1fbc7da063..206acd6ea6 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -72,7 +72,7 @@ bool x11_get_metrics(void *data, enum display_metric_types type, float *value); void x11_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height); + bool *resize, unsigned *width, unsigned *height, bool is_shutdown); void x11_get_video_size(void *data, unsigned *width, unsigned *height); diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 2d50909dcd..13e6e66ca7 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -38,8 +38,6 @@ #include "../../frontend/drivers/platform_linux.h" -#include "../../runloop.h" - static enum gfx_ctx_api android_api = GFX_CTX_NONE; /* forward declaration */ @@ -230,7 +228,8 @@ static void android_gfx_ctx_get_video_size(void *data, } static void android_gfx_ctx_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { unsigned new_width = 0; unsigned new_height = 0; @@ -271,7 +270,7 @@ static void android_gfx_ctx_check_window(void *data, bool *quit, } /* Check if we are exiting. */ - if (runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)) + if (is_shutdown) *quit = true; } diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 571476f4b7..74ab9c3f64 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -77,7 +77,7 @@ static void gfx_ctx_cgl_get_video_size(void *data, unsigned *width, unsigned *he } static void gfx_ctx_cgl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { unsigned new_width = 0; unsigned new_height = 0; diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index b98040b2fb..081aee1c06 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -558,7 +558,7 @@ CFStringRef)BOXSTRING(symbol_name) } static void cocoagl_gfx_ctx_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { unsigned new_width, new_height; diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index d5716269c7..9c1214618f 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -125,7 +125,7 @@ static void gfx_ctx_d3d_show_mouse(void *data, bool state) static void gfx_ctx_d3d_check_window(void *data, bool *quit, bool *resize, unsigned *width, - unsigned *height) + unsigned *height, bool is_shutdown) { win32_check_window(quit, resize, width, height); } diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index ed6df8a230..01e835068a 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -138,7 +138,7 @@ static void gfx_ctx_drm_swap_interval(void *data, unsigned interval) } static void gfx_ctx_drm_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { (void)data; (void)width; diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 2ea79c5e18..6d6c50cf86 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -52,7 +52,7 @@ static void gfx_ctx_emscripten_swap_interval(void *data, unsigned interval) } static void gfx_ctx_emscripten_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { int input_width; int input_height; diff --git a/gfx/drivers_context/gdi_ctx.cpp b/gfx/drivers_context/gdi_ctx.cpp index cb67ceab01..9e9b770262 100644 --- a/gfx/drivers_context/gdi_ctx.cpp +++ b/gfx/drivers_context/gdi_ctx.cpp @@ -64,7 +64,7 @@ static void setup_gdi_pixel_format(HDC hdc) } static void gfx_ctx_gdi_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { win32_check_window(quit, resize, width, height); } diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index e4c1c7ea4d..ff51ea6de4 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -25,7 +25,7 @@ static void gfx_ctx_null_swap_interval(void *data, unsigned interval) } static void gfx_ctx_null_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { (void)data; (void)quit; diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index d767a01c09..d5d72c59c7 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -17,7 +17,6 @@ #include "../../config.h" #endif -#include "../../runloop.h" #include "../../frontend/frontend_driver.h" #include "../common/vulkan_common.h" @@ -74,7 +73,7 @@ error: } static void gfx_ctx_khr_display_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; @@ -87,7 +86,7 @@ static void gfx_ctx_khr_display_check_window(void *data, bool *quit, *resize = true; } - if (runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL) || (bool)frontend_driver_get_signal_handler_state()) + if (is_shutdown || (bool)frontend_driver_get_signal_handler_state()) *quit = true; } diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index cf1fac9557..1b7110d836 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -130,7 +130,7 @@ error: } static void gfx_ctx_mali_fbdev_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { unsigned new_width, new_height; diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 5170be9065..3af8154f97 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -112,7 +112,7 @@ static void gfx_ctx_opendingux_get_video_size(void *data, } static void gfx_ctx_opendingux_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, bool is_shutdown) { unsigned new_width, new_height; opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index c262f60985..00055a7249 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -308,7 +308,7 @@ static void osmesa_ctx_get_video_size(void *data, static void osmesa_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, - unsigned *height) + unsigned *height, bool is_shutdown) { gfx_ctx_osmesa_data_t *osmesa = (gfx_ctx_osmesa_data_t*)data; diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 2cece19adb..fb3af25cdb 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -148,12 +148,13 @@ static void gfx_ctx_ps3_set_swap_interval(void *data, unsigned interval) } static void gfx_ctx_ps3_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { gl_t *gl = data; - *quit = false; - *resize = false; + *quit = false; + *resize = false; if (gl->should_resize) *resize = true; diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index ce49599a23..3ac5c734fb 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -45,7 +45,6 @@ #endif #include "../../configuration.h" -#include "../../runloop.h" #define WINDOW_BUFFERS 2 @@ -284,7 +283,8 @@ static void gfx_ctx_qnx_get_video_size(void *data, } static void gfx_ctx_qnx_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { unsigned new_width, new_height; qnx_ctx_data_t *qnx = (qnx_ctx_data_t*)data; @@ -303,7 +303,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit, } /* Check if we are exiting. */ - if (runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL)) + if (is_shutdown) *quit = true; } diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 17711fe0d7..ae0e05c1fb 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -285,8 +285,10 @@ static void sdl_ctx_update_title(void *data, video_frame_info_t *video_info) #endif } -static void sdl_ctx_check_window(void *data, bool *quit, bool *resize,unsigned *width, - unsigned *height) +static void sdl_ctx_check_window(void *data, bool *quit, + bool *resize,unsigned *width, + unsigned *height, + bool is_shutdown) { SDL_Event event; gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index d1baaaca67..a9fa66f247 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -86,7 +86,8 @@ static INLINE bool gfx_ctx_vc_egl_query_extension(vc_ctx_data_t *vc, const char } static void gfx_ctx_vc_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { (void)data; (void)width; diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index b271791571..88a9edb0e7 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -117,7 +117,8 @@ static void gfx_ctx_vivante_get_video_size(void *data, } static void gfx_ctx_vivante_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { unsigned new_width, new_height; vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 94de2fb605..acbf0e3001 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -642,7 +642,8 @@ static void flush_wayland_fd(gfx_ctx_wayland_data_t *wl) } static void gfx_ctx_wl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { unsigned new_width, new_height; gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 3f02ce7462..9d082947f1 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -311,7 +311,8 @@ static void gfx_ctx_wgl_swap_interval(void *data, unsigned interval) } static void gfx_ctx_wgl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { win32_check_window(quit, resize, width, height); diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 0dad497fc8..93c7a9d30d 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -347,9 +347,11 @@ static void gfx_ctx_x_swap_buffers(void *data, video_frame_info_t *video_info) } static void gfx_ctx_x_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) + bool *resize, unsigned *width, unsigned *height, + bool is_shutdown) { - x11_check_window(data, quit, resize, width, height); + x11_check_window(data, quit, resize, width, height, + is_shutdown); switch (x_api) { @@ -787,8 +789,10 @@ static bool gfx_ctx_x_set_video_mode(void *data, #ifdef HAVE_VULKAN { bool quit, resize; + bool shutdown = false; unsigned width = 0, height = 0; - x11_check_window(x, &quit, &resize, &width, &height); + x11_check_window(x, &quit, &resize, &width, &height, + shutdown); /* Use XCB surface since it's the most supported WSI. * We can obtain the XCB connection directly from X11. */ diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index c0617944d8..1d4eef161b 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -27,6 +27,7 @@ #endif #include "../configuration.h" +#include "../runloop.h" #include "../verbosity.h" static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { @@ -278,11 +279,13 @@ bool video_context_driver_check_window(gfx_ctx_size_t *size_data) && current_video_context && current_video_context->check_window) { + bool is_shutdown = runloop_ctl(RUNLOOP_CTL_IS_SHUTDOWN, NULL); current_video_context->check_window(video_context_data, size_data->quit, size_data->resize, size_data->width, - size_data->height); + size_data->height, + is_shutdown); return true; } diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 65dadf11f8..6bc9b30d4d 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -106,7 +106,7 @@ typedef struct gfx_ctx_driver /* Queries for resize and quit events. * Also processes events. */ void (*check_window)(void*, bool*, bool*, - unsigned*, unsigned*); + unsigned*, unsigned*, bool); /* Acknowledge a resize event. This is needed for some APIs. * Most backends will ignore this. */ From a42f66d6290bffe067af66be1cbfe1c9530acf8c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:18:08 +0100 Subject: [PATCH 392/427] Streamline input_state - hopefully turbo buttons still work --- input/input_driver.c | 91 ++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 40b76de8aa..1d35344cb7 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -336,7 +336,6 @@ int16_t input_state(unsigned port, unsigned device, unsigned idx, unsigned id) { int16_t res = 0; - settings_t *settings = config_get_ptr(); device &= RETRO_DEVICE_MASK; @@ -349,30 +348,32 @@ int16_t input_state(unsigned port, unsigned device, bsv_movie_ctl(BSV_MOVIE_CTL_SET_END, NULL); } - if (settings->input.remap_binds_enable) - { - switch (device) - { - case RETRO_DEVICE_JOYPAD: - if (id < RARCH_FIRST_CUSTOM_BIND) - id = settings->input.remap_ids[port][id]; - break; - case RETRO_DEVICE_ANALOG: - if (idx < 2 && id < 2) - { - unsigned new_id = RARCH_FIRST_CUSTOM_BIND + (idx * 2 + id); - - new_id = settings->input.remap_ids[port][new_id]; - idx = (new_id & 2) >> 1; - id = new_id & 1; - } - break; - } - } - if ( !input_driver_flushing_input && !input_driver_block_libretro_input) { + settings_t *settings = config_get_ptr(); + + if (settings->input.remap_binds_enable) + { + switch (device) + { + case RETRO_DEVICE_JOYPAD: + if (id < RARCH_FIRST_CUSTOM_BIND) + id = settings->input.remap_ids[port][id]; + break; + case RETRO_DEVICE_ANALOG: + if (idx < 2 && id < 2) + { + unsigned new_id = RARCH_FIRST_CUSTOM_BIND + (idx * 2 + id); + + new_id = settings->input.remap_ids[port][new_id]; + idx = (new_id & 2) >> 1; + id = new_id & 1; + } + break; + } + } + if (((id < RARCH_FIRST_META_KEY) || (device == RETRO_DEVICE_KEYBOARD))) { bool bind_valid = libretro_input_binds[port] && libretro_input_binds[port][id].valid; @@ -398,31 +399,31 @@ int16_t input_state(unsigned port, unsigned device, #ifdef HAVE_NETWORKGAMEPAD input_remote_state(&res, port, device, idx, id); #endif - } - /* Don't allow turbo for D-pad. */ - if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP || - id > RETRO_DEVICE_ID_JOYPAD_RIGHT)) - { - /* - * Apply turbo button if activated. - * - * If turbo button is held, all buttons pressed except - * for D-pad will go into a turbo mode. Until the button is - * released again, the input state will be modulated by a - * periodic pulse defined by the configured duty cycle. - */ - if (res && input_driver_turbo_btns.frame_enable[port]) - input_driver_turbo_btns.enable[port] |= (1 << id); - else if (!res) - input_driver_turbo_btns.enable[port] &= ~(1 << id); - - if (input_driver_turbo_btns.enable[port] & (1 << id)) + /* Don't allow turbo for D-pad. */ + if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP || + id > RETRO_DEVICE_ID_JOYPAD_RIGHT)) { - /* if turbo button is enabled for this key ID */ - res = res && ((input_driver_turbo_btns.count - % settings->input.turbo_period) - < settings->input.turbo_duty_cycle); + /* + * Apply turbo button if activated. + * + * If turbo button is held, all buttons pressed except + * for D-pad will go into a turbo mode. Until the button is + * released again, the input state will be modulated by a + * periodic pulse defined by the configured duty cycle. + */ + if (res && input_driver_turbo_btns.frame_enable[port]) + input_driver_turbo_btns.enable[port] |= (1 << id); + else if (!res) + input_driver_turbo_btns.enable[port] &= ~(1 << id); + + if (input_driver_turbo_btns.enable[port] & (1 << id)) + { + /* if turbo button is enabled for this key ID */ + res = res && ((input_driver_turbo_btns.count + % settings->input.turbo_period) + < settings->input.turbo_duty_cycle); + } } } From d0d55ffaa189eb351d59142f22afda344705d3ed Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:30:50 +0100 Subject: [PATCH 393/427] Add HAVE_NETWORKING ifdefs --- menu/drivers/xmb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index d61166f0b2..ac7809966f 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3449,8 +3449,10 @@ static const char *xmb_texture_path(unsigned id) return "off.png"; case XMB_TEXTURE_ADD: return "add.png"; +#ifdef HAVE_NETWORKING case XMB_TEXTURE_NETPLAY: return "wifi.png"; +#endif case XMB_TEXTURE_KEY: return "key.png"; case XMB_TEXTURE_KEY_HOVER: From fd9531268e38f59443790cb54d438570b14567d9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:33:41 +0100 Subject: [PATCH 394/427] (wiiu_audio.c) Buildfix --- audio/drivers/wiiu_audio.c | 77 ++++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/audio/drivers/wiiu_audio.c b/audio/drivers/wiiu_audio.c index a3b9116cf9..6666158cc2 100644 --- a/audio/drivers/wiiu_audio.c +++ b/audio/drivers/wiiu_audio.c @@ -51,18 +51,21 @@ typedef struct #define AX_AUDIO_COUNT 3072 #define AX_AUDIO_SIZE (AX_AUDIO_COUNT << 1u) -#define AX_AUDIO_SAMPLE_COUNT 144 //3ms -#define AX_AUDIO_SAMPLE_MIN (AX_AUDIO_SAMPLE_COUNT * 3) //9ms -#define AX_AUDIO_SAMPLE_LOAD (AX_AUDIO_SAMPLE_COUNT * 10) //30ms +#define AX_AUDIO_SAMPLE_COUNT 144 /* 3ms */ +#define AX_AUDIO_SAMPLE_MIN (AX_AUDIO_SAMPLE_COUNT * 3) /* 9ms */ +#define AX_AUDIO_SAMPLE_LOAD (AX_AUDIO_SAMPLE_COUNT * 10)/* 30ms */ #define AX_AUDIO_MAX_FREE (AX_AUDIO_COUNT - (AX_AUDIO_SAMPLE_COUNT * 2)) #define AX_AUDIO_RATE 48000 -//#define ax_audio_ticks_to_samples(ticks) (((ticks) * 64) / 82875) -//#define ax_audio_samples_to_ticks(samples) (((samples) * 82875) / 64) + +#if 0 +#define ax_audio_ticks_to_samples(ticks) (((ticks) * 64) / 82875) +#define ax_audio_samples_to_ticks(samples) (((samples) * 82875) / 64) +#endif static volatile ax_audio_t *wiiu_cb_ax = NULL; void wiiu_ax_callback(void) { - //possibly called before unregister + /*possibly called before unregister */ if(wiiu_cb_ax == NULL) return; @@ -71,7 +74,7 @@ void wiiu_ax_callback(void) { if(OSUninterruptibleSpinLock_Acquire(&ax->spinlock)) { - //buffer underrun, stop playback to let it fill up + /* Buffer underrun, stop playback to let it fill up */ if(ax->written < AX_AUDIO_SAMPLE_MIN) AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_STOPPED); ax->written -= AX_AUDIO_SAMPLE_COUNT; @@ -188,7 +191,7 @@ static bool ax_audio_start(void* data, bool is_shutdown) if (is_shutdown) return true; - //set back to playing on enough buffered data + /* Set back to playing on enough buffered data */ if(ax->written > AX_AUDIO_SAMPLE_LOAD) { AXSetMultiVoiceCurrentOffset(ax->mvoice, ax_audio_limit(ax->pos - ax->written)); @@ -209,7 +212,7 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size) if(!size || (size & 0x3)) return 0; - //measure copy performance from here + /* Measure copy performance from here */ performance_counter_init(&ax_audio_write_perf, "ax_audio_write"); performance_counter_start(&ax_audio_write_perf); @@ -220,70 +223,80 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size) if (ax->nonblocking) { - //not enough available for 3ms of data + /* Not enough available for 3ms of data */ if(countAvail < AX_AUDIO_SAMPLE_COUNT) count = 0; } else if(countAvail < count) { - //sync, wait for free memory + /* Sync, wait for free memory */ while(AXIsMultiVoiceRunning(ax->mvoice) && (countAvail < count)) { - OSYieldThread(); //gives threads with same priority time to run + OSYieldThread(); /* Gives threads with same priority time to run */ countAvail = (ax->written > AX_AUDIO_MAX_FREE ? 0 : (AX_AUDIO_MAX_FREE - ax->written)); } } - //over available space, do as much as possible + + /* Over available space, do as much as possible */ if(count > countAvail) count = countAvail; - //make sure we have input size + + /* make sure we have input size */ if(count > 0) { - //write in new data - size_t startPos = ax->pos; + /* write in new data */ + size_t startPos = ax->pos; int flushP2needed = 0; - int flushP2 = 0; + int flushP2 = 0; + for (i = 0; i < (count << 1); i += 2) { ax->buffer_l[ax->pos] = src[i]; ax->buffer_r[ax->pos] = src[i + 1]; - ax->pos = ax_audio_limit(ax->pos + 1); - //wrapped around, make sure to store cache + ax->pos = ax_audio_limit(ax->pos + 1); + + /* wrapped around, make sure to store cache */ if(ax->pos == 0) { flushP2needed = 1; - flushP2 = ((count << 1) - i); + flushP2 = ((count << 1) - i); DCStoreRangeNoSync(ax->buffer_l+startPos, (AX_AUDIO_COUNT-startPos) << 1); DCStoreRangeNoSync(ax->buffer_r+startPos, (AX_AUDIO_COUNT-startPos) << 1); } } - //standard cache store case + + /* standard cache store case */ if(!flushP2needed) { DCStoreRangeNoSync(ax->buffer_l+startPos, count << 1); DCStoreRange(ax->buffer_r+startPos, count << 1); - } //store the rest after wrap + } + /* store the rest after wrap */ else if(flushP2 > 0) { DCStoreRangeNoSync(ax->buffer_l, flushP2); DCStoreRange(ax->buffer_r, flushP2); } - //add in new audio data + + /* add in new audio data */ if(OSUninterruptibleSpinLock_Acquire(&ax->spinlock)) { ax->written += count; OSUninterruptibleSpinLock_Release(&ax->spinlock); } } - //possibly buffer underrun + + /* Possibly buffer underrun + * + * checks if it can be started + */ if(!AXIsMultiVoiceRunning(ax->mvoice)) - { - //checks if it can be started - ax_audio_start(ax); - } - //done copying new data + ax_audio_start(ax, false); + + /* Done copying new data */ performance_counter_stop(&ax_audio_write_perf); - //return what was actually copied + + /* return what was actually copied */ return (count << 2); } @@ -336,6 +349,6 @@ audio_driver_t audio_ax = "AX", NULL, NULL, -// ax_audio_write_avail, -// ax_audio_buffer_size +/* ax_audio_write_avail, */ +/* ax_audio_buffer_size */ }; From 2aaa3a3a3a21a7c16148e922a8e6d3e14aa5491c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:35:11 +0100 Subject: [PATCH 395/427] Turn to C comments --- audio/drivers/ctr_csnd_audio.c | 7 +++++-- audio/drivers/ctr_dsp_audio.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/audio/drivers/ctr_csnd_audio.c b/audio/drivers/ctr_csnd_audio.c index 9310f3a255..e7b2115549 100644 --- a/audio/drivers/ctr_csnd_audio.c +++ b/audio/drivers/ctr_csnd_audio.c @@ -94,7 +94,8 @@ Result csndPlaySound_custom(int chn, u32 flags, float vol, float pan, if (loopMode == CSND_LOOPMODE_NORMAL && paddr1 > paddr0) { - // Now that the first block is playing, configure the size of the subsequent blocks + /* Now that the first block is playing, + * configure the size of the subsequent blocks */ size -= paddr1 - paddr0; CSND_SetBlock(chn, 1, paddr1, size); } @@ -148,7 +149,9 @@ static void ctr_csnd_audio_free(void *data) { ctr_csnd_audio_t* ctr = (ctr_csnd_audio_t*)data; -// csndExit(); +#if 0 + csndExit(); +#endif CSND_SetPlayState(0x8, 0); CSND_SetPlayState(0x9, 0); csndExecCmds(false); diff --git a/audio/drivers/ctr_dsp_audio.c b/audio/drivers/ctr_dsp_audio.c index e261879d87..66578bba5c 100644 --- a/audio/drivers/ctr_dsp_audio.c +++ b/audio/drivers/ctr_dsp_audio.c @@ -59,7 +59,7 @@ static void *ctr_dsp_audio_init(const char *device, unsigned rate, unsigned late ctr->channel = 0; ndspSetOutputMode(NDSP_OUTPUT_STEREO); - ndspSetClippingMode(NDSP_CLIP_SOFT); //?? + ndspSetClippingMode(NDSP_CLIP_SOFT); /* ?? */ ndspSetOutputCount(1); ndspChnReset(ctr->channel); ndspChnSetFormat(ctr->channel, NDSP_FORMAT_STEREO_PCM16); From e0a560f60a31291035e1b459abd8d4a4498d123c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:37:19 +0100 Subject: [PATCH 396/427] Turn C++ comments into C comments --- gfx/drivers/ctr_gfx.c | 16 ++++++++++++---- gfx/drivers/xenon360_gfx.c | 29 +++++++++++++++-------------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index b83183dff2..76158f9f81 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -365,7 +365,9 @@ static void* ctr_init(const video_info_t* video, ctr->menu.texture_width, ctr->menu.texture_height); memset(ctr->texture_linear, 0x00, ctr->texture_width * ctr->texture_height * (ctr->rgb32? 4:2)); -// memset(ctr->menu.texture_swizzled , 0x00, ctr->menu.texture_width * ctr->menu.texture_height * 2); +#if 0 + memset(ctr->menu.texture_swizzled , 0x00, ctr->menu.texture_width * ctr->menu.texture_height * 2); +#endif ctr->dvlb = DVLB_ParseFile((u32*)ctr_sprite_shbin, ctr_sprite_shbin_size); ctrGuSetVshGsh(&ctr->shader, ctr->dvlb, 2, 2); @@ -380,9 +382,13 @@ static void* ctr_init(const video_info_t* video, GPU_SetStencilTest(false, GPU_ALWAYS, 0x00, 0xFF, 0x00); GPU_SetStencilOp(GPU_STENCIL_KEEP, GPU_STENCIL_KEEP, GPU_STENCIL_KEEP); GPU_SetBlendingColor(0, 0, 0, 0); -// GPU_SetDepthTestAndWriteMask(true, GPU_GREATER, GPU_WRITE_ALL); +#if 0 + GPU_SetDepthTestAndWriteMask(true, GPU_GREATER, GPU_WRITE_ALL); +#endif GPU_SetDepthTestAndWriteMask(false, GPU_ALWAYS, GPU_WRITE_COLOR); - // GPU_SetDepthTestAndWriteMask(true, GPU_ALWAYS, GPU_WRITE_ALL); +#if 0 + GPU_SetDepthTestAndWriteMask(true, GPU_ALWAYS, GPU_WRITE_ALL); +#endif GPUCMD_AddMaskedWrite(GPUREG_EARLYDEPTH_TEST1, 0x1, 0); GPUCMD_AddWrite(GPUREG_EARLYDEPTH_TEST2, 0); @@ -887,7 +893,9 @@ static void ctr_free(void* data) linearFree(ctr->empty_framebuffer); linearFree(ctr->vertex_cache.buffer); linearFree(ctr); - // gfxExit(); +#if 0 + gfxExit(); +#endif } static void ctr_set_texture_frame(void* data, const void* frame, bool rgb32, unsigned width, unsigned height, float alpha) diff --git a/gfx/drivers/xenon360_gfx.c b/gfx/drivers/xenon360_gfx.c index 881b8731cd..809cf5e664 100644 --- a/gfx/drivers/xenon360_gfx.c +++ b/gfx/drivers/xenon360_gfx.c @@ -138,7 +138,7 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * edram_init(gl->gl_device); - // enable filtering for now + /* enable filtering for now */ float x = -1.0f; float y = 1.0f; @@ -151,21 +151,21 @@ static void *xenon360_gfx_init(const video_info_t *video, const input_driver_t * ScreenUv[UV_TOP] = ScreenUv[UV_TOP] * 2; ScreenUv[UV_LEFT] = ScreenUv[UV_LEFT] * 2; - // top left + /* top left */ Rect[0].x = x; Rect[0].y = y; Rect[0].u = ScreenUv[UV_BOTTOM]; Rect[0].v = ScreenUv[UV_RIGHT]; Rect[0].color = 0; - // bottom left + /* bottom left */ Rect[1].x = x; Rect[1].y = y - h; Rect[1].u = ScreenUv[UV_BOTTOM]; Rect[1].v = ScreenUv[UV_LEFT]; Rect[1].color = 0; - // top right + /* top right */ Rect[2].x = x + w; Rect[2].y = y; Rect[2].u = ScreenUv[UV_TOP]; @@ -202,32 +202,33 @@ static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, un DrawVerticeFormats * Rect = Xe_VB_Lock(vid->gl_device, vid->vb, 0, 3 * sizeof(DrawVerticeFormats), XE_LOCK_WRITE); - // bottom left + /* bottom left */ Rect[1].v = ScreenUv[UV_LEFT]; Rect[2].u = ScreenUv[UV_TOP]; Xe_VB_Unlock(vid->gl_device, vid->vb); - // Refresh texture cache - uint16_t *dst = Xe_Surface_LockRect(vid->gl_device, vid->g_pTexture, 0, 0, 0, 0, XE_LOCK_WRITE); + /* Refresh texture cache */ + uint16_t *dst = Xe_Surface_LockRect(vid->gl_device, vid->g_pTexture, 0, 0, 0, 0, XE_LOCK_WRITE); const uint16_t *src = frame; - unsigned stride_in = pitch >>1; + unsigned stride_in = pitch >>1; unsigned stride_out = vid->g_pTexture->wpitch >> 1; - unsigned copy_size =width << 1; + unsigned copy_size = width << 1; + for (unsigned y = 0; y < height; y++, dst += stride_out, src += stride_in) memcpy(dst, src, copy_size); Xe_Surface_Unlock(vid->gl_device, vid->g_pTexture); - // Reset states + /* Reset states */ Xe_InvalidateState(vid->gl_device); Xe_SetClearColor(vid->gl_device, 0); - // Select stream + /* Select stream */ Xe_SetTexture(vid->gl_device, 0, vid->g_pTexture); Xe_SetCullMode(vid->gl_device, XE_CULL_NONE); Xe_SetStreamSource(vid->gl_device, 0, vid->vb, 0, sizeof(DrawVerticeFormats)); - // Select shaders + /* Select shaders */ Xe_SetShader(vid->gl_device, SHADER_TYPE_PIXEL, vid->g_pPixelTexturedShader, 0); Xe_SetShader(vid->gl_device, SHADER_TYPE_VERTEX, vid->g_pVertexShader, 0); @@ -235,10 +236,10 @@ static bool xenon360_gfx_frame(void *data, const void *frame, unsigned width, un menu_driver_frame(video_info); #endif - // Draw + /* Draw */ Xe_DrawPrimitive(vid->gl_device, XE_PRIMTYPE_TRIANGLELIST, 0, 1); - // Resolve + /* Resolve */ Xe_Resolve(vid->gl_device); Xe_Sync(vid->gl_device); From f9239cc9c8646ab01cf860df64c763a6589b2244 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:38:35 +0100 Subject: [PATCH 397/427] Update C++ comments to C comments --- gfx/video_filters/epx.c | 6 ++---- gfx/video_filters/scale2x.c | 2 +- gfx/video_filters/super2xsai.c | 2 +- gfx/video_filters/supereagle.c | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gfx/video_filters/epx.c b/gfx/video_filters/epx.c index 4b5d32f4de..f3a7c986e4 100644 --- a/gfx/video_filters/epx.c +++ b/gfx/video_filters/epx.c @@ -122,7 +122,7 @@ static void epx_generic_rgb565 (unsigned width, unsigned height, dP1 = (uint32_t *) dst; dP2 = (uint32_t *) (dst + dst_stride); - // left edge + /* left edge */ colorX = *sP; colorC = *++sP; @@ -145,8 +145,6 @@ static void epx_generic_rgb565 (unsigned width, unsigned height, dP1++; dP2++; - // - for (w = width - 2; w; w--) { colorA = colorX; @@ -172,7 +170,7 @@ static void epx_generic_rgb565 (unsigned width, unsigned height, dP2++; } - // right edge + /* right edge */ colorA = colorX; colorX = colorC; diff --git a/gfx/video_filters/scale2x.c b/gfx/video_filters/scale2x.c index bf08dc589f..733f9c8f80 100644 --- a/gfx/video_filters/scale2x.c +++ b/gfx/video_filters/scale2x.c @@ -14,7 +14,7 @@ * If not, see . */ -// Compile: gcc -o scale2x.so -shared scale2x.c -std=c99 -O3 -Wall -pedantic -fPIC +/* Compile: gcc -o scale2x.so -shared scale2x.c -std=c99 -O3 -Wall -pedantic -fPIC */ #include "softfilter.h" #include diff --git a/gfx/video_filters/super2xsai.c b/gfx/video_filters/super2xsai.c index 2546cef57c..70e670640d 100644 --- a/gfx/video_filters/super2xsai.c +++ b/gfx/video_filters/super2xsai.c @@ -14,7 +14,7 @@ * If not, see . */ -// Compile: gcc -o supertwoxsai.so -shared supertwoxsai.c -std=c99 -O3 -Wall -pedantic -fPIC +/* Compile: gcc -o supertwoxsai.so -shared supertwoxsai.c -std=c99 -O3 -Wall -pedantic -fPIC */ #include "softfilter.h" #include diff --git a/gfx/video_filters/supereagle.c b/gfx/video_filters/supereagle.c index 980d6483fc..d1af9b1597 100644 --- a/gfx/video_filters/supereagle.c +++ b/gfx/video_filters/supereagle.c @@ -14,7 +14,7 @@ * If not, see . */ -// Compile: gcc -o supereagle.so -shared supereagle.c -std=c99 -O3 -Wall -pedantic -fPIC +/* Compile: gcc -o supereagle.so -shared supereagle.c -std=c99 -O3 -Wall -pedantic -fPIC */ #include "softfilter.h" #include @@ -308,7 +308,7 @@ static void supereagle_generic_packets(void *data, thr->width = width; thr->height = y_end - y_start; - // Workers need to know if they can access pixels outside their given buffer. + /* Workers need to know if they can access pixels outside their given buffer. */ thr->first = y_start; thr->last = y_end == height; From 18662afe564daa9ce88e509886b839a7289e1f1b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:44:13 +0100 Subject: [PATCH 398/427] input_poll - cleanup --- input/input_driver.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 1d35344cb7..d459ca03f4 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -265,7 +265,6 @@ static const struct retro_keybind *libretro_input_binds[MAX_USERS]; void input_poll(void) { size_t i; - rarch_joypad_info_t joypad_info; settings_t *settings = config_get_ptr(); unsigned max_users = settings->input.max_users; @@ -279,15 +278,14 @@ void input_poll(void) input_driver_turbo_btns.frame_enable[i] = 0; } - joypad_info.axis_threshold = settings->input.axis_threshold; - if (!input_driver_block_libretro_input) { + rarch_joypad_info_t joypad_info; + joypad_info.axis_threshold = settings->input.axis_threshold; + for (i = 0; i < max_users; i++) { - bool bind_valid = libretro_input_binds[i][RARCH_TURBO_ENABLE].valid; - - if (bind_valid) + if (libretro_input_binds[i][RARCH_TURBO_ENABLE].valid) { joypad_info.joy_idx = settings->input.joypad_map[i]; joypad_info.auto_binds = settings->input.autoconf_binds[joypad_info.joy_idx]; @@ -297,27 +295,27 @@ void input_poll(void) i, RETRO_DEVICE_JOYPAD, 0, RARCH_TURBO_ENABLE); } } - } #ifdef HAVE_OVERLAY - if (overlay_ptr && input_overlay_is_alive(overlay_ptr)) - input_poll_overlay( - overlay_ptr, - settings->input.overlay_opacity, - settings->input.analog_dpad_mode[0], - settings->input.axis_threshold); + if (overlay_ptr && input_overlay_is_alive(overlay_ptr)) + input_poll_overlay( + overlay_ptr, + settings->input.overlay_opacity, + settings->input.analog_dpad_mode[0], + settings->input.axis_threshold); #endif #ifdef HAVE_COMMAND - if (input_driver_command) - command_poll(input_driver_command); + if (input_driver_command) + command_poll(input_driver_command); #endif #ifdef HAVE_NETWORKGAMEPAD - if (input_driver_remote) - input_remote_poll(input_driver_remote, - settings->input.max_users); + if (input_driver_remote) + input_remote_poll(input_driver_remote, + settings->input.max_users); #endif + } } /** From 3a711f6d4fffb48750413ed5e7b588b153b7a480 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 01:46:33 +0100 Subject: [PATCH 399/427] Make conditional for polling the same as input_state --- input/input_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/input_driver.c b/input/input_driver.c index d459ca03f4..073516331a 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -278,7 +278,8 @@ void input_poll(void) input_driver_turbo_btns.frame_enable[i] = 0; } - if (!input_driver_block_libretro_input) + if ( !input_driver_flushing_input + && !input_driver_block_libretro_input) { rarch_joypad_info_t joypad_info; joypad_info.axis_threshold = settings->input.axis_threshold; From daf0e90f82ec9a09da5c613e7b507e1454820e20 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 02:28:25 +0100 Subject: [PATCH 400/427] input_driver.c - cleanup --- input/input_driver.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 073516331a..20a14d646d 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -476,22 +476,16 @@ static const unsigned buttons[] = { void state_tracker_update_input(uint16_t *input1, uint16_t *input2) { unsigned i; - rarch_joypad_info_t joypad_info; const struct retro_keybind *binds[MAX_USERS]; settings_t *settings = config_get_ptr(); unsigned max_users = settings->input.max_users; - /* Only bind for up to two players for now. */ - for (i = 0; i < max_users; i++) - binds[i] = settings->input.binds[i]; - - joypad_info.axis_threshold = settings->input.axis_threshold; - for (i = 0; i < max_users; i++) { struct retro_keybind *general_binds = settings->input.binds[i]; struct retro_keybind *auto_binds = settings->input.autoconf_binds[i]; enum analog_dpad_mode dpad_mode = (enum analog_dpad_mode)settings->input.analog_dpad_mode[i]; + binds[i] = settings->input.binds[i]; if (dpad_mode == ANALOG_DPAD_NONE) continue; @@ -502,6 +496,9 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2) if (!input_driver_block_libretro_input) { + rarch_joypad_info_t joypad_info; + joypad_info.axis_threshold = settings->input.axis_threshold; + for (i = 4; i < 16; i++) { unsigned id = buttons[i - 4]; From 81b529696f765d9fb1c2c1a0a99a088b6f876fe6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 02:33:46 +0100 Subject: [PATCH 401/427] Cleanups --- gfx/drivers_shader/shader_gl_cg.c | 2 -- gfx/drivers_shader/shader_glsl.c | 2 -- gfx/drivers_shader/shader_null.c | 2 -- 3 files changed, 6 deletions(-) diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 26d665998f..349b77936c 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -48,9 +48,7 @@ #include "../video_shader_driver.h" #include "../video_shader_parse.h" -#include "../video_state_tracker.h" #include "../../core.h" -#include "../../dynamic.h" #include "../../managers/state_manager.h" #define SEMANTIC_TEXCOORD 0x92ee91cdU diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index 7d124f2b88..b49189c7d3 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -34,8 +34,6 @@ #endif #include "shader_glsl.h" -#include "../video_state_tracker.h" -#include "../../dynamic.h" #include "../../managers/state_manager.h" #include "../../core.h" diff --git a/gfx/drivers_shader/shader_null.c b/gfx/drivers_shader/shader_null.c index 870610f6c1..7b1a123126 100644 --- a/gfx/drivers_shader/shader_null.c +++ b/gfx/drivers_shader/shader_null.c @@ -32,8 +32,6 @@ #endif #include "../video_shader_driver.h" -#include "../video_state_tracker.h" -#include "../../dynamic.h" typedef struct null_shader_data { From 0761381e2a659fccbf300811b7a060baec7b67bf Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 02:45:36 +0100 Subject: [PATCH 402/427] Fix overlay issue --- input/input_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/input/input_driver.c b/input/input_driver.c index 20a14d646d..4997651cb2 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -278,8 +278,7 @@ void input_poll(void) input_driver_turbo_btns.frame_enable[i] = 0; } - if ( !input_driver_flushing_input - && !input_driver_block_libretro_input) + if (!input_driver_block_libretro_input) { rarch_joypad_info_t joypad_info; joypad_info.axis_threshold = settings->input.axis_threshold; From b36f823d7369ae86c1c3ea4bb49d6aa88aed5810 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 02:49:00 +0100 Subject: [PATCH 403/427] Remove unused RUNLOOP_CTL_IS_SLOWMOTION --- runloop.c | 2 -- runloop.h | 1 - 2 files changed, 3 deletions(-) diff --git a/runloop.c b/runloop.c index f23fcaf096..590e4b3a8d 100644 --- a/runloop.c +++ b/runloop.c @@ -437,8 +437,6 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) runloop_idle = *ptr; } break; - case RUNLOOP_CTL_IS_SLOWMOTION: - return runloop_slowmotion; case RUNLOOP_CTL_SET_SLOWMOTION: { bool *ptr = (bool*)data; diff --git a/runloop.h b/runloop.h index 7e1bebbec1..bca1433f45 100644 --- a/runloop.h +++ b/runloop.h @@ -61,7 +61,6 @@ enum runloop_ctl_state RUNLOOP_CTL_SET_LIBRETRO_PATH, - RUNLOOP_CTL_IS_SLOWMOTION, RUNLOOP_CTL_SET_SLOWMOTION, RUNLOOP_CTL_IS_PAUSED, From 7b533c6720ec76dc13f6f223699112fa3b41b50c Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 22 Jan 2017 21:56:06 -0500 Subject: [PATCH 404/427] cleanup --- tasks/task_netplay_find_content.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index ca15731e7a..7e8fc5c8a8 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -64,6 +64,7 @@ static void netplay_crc_scan_callback(void *task_data, } command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); + task_push_content_load_default( info->list[i].path, state->path, &content_info, @@ -159,20 +160,12 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) } } - - -/* -else -{ - -} - -*/ no_playlists: string_list_free(state->lpl_list); task_set_progress(task, 100); task_set_title(task, strdup("Couldn't find compatible content")); task_set_finished(task, true); + free(state); return; } From 86e332038bffe82e601dad2c3aa9248a49ece7e7 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 22:45:48 -0500 Subject: [PATCH 405/427] netplay quick connect fixes --- intl/msg_hash_us.h | 2 ++ msg_hash.h | 1 + tasks/task_netplay_find_content.c | 35 ++++++++++++++++++++++--------- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index ffcfb615bf..22931e8b0f 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -2369,6 +2369,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCALE, "Scale") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, "Netplay will start when content is loaded.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, + "Couldn't find a suitable core or content file, load manually.") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, "Browse URL" diff --git a/msg_hash.h b/msg_hash.h index dffb8238ff..cf490bcc57 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1550,6 +1550,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_FILTER, MENU_ENUM_LABEL_VALUE_SCALE, MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, + MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, MSG_LAST }; diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index ca15731e7a..83ce23eed9 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -33,6 +33,7 @@ #include "../playlist.h" #include "../command.h" #include "../core_info.h" +#include "../../runloop.h" typedef struct { @@ -62,14 +63,26 @@ static void netplay_crc_scan_callback(void *task_data, if(string_is_equal(info->list[i].core_name, state->corename)) break; } - - command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); - task_push_content_load_default( - info->list[i].path, state->path, - &content_info, - CORE_TYPE_PLAIN, - CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, - NULL, NULL); + + if (!string_is_empty(info->list[i].path) && !string_is_empty(state->path)) + { + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); + task_push_content_load_default( + info->list[i].path, state->path, + &content_info, + CORE_TYPE_PLAIN, + CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, + NULL, NULL); + } + else + { + /* TO-DO: Inform the user no compatible core or content was found */ + RARCH_LOG("Couldn't find a suitable %s\n", + string_is_empty(state->path) ? "content file" : "core"); + runloop_msg_queue_push( + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY), + 1, 480, true); + } free(state); } @@ -95,7 +108,8 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) if (state->lpl_list->size == 0) goto no_playlists; - if (atoi(state->crc) != 0) + /* content with no CRC uses 00000000*/ + if (string_is_equal(state->path, "00000000")) { for (i = 0; i < state->lpl_list->size; i++) { @@ -109,6 +123,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) { for (j = 0; j < playlist->size; j++) { + printf("CRC Match %s\n", state->crc); if (string_is_equal(playlist->entries[j].crc32, state->crc)) { strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); @@ -142,7 +157,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) /*printf("State: %s Entry: %s\n", state->path, playlist->entries[j].path);*/ if (strstr(playlist->entries[j].path, state->path)) { - printf("Match! %s %s\n", playlist->entries[j].path, state->path); + printf("Filename Match %s\n", state->path); strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); state->found = true; task_set_data(task, state); From c421baef0c269eb306bdac42176a95e931a31e15 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 22:45:48 -0500 Subject: [PATCH 406/427] netplay quick connect fixes --- intl/msg_hash_us.h | 2 ++ msg_hash.h | 1 + tasks/task_netplay_find_content.c | 34 +++++++++++++++++++++++-------- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index ffcfb615bf..22931e8b0f 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -2369,6 +2369,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCALE, "Scale") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, "Netplay will start when content is loaded.") +MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, + "Couldn't find a suitable core or content file, load manually.") MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, "Browse URL" diff --git a/msg_hash.h b/msg_hash.h index dffb8238ff..cf490bcc57 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1550,6 +1550,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_FILTER, MENU_ENUM_LABEL_VALUE_SCALE, MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, + MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, MSG_LAST }; diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 7e8fc5c8a8..6551be8f4c 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -33,6 +33,7 @@ #include "../playlist.h" #include "../command.h" #include "../core_info.h" +#include "../../runloop.h" typedef struct { @@ -63,14 +64,27 @@ static void netplay_crc_scan_callback(void *task_data, break; } - command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); + + if (!string_is_empty(info->list[i].path) && !string_is_empty(state->path)) + { + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname); + task_push_content_load_default( + info->list[i].path, state->path, + &content_info, + CORE_TYPE_PLAIN, + CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, + NULL, NULL); + } + else + { + /* TO-DO: Inform the user no compatible core or content was found */ + RARCH_LOG("Couldn't find a suitable %s\n", + string_is_empty(state->path) ? "content file" : "core"); + runloop_msg_queue_push( + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY), + 1, 480, true); + } - task_push_content_load_default( - info->list[i].path, state->path, - &content_info, - CORE_TYPE_PLAIN, - CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, - NULL, NULL); free(state); } @@ -96,7 +110,8 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) if (state->lpl_list->size == 0) goto no_playlists; - if (atoi(state->crc) != 0) + /* content with no CRC uses 00000000*/ + if (string_is_equal(state->path, "00000000")) { for (i = 0; i < state->lpl_list->size; i++) { @@ -110,6 +125,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) { for (j = 0; j < playlist->size; j++) { + printf("CRC Match %s\n", state->crc); if (string_is_equal(playlist->entries[j].crc32, state->crc)) { strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); @@ -143,7 +159,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) /*printf("State: %s Entry: %s\n", state->path, playlist->entries[j].path);*/ if (strstr(playlist->entries[j].path, state->path)) { - printf("Match! %s %s\n", playlist->entries[j].path, state->path); + printf("Filename Match %s\n", state->path); strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); state->found = true; task_set_data(task, state); From f6b09c25e3ff991893496f1ea3fd8de4e19dcde3 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 23:41:59 -0500 Subject: [PATCH 407/427] fix CRC matching --- tasks/task_netplay_find_content.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 39dd19e440..53d1393f57 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -108,10 +108,11 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) if (state->lpl_list->size == 0) goto no_playlists; - + /* content with no CRC uses 00000000*/ - if (string_is_equal(state->path, "00000000")) + if (!string_is_equal(state->crc, "00000000")) { + printf("Using CRC matching\n"); for (i = 0; i < state->lpl_list->size; i++) { playlist_t *playlist = NULL; @@ -143,6 +144,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) } else { + printf("Using filename matching\n"); for (i = 0; i < state->lpl_list->size; i++) { playlist_t *playlist = NULL; From 732c389f26e9311ea4363d33e10c90bfa7e86063 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 22 Jan 2017 23:49:37 -0500 Subject: [PATCH 408/427] fix CRC matching --- tasks/task_netplay_find_content.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 53d1393f57..739b0b985b 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -110,7 +110,7 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) goto no_playlists; /* content with no CRC uses 00000000*/ - if (!string_is_equal(state->crc, "00000000")) + if (!string_is_equal(state->crc, "00000000|crc")) { printf("Using CRC matching\n"); for (i = 0; i < state->lpl_list->size; i++) From 9f3e2f6ba34ef39117440992ee72ac8567352596 Mon Sep 17 00:00:00 2001 From: radius Date: Mon, 23 Jan 2017 01:00:32 -0500 Subject: [PATCH 409/427] fix msg --- tasks/task_netplay_find_content.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 739b0b985b..c84e03a0cf 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -125,9 +125,9 @@ static void task_netplay_crc_scan_handler(retro_task_t *task) { for (j = 0; j < playlist->size; j++) { - printf("CRC Match %s\n", state->crc); if (string_is_equal(playlist->entries[j].crc32, state->crc)) { + printf("CRC Match %s\n", state->crc); strlcpy(state->path, playlist->entries[j].path, sizeof(state->path)); state->found = true; task_set_data(task, state); From c867784898efa94f39911512ecd2202191efef38 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 13:19:35 +0100 Subject: [PATCH 410/427] Use task_set_title --- tasks/task_netplay_find_content.c | 3 ++- tasks/task_netplay_lan_scan.c | 3 ++- tasks/task_save.c | 12 ++++++++---- tasks/task_screenshot.c | 2 +- tasks/task_wifi.c | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index c84e03a0cf..1b790538d4 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -218,7 +218,8 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name, task->state = state; task->handler = task_netplay_crc_scan_handler; task->callback = netplay_crc_scan_callback; - task->title = strdup("Looking for matching content..."); + + task_set_title(task, strdup("Looking for matching content...")); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_netplay_lan_scan.c b/tasks/task_netplay_lan_scan.c index 38c86c3789..68ba63fe44 100644 --- a/tasks/task_netplay_lan_scan.c +++ b/tasks/task_netplay_lan_scan.c @@ -89,7 +89,8 @@ bool task_push_netplay_lan_scan(void) task->type = TASK_TYPE_BLOCKING; task->handler = task_netplay_lan_scan_handler; task->callback = netplay_lan_scan_callback; - task->title = strdup(msg_hash_to_str(MSG_NETPLAY_LAN_SCANNING)); + + task_set_title(task, strdup(msg_hash_to_str(MSG_NETPLAY_LAN_SCANNING))); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_save.c b/tasks/task_save.c index 452ea44790..34febe78e9 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -646,7 +646,8 @@ static bool task_push_undo_save_state(const char *path, void *data, size_t size) task->state = state; task->handler = task_save_handler; task->callback = undo_save_state_cb; - task->title = strdup(msg_hash_to_str(MSG_UNDOING_SAVE_STATE)); + + task_set_title(task, strdup(msg_hash_to_str(MSG_UNDOING_SAVE_STATE))); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); @@ -1003,9 +1004,10 @@ static void task_push_save_state(const char *path, void *data, size_t size, bool task->state = state; task->handler = task_save_handler; task->callback = save_state_cb; - task->title = strdup(msg_hash_to_str(MSG_SAVING_STATE)); task->mute = state->mute; + task_set_title(task, strdup(msg_hash_to_str(MSG_SAVING_STATE))); + task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); return; @@ -1071,9 +1073,10 @@ static void task_push_load_and_save_state(const char *path, void *data, task->type = TASK_TYPE_BLOCKING; task->handler = task_load_handler; task->callback = content_load_and_save_state_cb; - task->title = strdup(msg_hash_to_str(MSG_LOADING_STATE)); task->mute = state->mute; + task_set_title(task, strdup(msg_hash_to_str(MSG_LOADING_STATE))); + task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); return; @@ -1205,7 +1208,8 @@ bool content_load_state(const char *path, task->state = state; task->handler = task_load_handler; task->callback = content_load_state_cb; - task->title = strdup(msg_hash_to_str(MSG_LOADING_STATE)); + + task_set_title(task, strdup(msg_hash_to_str(MSG_LOADING_STATE))); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index 8687ab3b73..7b233bf885 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -258,7 +258,7 @@ static bool screenshot_dump( task->handler = task_screenshot_handler; if (!savestate) - task->title = strdup(msg_hash_to_str(MSG_TAKING_SCREENSHOT)); + task_set_title(task, strdup(msg_hash_to_str(MSG_TAKING_SCREENSHOT))); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_wifi.c b/tasks/task_wifi.c index 8fc081cbcb..017a9d089f 100644 --- a/tasks/task_wifi.c +++ b/tasks/task_wifi.c @@ -100,8 +100,8 @@ bool task_push_wifi_scan(void) task->state = state; task->handler = task_wifi_scan_handler; task->callback = wifi_scan_callback; - task->title = strdup(msg_hash_to_str( - MSG_SCANNING_WIRELESS_NETWORKS)); + + task_set_title(task, strdup(msg_hash_to_str(MSG_SCANNING_WIRELESS_NETWORKS))); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); From 83b1bbe24774fa68f9e0086c4aebaa60bf5e4eee Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 13:29:34 +0100 Subject: [PATCH 411/427] Use task_set_title --- tasks/task_decompress.c | 2 +- tasks/task_http.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index e0efb224fb..aedf1a7380 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -330,7 +330,7 @@ bool task_push_decompress( snprintf(tmp, sizeof(tmp), "%s '%s'", msg_hash_to_str(MSG_EXTRACTING), path_basename(source_file)); - t->title = strdup(tmp); + task_set_title(t, strdup(tmp)); task_queue_ctl(TASK_QUEUE_CTL_PUSH, t); diff --git a/tasks/task_http.c b/tasks/task_http.c index 9413e9718f..9e16273e63 100644 --- a/tasks/task_http.c +++ b/tasks/task_http.c @@ -293,7 +293,7 @@ void *task_push_http_transfer(const char *url, bool mute, const char *type, snprintf(tmp, sizeof(tmp), "%s '%s'", msg_hash_to_str(MSG_DOWNLOADING), path_basename(url)); - t->title = strdup(tmp); + task_set_title(t, tmp); task_queue_ctl(TASK_QUEUE_CTL_PUSH, t); From 9b1c0abf5e6f5bac874efe95a57564816f36bd64 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 13:56:05 +0100 Subject: [PATCH 412/427] Create runloop_msg_queue_pull --- gfx/video_driver.c | 5 +++-- runloop.c | 28 ++++++++++++++-------------- runloop.h | 3 ++- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 5211b90ab9..f946bf1425 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2184,8 +2184,9 @@ void video_driver_frame(const void *data, unsigned width, video_driver_msg[0] = '\0'; - if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg) - && video_info.font_enable && msg) + if ( video_info.font_enable + && runloop_msg_queue_pull((const char**)&msg) + && msg) strlcpy(video_driver_msg, msg, sizeof(video_driver_msg)); if (!current_video || !current_video->frame( diff --git a/runloop.c b/runloop.c index 590e4b3a8d..6d48044033 100644 --- a/runloop.c +++ b/runloop.c @@ -212,6 +212,20 @@ void runloop_get_status(bool *is_paused, bool *is_idle, *is_slowmotion = runloop_slowmotion; } +bool runloop_msg_queue_pull(const char **ret) +{ + if (!ret) + return false; +#ifdef HAVE_THREADS + slock_lock(_runloop_msg_queue_lock); +#endif + *ret = msg_queue_pull(runloop_msg_queue); +#ifdef HAVE_THREADS + slock_unlock(_runloop_msg_queue_lock); +#endif + return true; +} + bool runloop_ctl(enum runloop_ctl_state state, void *data) { @@ -455,20 +469,6 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) break; case RUNLOOP_CTL_IS_PAUSED: return runloop_paused; - case RUNLOOP_CTL_MSG_QUEUE_PULL: - { - const char **ret = (const char**)data; - if (!ret) - return false; -#ifdef HAVE_THREADS - slock_lock(_runloop_msg_queue_lock); -#endif - *ret = msg_queue_pull(runloop_msg_queue); -#ifdef HAVE_THREADS - slock_unlock(_runloop_msg_queue_lock); -#endif - } - break; case RUNLOOP_CTL_MSG_QUEUE_DEINIT: if (!runloop_msg_queue) return true; diff --git a/runloop.h b/runloop.h index bca1433f45..107ad14a1c 100644 --- a/runloop.h +++ b/runloop.h @@ -93,7 +93,6 @@ enum runloop_ctl_state /* Message queue */ RUNLOOP_CTL_MSG_QUEUE_INIT, RUNLOOP_CTL_MSG_QUEUE_DEINIT, - RUNLOOP_CTL_MSG_QUEUE_PULL, /* Core options */ RUNLOOP_CTL_HAS_CORE_OPTIONS, @@ -203,6 +202,8 @@ int runloop_iterate(unsigned *sleep_ms); void runloop_msg_queue_push(const char *msg, unsigned prio, unsigned duration, bool flush); +bool runloop_msg_queue_pull(const char **ret); + void runloop_get_status(bool *is_paused, bool *is_idle, bool *is_slowmotion); bool runloop_ctl(enum runloop_ctl_state state, void *data); From b7ebcd6948e3d2192ed4cea62e33ba02b5cd8967 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:04:00 +0100 Subject: [PATCH 413/427] Simplify video_monitor_get_fps --- gfx/video_driver.c | 132 +++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 70 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index f946bf1425..146003aa1e 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2017,90 +2017,82 @@ unsigned video_pixel_get_alignment(unsigned pitch) * video_monitor_get_fps: * * Get the amount of frames per seconds. - * - * Returns: true if framerate per seconds could be obtained, - * otherwise false. - * **/ -static bool video_monitor_get_fps(video_frame_info_t *video_info) +static void video_monitor_get_fps(video_frame_info_t *video_info) { static retro_time_t curr_time; static retro_time_t fps_time; + static float last_fps; + unsigned write_index = 0; retro_time_t new_time = cpu_features_get_time_usec(); - if (video_info->frame_count) + if (!video_info->frame_count) { - static float last_fps; - bool ret = false; - unsigned write_index = video_driver_frame_time_count++ & - (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); + curr_time = fps_time = new_time; + strlcpy(video_driver_window_title, + video_driver_title_buf, + sizeof(video_driver_window_title)); - video_driver_frame_time_samples[write_index] = new_time - fps_time; - fps_time = new_time; + strlcpy(video_info->fps_text, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), + sizeof(video_info->fps_text)); - if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) - { - char frames_text[64]; - - fill_pathname_noext(video_driver_window_title, - video_driver_title_buf, - " || ", - sizeof(video_driver_window_title)); - - if (video_info->fps_show) - { - last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); - snprintf(video_info->fps_text, - sizeof(video_info->fps_text), - " FPS: %6.1f || ", last_fps); - strlcat(video_driver_window_title, - video_info->fps_text, - sizeof(video_driver_window_title)); - } - - curr_time = new_time; - - strlcat(video_driver_window_title, - "Frames: ", - sizeof(video_driver_window_title)); - - snprintf(frames_text, - sizeof(frames_text), - STRING_REP_UINT64, - (unsigned long long)video_info->frame_count); - - strlcat(video_driver_window_title, - frames_text, - sizeof(video_driver_window_title)); - ret = true; - - video_driver_window_title_update = true; - } - - if (video_info->fps_show) - snprintf( - video_info->fps_text, - sizeof(video_info->fps_text), - "FPS: %6.1f || %s: " STRING_REP_UINT64, - last_fps, - msg_hash_to_str(MSG_FRAMES), - (unsigned long long)video_info->frame_count); - - return ret; + video_driver_window_title_update = true; + return; } - curr_time = fps_time = new_time; - strlcpy(video_driver_window_title, - video_driver_title_buf, - sizeof(video_driver_window_title)); + write_index = + video_driver_frame_time_count++ & + (MEASURE_FRAME_TIME_SAMPLES_COUNT - 1); + video_driver_frame_time_samples[write_index] = new_time - fps_time; + fps_time = new_time; - strlcpy(video_info->fps_text, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), - sizeof(video_info->fps_text)); + if ((video_info->frame_count % FPS_UPDATE_INTERVAL) == 0) + { + char frames_text[64]; - video_driver_window_title_update = true; + fill_pathname_noext(video_driver_window_title, + video_driver_title_buf, + " || ", + sizeof(video_driver_window_title)); - return true; + if (video_info->fps_show) + { + last_fps = TIME_TO_FPS(curr_time, new_time, FPS_UPDATE_INTERVAL); + snprintf(video_info->fps_text, + sizeof(video_info->fps_text), + " FPS: %6.1f || ", last_fps); + strlcat(video_driver_window_title, + video_info->fps_text, + sizeof(video_driver_window_title)); + } + + curr_time = new_time; + + strlcat(video_driver_window_title, + "Frames: ", + sizeof(video_driver_window_title)); + + snprintf(frames_text, + sizeof(frames_text), + STRING_REP_UINT64, + (unsigned long long)video_info->frame_count); + + strlcat(video_driver_window_title, + frames_text, + sizeof(video_driver_window_title)); + + video_driver_window_title_update = true; + } + + if (video_info->fps_show) + snprintf( + video_info->fps_text, + sizeof(video_info->fps_text), + "FPS: %6.1f || %s: " STRING_REP_UINT64, + last_fps, + msg_hash_to_str(MSG_FRAMES), + (unsigned long long)video_info->frame_count); } /** From 1afda04966347276a6ff950f4589afe0ba199d96 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 23 Jan 2017 14:10:51 +0100 Subject: [PATCH 414/427] Guard crash on OSX --- libretro-common/queues/task_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index 3ff959ce78..49a349cde5 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -143,7 +143,7 @@ static void retro_task_internal_gather(void) if (task->error) free(task->error); - if (task->title) + if (!string_is_empty(task->title)) free(task->title); free(task); From 77fa8c39ef885048fc814873b2ad47fccbd6a7b2 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:11:22 +0100 Subject: [PATCH 415/427] Implicit declaration buildfix --- libretro-common/queues/task_queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index 49a349cde5..e2cc0f6ac0 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -25,6 +25,7 @@ #include #include +#include #ifdef HAVE_THREADS #include From 3e87196a43ad1281814216ed2cd85369c05e9576 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:14:40 +0100 Subject: [PATCH 416/427] Revert "Implicit declaration buildfix" This reverts commit 77fa8c39ef885048fc814873b2ad47fccbd6a7b2. --- libretro-common/queues/task_queue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index e2cc0f6ac0..49a349cde5 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -25,7 +25,6 @@ #include #include -#include #ifdef HAVE_THREADS #include From 379ce5eb05a7fd3fcc016d2f658b189ddaa8d137 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:14:46 +0100 Subject: [PATCH 417/427] Revert "Guard crash on OSX" This reverts commit 1afda04966347276a6ff950f4589afe0ba199d96. --- libretro-common/queues/task_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index 49a349cde5..3ff959ce78 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -143,7 +143,7 @@ static void retro_task_internal_gather(void) if (task->error) free(task->error); - if (!string_is_empty(task->title)) + if (task->title) free(task->title); free(task); From ee46e427ae90fbdf14312ddc3e796dd10e7ac13e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:15:14 +0100 Subject: [PATCH 418/427] Revert "Use task_set_title" This reverts commit 83b1bbe24774fa68f9e0086c4aebaa60bf5e4eee. --- tasks/task_decompress.c | 2 +- tasks/task_http.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/task_decompress.c b/tasks/task_decompress.c index aedf1a7380..e0efb224fb 100644 --- a/tasks/task_decompress.c +++ b/tasks/task_decompress.c @@ -330,7 +330,7 @@ bool task_push_decompress( snprintf(tmp, sizeof(tmp), "%s '%s'", msg_hash_to_str(MSG_EXTRACTING), path_basename(source_file)); - task_set_title(t, strdup(tmp)); + t->title = strdup(tmp); task_queue_ctl(TASK_QUEUE_CTL_PUSH, t); diff --git a/tasks/task_http.c b/tasks/task_http.c index 9e16273e63..9413e9718f 100644 --- a/tasks/task_http.c +++ b/tasks/task_http.c @@ -293,7 +293,7 @@ void *task_push_http_transfer(const char *url, bool mute, const char *type, snprintf(tmp, sizeof(tmp), "%s '%s'", msg_hash_to_str(MSG_DOWNLOADING), path_basename(url)); - task_set_title(t, tmp); + t->title = strdup(tmp); task_queue_ctl(TASK_QUEUE_CTL_PUSH, t); From 4aac4aa2e62f3ba82cd93925b4cea0749f23d727 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:15:26 +0100 Subject: [PATCH 419/427] Revert "Use task_set_title" This reverts commit c867784898efa94f39911512ecd2202191efef38. --- tasks/task_netplay_find_content.c | 3 +-- tasks/task_netplay_lan_scan.c | 3 +-- tasks/task_save.c | 12 ++++-------- tasks/task_screenshot.c | 2 +- tasks/task_wifi.c | 4 ++-- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/tasks/task_netplay_find_content.c b/tasks/task_netplay_find_content.c index 1b790538d4..c84e03a0cf 100644 --- a/tasks/task_netplay_find_content.c +++ b/tasks/task_netplay_find_content.c @@ -218,8 +218,7 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name, task->state = state; task->handler = task_netplay_crc_scan_handler; task->callback = netplay_crc_scan_callback; - - task_set_title(task, strdup("Looking for matching content...")); + task->title = strdup("Looking for matching content..."); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_netplay_lan_scan.c b/tasks/task_netplay_lan_scan.c index 68ba63fe44..38c86c3789 100644 --- a/tasks/task_netplay_lan_scan.c +++ b/tasks/task_netplay_lan_scan.c @@ -89,8 +89,7 @@ bool task_push_netplay_lan_scan(void) task->type = TASK_TYPE_BLOCKING; task->handler = task_netplay_lan_scan_handler; task->callback = netplay_lan_scan_callback; - - task_set_title(task, strdup(msg_hash_to_str(MSG_NETPLAY_LAN_SCANNING))); + task->title = strdup(msg_hash_to_str(MSG_NETPLAY_LAN_SCANNING)); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_save.c b/tasks/task_save.c index 34febe78e9..452ea44790 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -646,8 +646,7 @@ static bool task_push_undo_save_state(const char *path, void *data, size_t size) task->state = state; task->handler = task_save_handler; task->callback = undo_save_state_cb; - - task_set_title(task, strdup(msg_hash_to_str(MSG_UNDOING_SAVE_STATE))); + task->title = strdup(msg_hash_to_str(MSG_UNDOING_SAVE_STATE)); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); @@ -1004,10 +1003,9 @@ static void task_push_save_state(const char *path, void *data, size_t size, bool task->state = state; task->handler = task_save_handler; task->callback = save_state_cb; + task->title = strdup(msg_hash_to_str(MSG_SAVING_STATE)); task->mute = state->mute; - task_set_title(task, strdup(msg_hash_to_str(MSG_SAVING_STATE))); - task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); return; @@ -1073,10 +1071,9 @@ static void task_push_load_and_save_state(const char *path, void *data, task->type = TASK_TYPE_BLOCKING; task->handler = task_load_handler; task->callback = content_load_and_save_state_cb; + task->title = strdup(msg_hash_to_str(MSG_LOADING_STATE)); task->mute = state->mute; - task_set_title(task, strdup(msg_hash_to_str(MSG_LOADING_STATE))); - task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); return; @@ -1208,8 +1205,7 @@ bool content_load_state(const char *path, task->state = state; task->handler = task_load_handler; task->callback = content_load_state_cb; - - task_set_title(task, strdup(msg_hash_to_str(MSG_LOADING_STATE))); + task->title = strdup(msg_hash_to_str(MSG_LOADING_STATE)); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index 7b233bf885..8687ab3b73 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -258,7 +258,7 @@ static bool screenshot_dump( task->handler = task_screenshot_handler; if (!savestate) - task_set_title(task, strdup(msg_hash_to_str(MSG_TAKING_SCREENSHOT))); + task->title = strdup(msg_hash_to_str(MSG_TAKING_SCREENSHOT)); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); diff --git a/tasks/task_wifi.c b/tasks/task_wifi.c index 017a9d089f..8fc081cbcb 100644 --- a/tasks/task_wifi.c +++ b/tasks/task_wifi.c @@ -100,8 +100,8 @@ bool task_push_wifi_scan(void) task->state = state; task->handler = task_wifi_scan_handler; task->callback = wifi_scan_callback; - - task_set_title(task, strdup(msg_hash_to_str(MSG_SCANNING_WIRELESS_NETWORKS))); + task->title = strdup(msg_hash_to_str( + MSG_SCANNING_WIRELESS_NETWORKS)); task_queue_ctl(TASK_QUEUE_CTL_PUSH, task); From 34d3b88759ce8f617188d065e3454ed068d198e7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:19:32 +0100 Subject: [PATCH 420/427] Cleanups --- gfx/video_driver.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 146003aa1e..f75e37fd67 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -2033,9 +2033,10 @@ static void video_monitor_get_fps(video_frame_info_t *video_info) video_driver_title_buf, sizeof(video_driver_window_title)); - strlcpy(video_info->fps_text, - msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), - sizeof(video_info->fps_text)); + if (video_info->fps_show) + strlcpy(video_info->fps_text, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), + sizeof(video_info->fps_text)); video_driver_window_title_update = true; return; From 68dc34d5a4b9338c997ab81f369081915da68145 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:40:48 +0100 Subject: [PATCH 421/427] Move comment --- gfx/video_driver.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gfx/video_driver.c b/gfx/video_driver.c index f75e37fd67..fec0da21f9 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -155,18 +155,18 @@ static const video_poke_interface_t *video_driver_poke = NULL; * being passed to video driver. */ static video_pixel_scaler_t *video_driver_scaler_ptr = NULL; -/* Graphics driver requires RGBA byte order data (ABGR on little-endian) - * for 32-bit. - * This takes effect for overlay and shader cores that wants to load - * data into graphics driver. Kinda hackish to place it here, it is only - * used for GLES. - * TODO: Refactor this better. */ static struct retro_hw_render_callback hw_render; static const struct retro_hw_render_context_negotiation_interface * hw_render_context_negotiation = NULL; +/* Graphics driver requires RGBA byte order data (ABGR on little-endian) + * for 32-bit. + * This takes effect for overlay and shader cores that wants to load + * data into graphics driver. Kinda hackish to place it here, it is only + * used for GLES. + * TODO: Refactor this better. */ static bool video_driver_use_rgba = false; static bool video_driver_data_own = false; static bool video_driver_active = false; From ab8680c339d27ca46f2278943eb81106d15c1bbe Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:44:32 +0100 Subject: [PATCH 422/427] Get rid of runloop_ctl call in state_manager.c --- managers/state_manager.c | 5 ++--- managers/state_manager.h | 2 +- runloop.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/managers/state_manager.c b/managers/state_manager.c index de021eb684..cd98f932fb 100644 --- a/managers/state_manager.c +++ b/managers/state_manager.c @@ -578,7 +578,7 @@ void state_manager_event_deinit(void) * Checks if rewind toggle/hold was being pressed and/or held. **/ void state_manager_check_rewind(bool pressed, - unsigned rewind_granularity) + unsigned rewind_granularity, bool is_paused) { static bool first = true; @@ -611,8 +611,7 @@ void state_manager_check_rewind(bool pressed, runloop_msg_queue_push( msg_hash_to_str(MSG_REWINDING), 0, - runloop_ctl(RUNLOOP_CTL_IS_PAUSED, NULL) - ? 1 : 30, true); + is_paused ? 1 : 30, true); serial_info.data_const = buf; serial_info.size = rewind_state.size; diff --git a/managers/state_manager.h b/managers/state_manager.h index 91a06b3665..c980dad906 100644 --- a/managers/state_manager.h +++ b/managers/state_manager.h @@ -40,7 +40,7 @@ void state_manager_event_init(unsigned rewind_buffer_size); * * Checks if rewind toggle/hold was being pressed and/or held. **/ -void state_manager_check_rewind(bool pressed, unsigned rewind_granularity); +void state_manager_check_rewind(bool pressed, unsigned rewind_granularity, bool is_paused); RETRO_END_DECLS diff --git a/runloop.c b/runloop.c index 6d48044033..5a8eaa4dc0 100644 --- a/runloop.c +++ b/runloop.c @@ -968,7 +968,7 @@ static enum runloop_state runloop_check_state( if (!settings->cheevos.hardcore_mode_enable) #endif state_manager_check_rewind(runloop_cmd_press(current_input, RARCH_REWIND), - settings->rewind_granularity); + settings->rewind_granularity, runloop_paused); runloop_slowmotion = runloop_cmd_press(current_input, RARCH_SLOWMOTION); From 8e53dffdef818e90767263a2a58e621c7b71d328 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:50:00 +0100 Subject: [PATCH 423/427] core_impl.c - some cleanups --- command.c | 7 ++++++- core.h | 2 +- core_impl.c | 14 ++------------ 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/command.c b/command.c index 04195bfe5b..144042dcce 100644 --- a/command.c +++ b/command.c @@ -1403,9 +1403,11 @@ static bool command_event_init_core(enum rarch_core_type *data) if (!event_init_content()) return false; - if (!core_load()) + if (!core_load(settings->input.poll_type_behavior)) return false; + runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL); + return true; } @@ -1895,6 +1897,9 @@ bool command_event(enum event_command cmd, void *data) cheevos_set_cheats(); #endif core_reset(); +#ifdef HAVE_CHEEVOS + cheevos_reset_game(); +#endif break; case CMD_EVENT_SAVE_STATE: { diff --git a/core.h b/core.h index f044fc7b64..48df7129cb 100644 --- a/core.h +++ b/core.h @@ -158,7 +158,7 @@ typedef struct retro_callbacks retro_input_poll_t poll_cb; } retro_callbacks_t; -bool core_load(void); +bool core_load(unsigned poll_type_behavior); bool core_unload(void); diff --git a/core_impl.c b/core_impl.c index 3dd5148d91..fd0b8d09a0 100644 --- a/core_impl.c +++ b/core_impl.c @@ -34,16 +34,12 @@ #include "network/netplay/netplay.h" #endif -#include "configuration.h" #include "dynamic.h" -#include "core.h" #include "msg_hash.h" #include "managers/state_manager.h" -#include "runloop.h" #include "verbosity.h" #include "gfx/video_driver.h" #include "audio/audio_driver.h" -#include "cheevos.h" static unsigned core_poll_type = POLL_TYPE_EARLY; static bool core_inited = false; @@ -376,9 +372,6 @@ bool core_get_system_av_info(struct retro_system_av_info *av_info) bool core_reset(void) { core.retro_reset(); -#ifdef HAVE_CHEEVOS - cheevos_reset_game(); -#endif return true; } @@ -442,11 +435,9 @@ bool core_run(void) return true; } -bool core_load(void) +bool core_load(unsigned poll_type_behavior) { - settings_t *settings = config_get_ptr(); - - core_poll_type = settings->input.poll_type_behavior; + core_poll_type = poll_type_behavior; if (!core_verify_api_version()) return false; @@ -454,7 +445,6 @@ bool core_load(void) return false; core_get_system_av_info(video_viewport_get_system_av_info()); - runloop_ctl(RUNLOOP_CTL_SET_FRAME_LIMIT, NULL); return true; } From 174994188123af06cb147a0de8b8783c9fc0a1da Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 14:56:09 +0100 Subject: [PATCH 424/427] Refactor patch.c --- patch.c | 62 +++++++++++++++++++++----------------------- patch.h | 6 ++++- tasks/task_content.c | 10 ++++++- 3 files changed, 44 insertions(+), 34 deletions(-) diff --git a/patch.c b/patch.c index ce2f7c5d86..26da1fe5be 100644 --- a/patch.c +++ b/patch.c @@ -33,7 +33,6 @@ #include "msg_hash.h" #include "patch.h" #include "retroarch.h" -#include "runloop.h" #include "verbosity.h" enum bps_mode @@ -553,40 +552,30 @@ error: return false; } -static bool try_bps_patch(uint8_t **buf, ssize_t *size) +static bool try_bps_patch(bool allow_bps, const char *name_bps, + uint8_t **buf, ssize_t *size) { - global_t *global = global_get_ptr(); - bool allow_bps = !rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL) && !rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL); - - if (!allow_bps || string_is_empty(global->name.bps)) - return false; - - return apply_patch_content(buf, size, "BPS", global->name.bps, - bps_apply_patch); + if (allow_bps && !string_is_empty(name_bps)) + return apply_patch_content(buf, size, "BPS", name_bps, + bps_apply_patch); + return false; } -static bool try_ups_patch(uint8_t **buf, ssize_t *size) +static bool try_ups_patch(bool allow_ups, const char *name_ups, + uint8_t **buf, ssize_t *size) { - global_t *global = global_get_ptr(); - bool allow_ups = !rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL) && !rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL); - - if (!allow_ups || string_is_empty(global->name.ups)) - return false; - - return apply_patch_content(buf, size, "UPS", global->name.ups, - ups_apply_patch); + if (allow_ups && !string_is_empty(name_ups)) + return apply_patch_content(buf, size, "UPS", name_ups, + ups_apply_patch); + return false; } -static bool try_ips_patch(uint8_t **buf, ssize_t *size) +static bool try_ips_patch(bool allow_ips, + const char *name_ips, uint8_t **buf, ssize_t *size) { - global_t *global = global_get_ptr(); - bool allow_ips = !rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL) && !rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL); - - if (!allow_ips || string_is_empty(global->name.ips)) - return false; - - return apply_patch_content(buf, size, "IPS", global->name.ips, - ips_apply_patch); + if (allow_ips && !string_is_empty(name_ips)) + return apply_patch_content(buf, size, "IPS", name_ips, ips_apply_patch); + return false; } /** @@ -597,8 +586,17 @@ static bool try_ips_patch(uint8_t **buf, ssize_t *size) * Apply patch to the content file in-memory. * **/ -void patch_content(uint8_t **buf, ssize_t *size) +void patch_content( + const char *name_ips, + const char *name_bps, + const char *name_ups, + uint8_t **buf, + ssize_t *size) { + bool allow_ups = !rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL) && !rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL); + bool allow_ips = !rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL) && !rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL); + bool allow_bps = !rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL) && !rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL); + if ( (unsigned)rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL) + (unsigned)rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL) + (unsigned)rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL) > 1) @@ -608,9 +606,9 @@ void patch_content(uint8_t **buf, ssize_t *size) return; } - if ( !try_ips_patch(buf, size) - && !try_bps_patch(buf, size) - && !try_ups_patch(buf, size)) + if ( !try_ips_patch(allow_ips, name_ips, buf, size) + && !try_bps_patch(allow_bps, name_bps, buf, size) + && !try_ups_patch(allow_ups, name_ups, buf, size)) { RARCH_LOG("%s\n", msg_hash_to_str(MSG_DID_NOT_FIND_A_VALID_CONTENT_PATCH)); diff --git a/patch.h b/patch.h index 9311b555ac..33993d8468 100644 --- a/patch.h +++ b/patch.h @@ -36,7 +36,11 @@ RETRO_BEGIN_DECLS * Apply patch to the content file in-memory. * **/ -void patch_content(uint8_t **buf, ssize_t *size); +void patch_content( + const char *name_ips, + const char *name_bps, + const char *name_ups, + uint8_t **buf, ssize_t *size); RETRO_END_DECLS diff --git a/tasks/task_content.c b/tasks/task_content.c index 651a37fcc2..81f9208cff 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -331,7 +331,15 @@ static bool load_content_into_memory(unsigned i, const char *path, void **buf, /* Attempt to apply a patch. */ if (!rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL)) - patch_content(&ret_buf, length); + { + global_t *global = global_get_ptr(); + if (global) + patch_content( + global->name.ips, + global->name.bps, + global->name.ups, + &ret_buf, length); + } content_get_crc(&content_crc_ptr); From 76008230b539c5002310b6da6d00e3fcf6873e93 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 15:00:42 +0100 Subject: [PATCH 425/427] Header cleanup --- patch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/patch.c b/patch.c index 26da1fe5be..6dcb54929b 100644 --- a/patch.c +++ b/patch.c @@ -31,7 +31,6 @@ #include #include "msg_hash.h" -#include "patch.h" #include "retroarch.h" #include "verbosity.h" From 82d894c20539a0effee462def1103454fdf387f6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 15:02:29 +0100 Subject: [PATCH 426/427] Cleanups --- cheevos.c | 4 ++-- database_info.c | 18 ------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/cheevos.c b/cheevos.c index 9c3e474fe2..d7eb8c5e4e 100644 --- a/cheevos.c +++ b/cheevos.c @@ -955,7 +955,7 @@ static size_t cheevos_highest_bit(size_t n) void cheevos_parse_guest_addr(cheevos_var_t *var, unsigned value) { - rarch_system_info_t *system; + rarch_system_info_t *system = NULL; runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); var->bank_id = -1; @@ -1510,7 +1510,7 @@ uint8_t *cheevos_get_memory(const cheevos_var_t *var) if (var->bank_id >= 0) { - rarch_system_info_t *system; + rarch_system_info_t *system = NULL; runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system); if (system->mmaps.num_descriptors != 0) diff --git a/database_info.c b/database_info.c index d61803befb..6f927081ae 100644 --- a/database_info.c +++ b/database_info.c @@ -31,24 +31,6 @@ #include "msg_hash.h" #include "verbosity.h" -#define DB_QUERY_ENTRY 0x1c310956U -#define DB_QUERY_ENTRY_PUBLISHER 0x125e594dU -#define DB_QUERY_ENTRY_DEVELOPER 0xcbd89be5U -#define DB_QUERY_ENTRY_ORIGIN 0x4ebaa767U -#define DB_QUERY_ENTRY_FRANCHISE 0x77f9eff2U -#define DB_QUERY_ENTRY_RATING 0x68eba20fU -#define DB_QUERY_ENTRY_BBFC_RATING 0x0a8e67f0U -#define DB_QUERY_ENTRY_ELSPA_RATING 0x8bf6ab18U -#define DB_QUERY_ENTRY_PEGI_RATING 0x5fc77328U -#define DB_QUERY_ENTRY_CERO_RATING 0x24f6172cU -#define DB_QUERY_ENTRY_ENHANCEMENT_HW 0x9866bda3U -#define DB_QUERY_ENTRY_EDGE_MAGAZINE_RATING 0x1c7f8a43U -#define DB_QUERY_ENTRY_EDGE_MAGAZINE_ISSUE 0xaaeebde7U -#define DB_QUERY_ENTRY_FAMITSU_MAGAZINE_RATING 0xbf7ff5e7U -#define DB_QUERY_ENTRY_RELEASEDATE_MONTH 0x2b36ce66U -#define DB_QUERY_ENTRY_RELEASEDATE_YEAR 0x9c7c6e91U -#define DB_QUERY_ENTRY_MAX_USERS 0xbfcba816U - #define DB_CURSOR_ROM_NAME 0x16bbcf13U #define DB_CURSOR_NAME 0x7c9b0c46U #define DB_CURSOR_DESCRIPTION 0x91b0c789U From 0489bc6196c390ca95a42b0708512fd11ea9e5ff Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Jan 2017 15:05:11 +0100 Subject: [PATCH 427/427] Cleanups --- database_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database_info.c b/database_info.c index 6f927081ae..28120c528f 100644 --- a/database_info.c +++ b/database_info.c @@ -402,9 +402,9 @@ static int database_cursor_close(libretrodb_t *db, libretrodb_cursor_t *cur) database_info_handle_t *database_info_dir_init(const char *dir, enum database_type type) { + unsigned i; database_info_handle_t *db = (database_info_handle_t*) calloc(1, sizeof(*db)); - unsigned i = 0; if (!db) return NULL;