Remove 'locale' parameter from all callbacks

The locale parameter was a mistake, because it puts extra needless
burden upon the module developer to have to handle this variable for
each and every single callback function.  The parameter is being removed
in favor of a single centralized module callback function that
specifically updates locale information for a module only when needed.
This commit is contained in:
jp9000
2014-06-25 00:13:00 -07:00
parent 74b4743bce
commit 0b4a259e56
38 changed files with 125 additions and 160 deletions

View File

@@ -258,9 +258,8 @@ static void display_capture_video_render(void *data, effect_t effect)
technique_end(tech);
}
static const char *display_capture_getname(const char *locale)
static const char *display_capture_getname(void)
{
UNUSED_PARAMETER(locale);
return "Display Capture";
}
@@ -300,9 +299,9 @@ static void display_capture_update(void *data, obs_data_t settings)
gs_leavecontext();
}
static obs_properties_t display_capture_properties(char const *locale)
static obs_properties_t display_capture_properties(void)
{
obs_properties_t props = obs_properties_create(locale);
obs_properties_t props = obs_properties_create();
obs_property_t list = obs_properties_add_list(props,
"display", "Display",

View File

@@ -5,9 +5,8 @@ struct test_filter {
effect_t whatever;
};
static const char *filter_getname(const char *locale)
static const char *filter_getname(void)
{
UNUSED_PARAMETER(locale);
return "Test";
}

View File

@@ -10,9 +10,8 @@ struct random_tex {
bool initialized;
};
static const char *random_getname(const char *locale)
static const char *random_getname(void)
{
UNUSED_PARAMETER(locale);
return "20x20 Random Pixel Texture Source (Test)";
}

View File

@@ -58,9 +58,8 @@ static void *sinewave_thread(void *pdata)
/* ------------------------------------------------------------------------- */
static const char *sinewave_getname(const char *locale)
static const char *sinewave_getname(void)
{
UNUSED_PARAMETER(locale);
return "Sinewave Sound Source (Test)";
}