]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/atmo/atmo.cpp
String removal
[vlc] / modules / video_filter / atmo / atmo.cpp
index 78f912944be8e920824e3149bffae036404d4e56..27e0f867bd495f51d4529aacbcd70069dffc9c96 100644 (file)
@@ -44,6 +44,7 @@
 #include <vlc_playlist.h>
 #include <vlc_filter.h>
 #include <vlc_atomic.h>
+#include <vlc_charset.h>
 
 #include "filter_picture.h"
 
@@ -256,12 +257,12 @@ static const char *const ppsz_device_type_descriptions[] = {
                                 "On Windows usually something like COM1 or " \
                                 "COM2. On Linux /dev/ttyS01 f.e.")
 
-#define EDGE_TEXT            N_("Edge Weightning")
+#define EDGE_TEXT            N_("Edge weightning")
 #define EDGE_LONGTEXT        N_("Increasing this value will result in color "\
                                 "more depending on the border of the frame.")
 #define BRIGHTNESS_TEXT     N_("Brightness")
 #define BRIGHTNESS_LONGTEXT N_("Overall brightness of your LED stripes")
-#define DARKNESS_TEXT       N_("Darkness Limit")
+#define DARKNESS_TEXT       N_("Darkness limit")
 #define DARKNESS_LONGTEXT   N_("Pixels with a saturation lower than this will "\
                                "be ignored. Should be greater than one for "\
                                "letterboxed videos.")
@@ -276,7 +277,7 @@ static const char *const ppsz_device_type_descriptions[] = {
 #define MEANTHRESHOLD_TEXT     N_("Filter threshold")
 #define MEANTHRESHOLD_LONGTEXT N_("How much a color has to be changed for an "\
                                   "immediate color change.")
-#define MEANPERCENTNEW_TEXT     N_("Filter Smoothness (in %)")
+#define MEANPERCENTNEW_TEXT     N_("Filter smoothness (%)")
 #define MEANPERCENTNEW_LONGTEXT N_("Filter Smoothness")
 
 #define FILTERMODE_TEXT        N_("Output Color filter mode")
@@ -1598,7 +1599,7 @@ static void Atmo_SetupParameters(filter_t *p_filter)
         if(p_sys->h_AtmoCtrl == NULL)
         {
             /*
-              be clever if the location of atmowina.exe is set
+              be clever if the location of atmowin.exe is set
               try to load the dll from the same folder :-)
             */
             char *psz_path = var_CreateGetStringCommand( p_filter,
@@ -1617,7 +1618,9 @@ static void Atmo_SetupParameters(filter_t *p_filter)
                     if( psz_dllname )
                     {
                         msg_Dbg( p_filter, "Try Loading '%s'", psz_dllname );
-                        p_sys->h_AtmoCtrl = LoadLibraryA( psz_dllname );
+                        TCHAR* ptsz_dllname = ToT(psz_dllname);
+                        p_sys->h_AtmoCtrl = LoadLibrary( ptsz_dllname );
+                        free(ptsz_dllname);
                     }
                     free( psz_dllname );
                 }
@@ -1849,16 +1852,17 @@ static void Atmo_SetupParameters(filter_t *p_filter)
         */
         char *psz_path = var_CreateGetStringCommand( p_filter,
                                                CFG_PREFIX "atmowinexe" );
+        LPTSTR ptsz_path = ToT(psz_path);
         if(psz_path != NULL)
         {
             STARTUPINFO startupinfo;
             PROCESS_INFORMATION pinfo;
             memset(&startupinfo, 0, sizeof(STARTUPINFO));
             startupinfo.cb = sizeof(STARTUPINFO);
-            if(CreateProcess(psz_path, NULL, NULL, NULL,
+            if(CreateProcess(ptsz_path, NULL, NULL, NULL,
                 FALSE, 0, NULL, NULL, &startupinfo, &pinfo) == TRUE)
             {
-                msg_Dbg(p_filter,"launched AtmoWin from %s",psz_path);
+                msg_Dbg(p_filter,"launched AtmoWin from %s", psz_path);
                 WaitForInputIdle(pinfo.hProcess, 5000);
                 /*
                   retry to initialize the library COM ... functionality
@@ -1869,6 +1873,7 @@ static void Atmo_SetupParameters(filter_t *p_filter)
                 msg_Err(p_filter,"failed to launch AtmoWin from %s", psz_path);
             }
             free(psz_path);
+            free(ptsz_path);
         }
     }
 #endif